Kód: Vybrat vše
LIST P=16F84
INCLUDE<P16F84.INC>
__CONFIG _PWRTE_ON & _WDT_OFF & _RC_OSC
#DEFINE VYSTUP PORTA,3
#DEFINE VYSTUP1 PORTA,1
#DEFINE VYSTUP2 PORTA,2
#DEFINE TLAC PORTA,0
BSF STATUS,RP0
MOVLW B'00000001'
MOVWF TRISA
BCF STATUS,RP0
BCF VYSTUP
START BTFSS TLAC
GOTO $-1
BSF VYSTUP
BSF VYSTUP1
BSF VYSTUP2
NOP
BTFSS TLAC
GOTO $-1
BCF VYSTUP
BCF VYSTUP1
BCF VYSTUP2
NOP
GOTO REZ1
REZ1 BSF VYSTUP
BSF VYSTUP1
BTFSS TLAC
GOTO $-1
BCF VYSTUP
BCF VYSTUP1
GOTO START
END