		INCLUDE		"P16C74.INC"
		LIST 		P=16C74, R=DEC
		
    __CONFIG _CP_OFF & _PWRTE_ON & _WDT_ON & _RC_OSC

;--------------------------------------- proměnné

PA		EQU		05h		;porty A
PB		EQU		06h		;porty B
PC		EQU		07h		;porty C
PD		EQU		08h		;porty D
PE		EQU		09h		;porty E
c1		EQU		40h		;pomocná proměnná pro čekání
c2		EQU		41h		;pomocná proměnná pro čekání
c3		EQU		42h		;pomocná proměnná pro cykly
posunu	EQU		43h		;počet posunů RRF/RLF v jednom cyklu
W_temp	EQU		44h		;dočasné uložení W při přerušení
S_temp	EQU		45h		;dočasné uložení STATUS při přerušení
cas3	EQU		46h		;
c4		EQU		47h		;pomocná proměnná pro čekání
byte	EQU		48h		;
c5		EQU		49h		;
cas1	EQU		4Ah		;
cas2	EQU		4Bh		;
led		EQU		4Ch		;
led2	EQU		4Dh		;
led3	EQU		4Eh		;
led32	EQU		4Fh		;

;-----------------------------------------------------------------------------------
;NASTAVENÍ MIKROKONTROLÉRU
;-----------------------------------------------------------------------------------

;--------------------------------------- org

		ORG			00h
		GOTO		zacatek

		ORG			04h
		GOTO		preruseni

zacatek

;--------------------------------------- vstupy, výstupy

		BCF			STATUS,RP1
		BSF			STATUS,RP0

		MOVLW		b'00000000'
		MOVWF		TRISA

		MOVLW		b'00000001'
		MOVWF		TRISB

		MOVLW		b'00000000'
		MOVWF		TRISC

		MOVLW		b'00000000'
		MOVWF		TRISD

		MOVLW		b'00000000'
		MOVWF		TRISE

		BCF			STATUS,RP0
;--------------------------------------- a/d převodník

		BSF			STATUS,RP0
		MOVLW		b'11111111'	;vše digitální
		MOVWF		ADCON1
		BCF			STATUS,RP0
		MOVLW		b'00000000'	;vypnutí A/D
		MOVWF		ADCON0
;--------------------------------------- 


		
		
;---------------------------------------
;	OPTION_REG, nastavení přerušení
;---------------------------------------
		BSF			OPTION_REG,7
		BCF			OPTION_REG,6		; přerušení při sestupné hraně
		BCF			OPTION_REG,5		; funkce PA,4
		BSF			OPTION_REG,4
		BSF			OPTION_REG,3		; dělička je určena pro WDT
	
		BSF			OPTION_REG,2
		BSF			OPTION_REG,1		; nastavení děličky watchdog na max. čas
		BSF			OPTION_REG,0

;---------------------------------------


		BSF			INTCON,7			; povolení globálního přerušení
		BSF			INTCON,6			; povolení periferních přerušení
		BCF			INTCON,5			; povolení TMR0 přerušení
		BSF			INTCON,4			; povolení PB,0 přerušení
		BCF			INTCON,3			; povolení PB,3-7 přerušení
		BCF			INTCON,2			; TMR0 flag
		BCF			INTCON,1			; PB,0 flag
		BCF			INTCON,0			; PB,3-7 flag
;---------------------------------------






start
;--------------------------------------- 

		MOVLW		b'11111111'			; zhasnutí všech led
		MOVWF		PA
		MOVWF		PB
		MOVWF		PC
		MOVWF		PD
		MOVWF		PE
		

		CLRWDT
		SLEEP							; USNI, probuď se při přerušení od PB,0

;--------------------------------------- 

preruseni
		BCF			INTCON,1			; PB,0 flag - zrušení příznaku přerušení od PB,0
		CLRWDT




;--------------------------------------- 






start_cyklu


		MOVLW		255
		MOVWF		cas1
		
		MOVLW		255
		MOVWF		cas2
		
		MOVLW		1
		MOVWF		cas3




