Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
#include 16C84.INC
2
 
3
	org	0
4
 
5
	goto	Start
6
	;--------------------
7
	org	4
8
	;--------------------
9
	goto	Start
10
 
11
#include Delay.asm
12
 
13
Start:
14
	page1
15
	movlw 	00000000B	; inicializace citace a prescaleru
16
	movwf	TMR0
17
	movlw 	00000000B	; konfigurace preruseni
18
	movwf	INTCON
19
 
20
	page1
21
	movlw	00000000B	; nastaveni portu na vstup nebo vystup
22
	movwf	PORTA		; 1=vstup 0=vystup
23
	movlw	01000011B
24
	movwf	PORTB
25
 
26
	bsf	TMR0, 7		; vypni pull-up na PORTB (OPTION registr)
27
 
28
	page0
29
 
30
	clrw			; vynulovani portu
31
	movwf	PORTA
32
	movwf	PORTB
33
 
34
MainLoop:
35
	bsf	PORTB, 3	; Pridrz napajeni
36
	bsf	PORTB, 4
37
	bsf 	PORTA, 3	;Rozsvit LED
38
 
39
	Delay	250ms	
40
 
41
	bcf 	PORTA, 3	;Zhasni LED
42
 
43
	Delay	250ms			
44
 
45
 
46
	bcf	PORTA, 2
47
	bcf	PORTA, 1
48
smycka:	
49
	btfss	PORTB, 0
50
	goto	LEDon
51
	goto	smycka
52
LEDon:
53
	bsf 	PORTA, 3	;Rozsvit LED
54
	Delay	250ms			
55
	bcf 	PORTA, 3	;Zhasni LED
56
	Delay	250ms		
57
	goto	smycka
58
	;---------------
59
 
60
 
61
 
62
 
63
 
64
;----------------------------
65
; Definice promenych
66
;----------------------------
67
 
68
	cblock	
69
 
70
	CT1
71
	CT2
72
 
73
	endc
74
 
75
	end