;prepnutie LED tlacidlom (zmena stavu impulzom), osetrene zakmity
;striedanie stavu dvoch LED
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

    #include "p16F84A.inc"
 __CONFIG _FOSC_EXTRC & _WDTE_OFF & _PWRTE_ON & _CP_OFF

#DEFINE	BUTT	PORTA,0
 
NO1 EQU	0Ch
NO2 EQU	0Dh

	org	    00h
	GOTO    START
    
CAKAJA	MOVLW	10
	MOVWF	NO2
CAKAJB	INCFSZ	NO1,1
	GOTO	CAKAJB
	DECFSZ	NO2,1
	GOTO	CAKAJB
	RETURN
	
START	BSF	STATUS,RP0
	MOVLW	B'00000001'
	MOVWF	TRISA
	CLRF	TRISB
	BCF	STATUS,RP0
	
ZNOVU	MOVLW	B'00000001'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00000011'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00000111'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00001110'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00011100'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00111000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'01110000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'11100000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'11000000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'10000000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00000000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'10000000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'11000000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'11100000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'01110000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00111000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00011100'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00001110'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00000111'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00000011'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00000001'
	MOVWF	PORTB
	CALL	CAKAJA
	
	MOVLW	B'00000000'
	MOVWF	PORTB
	CALL	CAKAJA
	
	GOTO	ZNOVU
	
	END