Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 5 → Rev 6

/programy/ASM/ir_blik/ovlad.asm/ovlad.asm
0,0 → 1,75
#include 16C84.INC
 
org 0
 
goto Start
;--------------------
org 4
;--------------------
goto Start
 
#include Delay.asm
Start:
page1
movlw 00000000B ; inicializace citace a prescaleru
movwf TMR0
movlw 00000000B ; konfigurace preruseni
movwf INTCON
 
page1
movlw 00000000B ; nastaveni portu na vstup nebo vystup
movwf PORTA ; 1=vstup 0=vystup
movlw 01000011B
movwf PORTB
 
bsf TMR0, 7 ; vypni pull-up na PORTB (OPTION registr)
 
page0
 
clrw ; vynulovani portu
movwf PORTA
movwf PORTB
 
MainLoop:
bsf PORTB, 3 ; Pridrz napajeni
bsf PORTB, 4
bsf PORTA, 3 ;Rozsvit LED
Delay 250
 
bcf PORTA, 3 ;Zhasni LED
 
Delay 250
 
 
bcf PORTA, 2
bcf PORTA, 1
smycka:
btfss PORTB, 0
goto LEDon
goto smycka
LEDon:
bsf PORTA, 3 ;Rozsvit LED
Delay 250
bcf PORTA, 3 ;Zhasni LED
Delay 250
goto smycka
;---------------
 
 
 
 
 
;----------------------------
; Definice promenych
;----------------------------
 
cblock
 
CT1
CT2
 
endc
 
end