;	v následujícím cyklu schválně neni clrwdt. když se na impuls na portu PB,0 (magnetický spínač)
;	čeká příliš dlouho, přeteče WDT a provede se restart - pak pic hned usne (sleep)
;	a tim šetří baterky. Jakmile se objeví impuls na PB,0 pomocí přerušení se opět pic vzbudí.



cekam_na_tl


		MOVLW		255
		MOVWF		c2
cektl2	MOVLW		10
		MOVWF		cas1
cektl1	DECFSZ		cas1,1
		GOTO		cektl1
		
		BTFSS		PB,0			; pořád v cyklu testuje tlačítko, po impulsu okamžitě začne vypisovat text
		GOTO		start_text
		
		DECFSZ		cas2,1
		GOTO		cektl2


		INCF		cas3			; počítá počet cyklů při čekání na tlačítko a podle toho pak upraví rychlost vykreslování textu
		BTFSC		cas3,7
		GOTO		start 			; když už se čeká na tl. moc dlouho, přejdi na start (pak sleep)
		GOTO		cekam_na_tl





start_text	

		MOVLW		b'11111111'
		MOVWF		led
		MOVFW		led2
		

		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11100001'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00010010'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110010'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10110000'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10110000'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11110001'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111110'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11100000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000011'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000001'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11110000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111100'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11110000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11100000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000001'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000011'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11100000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111110'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11100001'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00010010'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110010'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10110000'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10110000'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11110001'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led3
		MOVLW		b'0'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11100001'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11100001'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00011111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001100'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001100'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001100'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001100'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10011110'
		MOVWF		led3
		MOVLW		b'00111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'10011110'
		MOVWF		led3
		MOVLW		b'01111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11011110'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00011111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000011'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000001'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00000001'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111000'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111100'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111110'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111110'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'00011111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led3
		MOVLW		b'11111111'
		MOVWF		led32
		CALL		cekani_x




;-----------------------------------------------------------------------------------
;-----------------------------------------------------------------------------------



		MOVLW		b'11111111'
		MOVWF		led3
		MOVFW		led32




		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111110'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111110'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111100'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000001'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000001'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00011111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11011110'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10011110'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10011110'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001100'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001100'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001100'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001100'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00011111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11100001'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00001111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11100001'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00111111'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00011110'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11110001'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10110000'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10110000'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110010'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00010010'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11100001'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111110'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11100000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000011'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000001'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11100000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11110000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111100'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11110000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000001'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00000011'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11100000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111110'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'0'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11110001'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10110000'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10110000'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110000'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110010'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00110011'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'00010010'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00011111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'0'
		MOVWF		led
		MOVLW		b'00111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'10000000'
		MOVWF		led
		MOVLW		b'01111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11000000'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11100001'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x
		MOVLW		b'11111111'
		MOVWF		led
		MOVLW		b'11111111'
		MOVWF		led2
		CALL		cekani_x



		
		GOTO		start_cyklu









;-----------------------------------------------------------------------------------
;-----------------------------------------------------------------------------------

cekani_x
;------------------------------převod na hardware rozmístění led - 1.strana

		BTFSC		led2,0
		BSF			PA,0
		BTFSS		led2,0
		BCF			PA,0

		BTFSC		led2,1
		BSF			PA,1
		BTFSS		led2,1
		BCF			PA,1

		BTFSC		led2,2
		BSF			PA,2
		BTFSS		led2,2
		BCF			PA,2

		BTFSC		led2,3
		BSF			PA,3
		BTFSS		led2,3
		BCF			PA,3
		
		BTFSC		led2,4
		BSF			PA,4
		BTFSS		led2,4
		BCF			PA,4

		BTFSC		led2,5
		BSF			PA,5
		BTFSS		led2,5
		BCF			PA,5

		BTFSC		led2,6
		BSF			PE,0
		BTFSS		led2,6
		BCF			PE,0

		BTFSC		led2,7
		BSF			PE,1
		BTFSS		led2,7
		BCF			PE,1
		
		BTFSC		led,0
		BSF			PE,2
		BTFSS		led,0
		BCF			PE,2

		BTFSC		led,1
		BSF			PC,0
		BTFSS		led,1
		BCF			PC,0

		BTFSC		led,2
		BSF			PC,1
		BTFSS		led,2
		BCF			PC,1

		BTFSC		led,3
		BSF			PD,1
		BTFSS		led,3
		BCF			PD,1
		
		BTFSC		led,4
		BSF			PD,0
		BTFSS		led,4
		BCF			PD,0

		BTFSC		led,5
		BSF			PC,3
		BTFSS		led,5
		BCF			PC,3

		BTFSC		led,6
		BSF			PC,2
		BTFSS		led,6
		BCF			PC,2

		BTFSC		led,7
		BSF			PD,4
		BTFSS		led,7
		BCF			PD,4

