Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
2 kaklik 1
CCS PCW C Compiler, Version 3.110, 15448
2
 
3
               Filename: d:\@kaklik\programy\pic_c\robot\solarni_robot\main.LST
4
 
5
               ROM used: 47 (5%)
6
                         Largest free fragment is 977
7
               RAM used: 3 (4%) at main() level
8
                         4 (6%) worst case
9
               Stack:    1 locations
10
 
11
*
12
0000:  MOVLW  00
13
0001:  MOVWF  0A
14
0002:  GOTO   012
15
0003:  NOP
16
....................  #include "D:\@Kaklik\programy\PIC_C\robot\solarni_robot\main.h" 
17
....................  #include <16F84.h> 
18
....................  //////// Standard Header file for the PIC16F84 device ////////////////  
19
.................... #device PIC16F84  
20
.................... #list  
21
....................  
22
.................... #use delay(clock=32768)  
23
0004:  MOVLW  10
24
0005:  MOVWF  04
25
0006:  MOVF   00,W
26
0007:  BTFSC  03.2
27
0008:  GOTO   011
28
0009:  GOTO   00F
29
000A:  NOP
30
000B:  NOP
31
000C:  NOP
32
000D:  NOP
33
000E:  NOP
34
000F:  DECFSZ 00,F
35
0010:  GOTO   00A
36
0011:  GOTO   02B (RETURN)
37
.................... #fuses LP,PUT,NOWDT  
38
....................   
39
....................  
40
....................   
41
.................... #define LED       pin_B3  
42
.................... #define ON_TIME   100      // Cas sepnuti rele  
43
.................... #define meridlo   pin_B2  
44
....................   
45
.................... void rele1()   // Sepnuti prvniho rele  
46
.................... {  
47
....................    output_low(PIN_A1);  
48
....................    output_low(PIN_B4);  
49
....................    delay_ms(ON_TIME);  
50
....................    output_high(PIN_A1);  
51
....................    output_high(PIN_B4);  
52
.................... }  
53
....................   
54
.................... void motor()  
55
.................... {  
56
....................    output_low(pin_A2);  
57
....................    output_low(pin_B1);  
58
....................    output_low(PIN_A4);  
59
....................    delay_ms(ON_TIME);  
60
....................    output_high(pin_A2);  
61
....................    output_high(pin_B1);  
62
....................    output_high(PIN_A4);  
63
.................... }  
64
....................   
65
.................... void rele2()  
66
.................... {  
67
....................    output_low(pin_B5);  
68
....................    output_low(pin_A0);  
69
....................    delay_ms(ON_TIME);  
70
....................    output_high(pin_A0);  
71
....................    output_high(pin_B5);  
72
.................... }  
73
....................   
74
.................... void main()  
75
.................... {  
76
0012:  CLRF   04
77
0013:  MOVLW  1F
78
0014:  ANDWF  03,F
79
....................   output_high(pin_B0);  
80
0015:  BSF    03.5
81
0016:  BCF    06.0
82
0017:  BCF    03.5
83
0018:  BSF    06.0
84
....................     
85
.................... While (true)  
86
.................... {  
87
....................    output_high(LED);  
88
0019:  BSF    03.5
89
001A:  BCF    06.3
90
001B:  BCF    03.5
91
001C:  BSF    06.3
92
....................    delay_ms(25);                       //vystavni blikani  
93
001D:  MOVLW  42
94
001E:  MOVWF  0C
95
001F:  DECFSZ 0C,F
96
0020:  GOTO   01F
97
0021:  NOP
98
....................    output_low(LED);  
99
0022:  BSF    03.5
100
0023:  BCF    06.3
101
0024:  BCF    03.5
102
0025:  BCF    06.3
103
....................    Delay_ms(1000);  
104
0026:  MOVLW  04
105
0027:  MOVWF  0F
106
0028:  MOVLW  FA
107
0029:  MOVWF  10
108
002A:  GOTO   004
109
002B:  DECFSZ 0F,F
110
002C:  GOTO   028
111
.................... }  
112
002D:  GOTO   019
113
....................   
114
.................... /*   rele1();  
115
....................   
116
....................    while (!input(meridlo))  
117
....................   
118
....................    delay_ms(100);  
119
....................   
120
....................    rele2();  
121
....................   
122
....................    while (!input(meridlo))  
123
....................   
124
....................    delay_ms(100);  
125
....................   
126
....................    motor();  
127
....................   
128
....................    output_low(pin_B0);  
129
.................... */  
130
.................... }  
131
....................  
132
002E:  SLEEP