;------------------------------převod na hardware rozmístění led - 2.strana
		CLRWDT				;vynulování Watch Dog
		
		

		BTFSC		led32,0
		BSF			PB,7
		BTFSS		led32,0
		BCF			PB,7

		BTFSC		led32,1
		BSF			PB,6
		BTFSS		led32,1
		BCF			PB,6

		BTFSC		led32,2
		BSF			PB,5
		BTFSS		led32,2
		BCF			PB,5

		BTFSC		led32,3
		BSF			PB,4
		BTFSS		led32,3
		BCF			PB,4
		
		BTFSC		led32,4
		BSF			PB,3
		BTFSS		led32,4
		BCF			PB,3

		BTFSC		led32,5
		BSF			PB,2
		BTFSS		led32,5
		BCF			PB,2

		BTFSC		led32,6
		BSF			PB,1
		BTFSS		led32,6
		BCF			PB,1

		BTFSC		led32,7
		BSF			PD,7
		BTFSS		led32,7
		BCF			PD,7
		
		BTFSC		led3,0
		BSF			PD,6
		BTFSS		led3,0
		BCF			PD,6

		BTFSC		led3,1
		BSF			PD,5
		BTFSS		led3,1
		BCF			PD,5

		BTFSC		led3,2
		BSF			PD,2
		BTFSS		led3,2
		BCF			PD,2

		BTFSC		led3,3
		BSF			PD,3
		BTFSS		led3,3
		BCF			PD,3
		
		BTFSC		led3,4
		BSF			PC,4
		BTFSS		led3,4
		BCF			PC,4

		BTFSC		led3,5
		BSF			PC,5
		BTFSS		led3,5
		BCF			PC,5

		BTFSC		led3,6
		BSF			PC,6
		BTFSS		led3,6
		BCF			PC,6

		BTFSC		led3,7
		BSF			PC,7
		BTFSS		led3,7
		BCF			PC,7



		MOVF		cas3,w
		MOVWF		c4
cek7	NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		NOP
		DECFSZ		c4,1
		GOTO		cek7
		CLRWDT				;vynulování Watch Dog
		RETURN



;-----------------------------------------------------------------------------------
;ČEKÁNÍ
;-----------------------------------------------------------------------------------

;----------------------------------------

cekani1
		MOVLW		10
		MOVWF		c3
cek3	MOVLW		20
		MOVWF		c2
cek2	MOVLW		100
		MOVWF		c1

		CLRWDT				;vynulování Watch Dog

cek1	DECFSZ		c1,1
		GOTO		cek1
		DECFSZ		c2,1
		GOTO		cek2
		DECFSZ		c3,1
		GOTO		cek3

		RETURN

cekani2
		CLRWDT
		RETURN
		MOVLW		60
		MOVWF		c2
cek5	MOVLW		10
		MOVWF		c1
cek4	DECFSZ		c1,1
		GOTO		cek4
		CLRWDT				;vynulování Watch Dog
		DECFSZ		c2,1
		GOTO		cek5
		CLRWDT				;vynulování Watch Dog
	
		RETURN



		END
