245 |
kaklik |
1 |
CCS PCM C Compiler, Version 3.245, 27853 11-V-08 14:54 |
221 |
svejda |
2 |
|
240 |
kaklik |
3 |
Filename: D:\MLAB_E\projekty\rotacni_display\SW\infra\infra.lst |
221 |
svejda |
4 |
|
245 |
kaklik |
5 |
ROM used: 637 words (8%) |
221 |
svejda |
6 |
Largest free fragment is 2048 |
241 |
kaklik |
7 |
RAM used: 28 (16%) at main() level |
245 |
kaklik |
8 |
38 (22%) worst case |
241 |
kaklik |
9 |
Stack: 3 worst case (2 in main + 1 for interrupts) |
221 |
svejda |
10 |
|
|
|
11 |
* |
|
|
12 |
0000: MOVLW 00 |
|
|
13 |
0001: MOVWF 0A |
245 |
kaklik |
14 |
0002: GOTO 1D7 |
221 |
svejda |
15 |
0003: NOP |
|
|
16 |
0004: MOVWF 7F |
|
|
17 |
0005: SWAPF 03,W |
|
|
18 |
0006: CLRF 03 |
|
|
19 |
0007: MOVWF 21 |
|
|
20 |
0008: MOVF 0A,W |
|
|
21 |
0009: MOVWF 20 |
|
|
22 |
000A: CLRF 0A |
|
|
23 |
000B: MOVF 04,W |
|
|
24 |
000C: MOVWF 22 |
|
|
25 |
000D: MOVF 77,W |
|
|
26 |
000E: MOVWF 23 |
|
|
27 |
000F: MOVF 78,W |
|
|
28 |
0010: MOVWF 24 |
|
|
29 |
0011: MOVF 79,W |
|
|
30 |
0012: MOVWF 25 |
|
|
31 |
0013: MOVF 7A,W |
|
|
32 |
0014: MOVWF 26 |
|
|
33 |
0015: MOVF 7B,W |
|
|
34 |
0016: MOVWF 27 |
|
|
35 |
0017: BCF 03.7 |
|
|
36 |
0018: BCF 03.5 |
|
|
37 |
0019: MOVLW 8C |
|
|
38 |
001A: MOVWF 04 |
|
|
39 |
001B: BTFSS 00.5 |
|
|
40 |
001C: GOTO 01F |
|
|
41 |
001D: BTFSC 0C.5 |
|
|
42 |
001E: GOTO 032 |
|
|
43 |
001F: MOVF 22,W |
|
|
44 |
0020: MOVWF 04 |
|
|
45 |
0021: MOVF 23,W |
|
|
46 |
0022: MOVWF 77 |
|
|
47 |
0023: MOVF 24,W |
|
|
48 |
0024: MOVWF 78 |
|
|
49 |
0025: MOVF 25,W |
|
|
50 |
0026: MOVWF 79 |
|
|
51 |
0027: MOVF 26,W |
|
|
52 |
0028: MOVWF 7A |
|
|
53 |
0029: MOVF 27,W |
|
|
54 |
002A: MOVWF 7B |
|
|
55 |
002B: MOVF 20,W |
|
|
56 |
002C: MOVWF 0A |
|
|
57 |
002D: SWAPF 21,W |
|
|
58 |
002E: MOVWF 03 |
|
|
59 |
002F: SWAPF 7F,F |
|
|
60 |
0030: SWAPF 7F,W |
|
|
61 |
0031: RETFIE |
|
|
62 |
0032: BCF 0A.3 |
|
|
63 |
0033: BCF 0A.4 |
245 |
kaklik |
64 |
0034: GOTO 13B |
237 |
kaklik |
65 |
.................... #include ".\infra.h" |
221 |
svejda |
66 |
.................... #include <16F877A.h> |
|
|
67 |
.................... //////// Standard Header file for the PIC16F877A device //////////////// |
|
|
68 |
.................... #device PIC16F877A |
|
|
69 |
.................... #list |
|
|
70 |
.................... |
|
|
71 |
.................... #device adc=8 |
|
|
72 |
.................... |
237 |
kaklik |
73 |
.................... #FUSES WDT //Watch Dog Timer |
221 |
svejda |
74 |
.................... #FUSES XT //Crystal osc <= 4mhz |
|
|
75 |
.................... #FUSES NOPUT //No Power Up Timer |
|
|
76 |
.................... #FUSES NOPROTECT //Code not protected from reading |
|
|
77 |
.................... #FUSES NODEBUG //No Debug mode for ICD |
|
|
78 |
.................... #FUSES NOBROWNOUT //No brownout reset |
|
|
79 |
.................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O |
|
|
80 |
.................... #FUSES NOCPD //No EE protection |
|
|
81 |
.................... #FUSES NOWRT //Program memory not write protected |
|
|
82 |
.................... |
|
|
83 |
.................... #use delay(clock=4000000,RESTART_WDT) |
237 |
kaklik |
84 |
* |
245 |
kaklik |
85 |
0153: MOVLW 3A |
|
|
86 |
0154: MOVWF 04 |
|
|
87 |
0155: MOVF 00,W |
|
|
88 |
0156: BTFSC 03.2 |
|
|
89 |
0157: GOTO 169 |
|
|
90 |
0158: MOVLW 01 |
|
|
91 |
0159: MOVWF 78 |
|
|
92 |
015A: MOVLW BF |
|
|
93 |
015B: MOVWF 77 |
|
|
94 |
015C: CLRWDT |
|
|
95 |
015D: DECFSZ 77,F |
|
|
96 |
015E: GOTO 15C |
|
|
97 |
015F: DECFSZ 78,F |
|
|
98 |
0160: GOTO 15A |
|
|
99 |
0161: MOVLW 4A |
|
|
100 |
0162: MOVWF 77 |
|
|
101 |
0163: DECFSZ 77,F |
|
|
102 |
0164: GOTO 163 |
|
|
103 |
0165: NOP |
|
|
104 |
0166: CLRWDT |
|
|
105 |
0167: DECFSZ 00,F |
|
|
106 |
0168: GOTO 158 |
|
|
107 |
0169: BCF 0A.3 |
|
|
108 |
016A: BCF 0A.4 |
|
|
109 |
016B: GOTO 1A4 (RETURN) |
221 |
svejda |
110 |
.................... #use rs232(baud=600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8) |
|
|
111 |
.................... |
|
|
112 |
.................... |
|
|
113 |
.................... |
245 |
kaklik |
114 |
.................... |
221 |
svejda |
115 |
.................... #define MAX_SLOVO 10 // Maximalni pocet znaku ve slovu |
|
|
116 |
.................... |
240 |
kaklik |
117 |
.................... int8 napis[MAX_SLOVO+1]; |
237 |
kaklik |
118 |
.................... int8 otacky; |
221 |
svejda |
119 |
.................... |
245 |
kaklik |
120 |
.................... const int8 logo[MAX_SLOVO+1]={'[','[',92,'[','E','e','A','[',92,'[',0}; // [blesk] E4A [blesk] |
|
|
121 |
.................... const int8 rok[MAX_SLOVO+1]={'[','c','a','a','e',']','c','a','a','i',0}; // 2004-2008 |
240 |
kaklik |
122 |
.................... |
221 |
svejda |
123 |
.................... #int_RDA |
240 |
kaklik |
124 |
.................... void RDA_isr(void) |
221 |
svejda |
125 |
.................... { |
|
|
126 |
.................... int n; |
|
|
127 |
.................... output_B(0x55); |
|
|
128 |
* |
245 |
kaklik |
129 |
013B: BSF 03.5 |
|
|
130 |
013C: CLRF 06 |
|
|
131 |
013D: MOVLW 55 |
|
|
132 |
013E: BCF 03.5 |
|
|
133 |
013F: MOVWF 06 |
240 |
kaklik |
134 |
.................... for(n=0;n<MAX_SLOVO;n++) |
245 |
kaklik |
135 |
0140: CLRF 3F |
|
|
136 |
0141: MOVF 3F,W |
|
|
137 |
0142: SUBLW 09 |
|
|
138 |
0143: BTFSS 03.0 |
|
|
139 |
0144: GOTO 14E |
221 |
svejda |
140 |
.................... { |
240 |
kaklik |
141 |
.................... napis[n]=getc(); |
245 |
kaklik |
142 |
0145: MOVLW 28 |
|
|
143 |
0146: ADDWF 3F,W |
|
|
144 |
0147: MOVWF 04 |
|
|
145 |
0148: BTFSS 0C.5 |
|
|
146 |
0149: GOTO 148 |
|
|
147 |
014A: MOVF 1A,W |
|
|
148 |
014B: MOVWF 00 |
221 |
svejda |
149 |
.................... } |
245 |
kaklik |
150 |
014C: INCF 3F,F |
|
|
151 |
014D: GOTO 141 |
|
|
152 |
.................... otacky=0; |
|
|
153 |
014E: CLRF 33 |
221 |
svejda |
154 |
.................... } |
|
|
155 |
.................... |
245 |
kaklik |
156 |
014F: BCF 0C.5 |
|
|
157 |
0150: BCF 0A.3 |
|
|
158 |
0151: BCF 0A.4 |
|
|
159 |
0152: GOTO 01F |
241 |
kaklik |
160 |
.................... void LED_print() |
221 |
svejda |
161 |
.................... { |
241 |
kaklik |
162 |
.................... unsigned int slovo,pismeno,sloupec,j; |
221 |
svejda |
163 |
.................... |
245 |
kaklik |
164 |
.................... const int8 pis[45*5]={0b00000001,0b11110110,0b11110110,0b11110110,0b00000001, // A |
|
|
165 |
.................... 0b00000000,0b01110110,0b01110110,0b01110110,0b10001001, // B |
|
|
166 |
.................... 0b10000001,0b01111110,0b01111110,0b01111110,0b10111101, // C |
|
|
167 |
.................... 0b00000000,0b01111110,0b01111110,0b01111110,0b10000001, // D |
|
|
168 |
.................... 0b00000000,0b01110110,0b01110110,0b01111110,0b01111110, // E |
|
|
169 |
.................... 0b00000000,0b11110110,0b11110110,0b11111110,0b11111110, // F |
|
|
170 |
.................... 0b10000001,0b01111110,0b01110110,0b01110110,0b10000101, // G |
|
|
171 |
.................... 0b00000000,0b11110111,0b11110111,0b11110111,0b00000000, // H |
|
|
172 |
.................... 0b01111110,0b01111110,0b00000000,0b01111110,0b01111110, // I |
|
|
173 |
.................... 0b10111110,0b01111110,0b01111110,0b01111110,0b10000000, // J |
|
|
174 |
.................... 0b00000000,0b11110111,0b11110111,0b11101011,0b00011100, // K |
|
|
175 |
.................... 0b00000000,0b01111111,0b01111111,0b01111111,0b01111111, // L |
|
|
176 |
.................... 0b00000000,0b11111110,0b11110000,0b11111110,0b00000000, // M |
|
|
177 |
.................... 0b00000000,0b11101111,0b11011111,0b10111111,0b00000000, // N |
|
|
178 |
.................... 0b10000001,0b01111110,0b01111110,0b01111110,0b10000001, // O |
|
|
179 |
.................... 0b00000000,0b11110110,0b11110110,0b11110110,0b11111001, // P |
|
|
180 |
.................... 0b10000001,0b01111110,0b01111110,0b01111110,0b00000001, // Q |
|
|
181 |
.................... 0b00000000,0b11110110,0b11110110,0b11110110,0b00001001, // R |
|
|
182 |
.................... 0b10111001,0b01110110,0b01110110,0b01110110,0b10001101, // S |
|
|
183 |
.................... 0b11111110,0b11111110,0b00000000,0b11111110,0b11111110, // T |
|
|
184 |
.................... 0b10000000,0b01111111,0b01111111,0b01111111,0b10000000, // U |
|
|
185 |
.................... 0b11000000,0b10111111,0b01111111,0b10111111,0b11000000, // V |
|
|
186 |
.................... 0b10000000,0b01111111,0b10000000,0b01111111,0b10000000, // W |
|
|
187 |
.................... 0b00011100,0b11101011,0b11110111,0b11101011,0b00011100, // X |
|
|
188 |
.................... 0b11111000,0b11110111,0b00000111,0b11110111,0b11111000, // Y |
|
|
189 |
.................... 0b00011110,0b01101110,0b01110110,0b01111010,0b01111100, // Z |
|
|
190 |
.................... 0b11111111,0b11111111,0b11111111,0b11111111,0b11111111, // mezera [ 91 |
|
|
191 |
.................... 0b00010111,0b00110011,0b01010101,0b11100110,0b11110111, // blesk \ 92 |
|
|
192 |
.................... 0b11110111,0b11110111,0b11110111,0b11110111,0b11110111, // - ] 93 |
|
|
193 |
.................... 0b11111111,0b11111111,0b01111111,0b11111111,0b11111111, // . ^ 94 |
|
|
194 |
.................... 0b11111100,0b11110000,0b01000000,0b11110000,0b11111100, // ! _ 95 |
|
|
195 |
.................... 0b11111101,0b11111110,0b01001110,0b11110110,0b11111001, // ? ` 96 |
|
|
196 |
.................... 0b00000000,0b01111110,0b01111110,0b01111110,0b00000000, // 0 a |
|
|
197 |
.................... 0b01111011,0b01111101,0b00000000,0b01111111,0b01111111, // 1 b |
|
|
198 |
.................... 0b00111101,0b01011110,0b01101110,0b01110110,0b01111001, // 2 c |
|
|
199 |
.................... 0b10111101,0b01111110,0b01110110,0b01110110,0b10001001, // 3 d |
|
|
200 |
.................... 0b11110000,0b11110111,0b11110111,0b00000001,0b11110111, // 4 e |
|
|
201 |
.................... 0b10111000,0b01110110,0b01110110,0b01110110,0b10001110, // 5 f |
|
|
202 |
.................... 0b10000001,0b01110110,0b01110110,0b01110110,0b10001101, // 6 g |
|
|
203 |
.................... 0b11111110,0b11111110,0b00001110,0b11110110,0b11111000, // 7 h |
|
|
204 |
.................... 0b10001001,0b01110110,0b01110110,0b01110110,0b10001001, // 8 i |
|
|
205 |
.................... 0b10111001,0b01110110,0b01110110,0b01110110,0b10000001, // 9 j |
|
|
206 |
.................... 0b11111111,0b01111110,0b10111101,0b11000011,0b11111111, // ) k |
|
|
207 |
.................... 0b11111111,0b11000011,0b10111101,0b01111110,0b11111111, // ( l |
|
|
208 |
.................... 0b11111111,0b11111111,0b11111111,0b11011011,0b11111111, // : m |
237 |
kaklik |
209 |
.................... }; |
245 |
kaklik |
210 |
.................... |
241 |
kaklik |
211 |
.................... while(read_adc()<9); // Cekani na magnet |
|
|
212 |
* |
245 |
kaklik |
213 |
0193: BSF 1F.2 |
|
|
214 |
0194: BTFSC 1F.2 |
|
|
215 |
0195: GOTO 194 |
|
|
216 |
0196: MOVF 1E,W |
|
|
217 |
0197: SUBLW 08 |
|
|
218 |
0198: BTFSC 03.0 |
|
|
219 |
0199: GOTO 193 |
|
|
220 |
.................... while(read_adc()>50); // Cekani na opusteni magnetu |
|
|
221 |
019A: BSF 1F.2 |
|
|
222 |
019B: BTFSC 1F.2 |
|
|
223 |
019C: GOTO 19B |
|
|
224 |
019D: MOVF 1E,W |
|
|
225 |
019E: SUBLW 32 |
|
|
226 |
019F: BTFSS 03.0 |
|
|
227 |
01A0: GOTO 19A |
|
|
228 |
.................... delay_ms(7); //cekani, na dostatecni odstup od magnetu, pred zacatkem psani textu |
|
|
229 |
01A1: MOVLW 07 |
|
|
230 |
01A2: MOVWF 3A |
|
|
231 |
01A3: GOTO 153 |
240 |
kaklik |
232 |
.................... |
241 |
kaklik |
233 |
.................... for(pismeno=0;pismeno<MAX_SLOVO;pismeno++) |
245 |
kaklik |
234 |
01A4: CLRF 37 |
|
|
235 |
01A5: MOVF 37,W |
|
|
236 |
01A6: SUBLW 09 |
|
|
237 |
01A7: BTFSS 03.0 |
|
|
238 |
01A8: GOTO 1D4 |
241 |
kaklik |
239 |
.................... { |
|
|
240 |
.................... for(sloupec=0;sloupec<5;sloupec++) |
245 |
kaklik |
241 |
01A9: CLRF 38 |
|
|
242 |
01AA: MOVF 38,W |
|
|
243 |
01AB: SUBLW 04 |
|
|
244 |
01AC: BTFSS 03.0 |
|
|
245 |
01AD: GOTO 1C8 |
241 |
kaklik |
246 |
.................... { |
|
|
247 |
.................... output_B(pis[(napis[pismeno]-0x41)*5+sloupec]); |
245 |
kaklik |
248 |
01AE: MOVLW 28 |
|
|
249 |
01AF: ADDWF 37,W |
|
|
250 |
01B0: MOVWF 04 |
|
|
251 |
01B1: MOVLW 41 |
|
|
252 |
01B2: SUBWF 00,W |
|
|
253 |
01B3: MOVWF 3C |
|
|
254 |
01B4: MOVWF 3D |
|
|
255 |
01B5: MOVLW 05 |
|
|
256 |
01B6: MOVWF 3E |
|
|
257 |
01B7: GOTO 16C |
|
|
258 |
01B8: MOVF 38,W |
|
|
259 |
01B9: ADDWF 78,W |
|
|
260 |
01BA: CALL 053 |
|
|
261 |
01BB: MOVWF 3A |
|
|
262 |
01BC: BSF 03.5 |
|
|
263 |
01BD: CLRF 06 |
|
|
264 |
01BE: BCF 03.5 |
|
|
265 |
01BF: MOVF 3A,W |
|
|
266 |
01C0: MOVWF 06 |
241 |
kaklik |
267 |
.................... delay_us(500); |
245 |
kaklik |
268 |
01C1: CLRWDT |
|
|
269 |
01C2: MOVLW A6 |
|
|
270 |
01C3: MOVWF 77 |
|
|
271 |
01C4: DECFSZ 77,F |
|
|
272 |
01C5: GOTO 1C4 |
241 |
kaklik |
273 |
.................... } |
245 |
kaklik |
274 |
01C6: INCF 38,F |
|
|
275 |
01C7: GOTO 1AA |
241 |
kaklik |
276 |
.................... output_B(0xFF); |
245 |
kaklik |
277 |
01C8: BSF 03.5 |
|
|
278 |
01C9: CLRF 06 |
|
|
279 |
01CA: MOVLW FF |
|
|
280 |
01CB: BCF 03.5 |
|
|
281 |
01CC: MOVWF 06 |
241 |
kaklik |
282 |
.................... delay_us(500); |
245 |
kaklik |
283 |
01CD: CLRWDT |
|
|
284 |
01CE: MOVLW A6 |
|
|
285 |
01CF: MOVWF 77 |
|
|
286 |
01D0: DECFSZ 77,F |
|
|
287 |
01D1: GOTO 1D0 |
241 |
kaklik |
288 |
.................... } |
245 |
kaklik |
289 |
01D2: INCF 37,F |
|
|
290 |
01D3: GOTO 1A5 |
241 |
kaklik |
291 |
.................... } |
245 |
kaklik |
292 |
01D4: BCF 0A.3 |
|
|
293 |
01D5: BCF 0A.4 |
|
|
294 |
01D6: GOTO 257 (RETURN) |
241 |
kaklik |
295 |
.................... |
|
|
296 |
.................... void main() |
|
|
297 |
.................... { |
245 |
kaklik |
298 |
01D7: CLRF 04 |
|
|
299 |
01D8: MOVLW 1F |
|
|
300 |
01D9: ANDWF 03,F |
|
|
301 |
01DA: MOVLW 67 |
|
|
302 |
01DB: BSF 03.5 |
|
|
303 |
01DC: MOVWF 19 |
|
|
304 |
01DD: MOVLW 22 |
|
|
305 |
01DE: MOVWF 18 |
|
|
306 |
01DF: MOVLW 90 |
|
|
307 |
01E0: BCF 03.5 |
|
|
308 |
01E1: MOVWF 18 |
|
|
309 |
01E2: BSF 03.5 |
|
|
310 |
01E3: BSF 1F.0 |
|
|
311 |
01E4: BSF 1F.1 |
|
|
312 |
01E5: BSF 1F.2 |
|
|
313 |
01E6: BCF 1F.3 |
|
|
314 |
01E7: MOVLW 07 |
|
|
315 |
01E8: MOVWF 1C |
241 |
kaklik |
316 |
.................... |
|
|
317 |
.................... |
237 |
kaklik |
318 |
.................... setup_adc_ports(AN0); |
221 |
svejda |
319 |
* |
245 |
kaklik |
320 |
01EC: BSF 03.5 |
|
|
321 |
01ED: BCF 1F.0 |
|
|
322 |
01EE: BSF 1F.1 |
|
|
323 |
01EF: BSF 1F.2 |
|
|
324 |
01F0: BSF 1F.3 |
237 |
kaklik |
325 |
.................... setup_adc(ADC_CLOCK_INTERNAL); |
245 |
kaklik |
326 |
01F1: BCF 1F.6 |
|
|
327 |
01F2: BCF 03.5 |
|
|
328 |
01F3: BSF 1F.6 |
|
|
329 |
01F4: BSF 1F.7 |
|
|
330 |
01F5: BSF 03.5 |
|
|
331 |
01F6: BCF 1F.7 |
|
|
332 |
01F7: BCF 03.5 |
|
|
333 |
01F8: BSF 1F.0 |
221 |
svejda |
334 |
.................... setup_psp(PSP_DISABLED); |
245 |
kaklik |
335 |
01F9: BSF 03.5 |
|
|
336 |
01FA: BCF 09.4 |
221 |
svejda |
337 |
.................... setup_spi(SPI_SS_DISABLED); |
|
|
338 |
* |
245 |
kaklik |
339 |
01E9: MOVLW FF |
|
|
340 |
01EA: BCF 03.5 |
|
|
341 |
01EB: MOVWF 34 |
221 |
svejda |
342 |
* |
245 |
kaklik |
343 |
01FB: BCF 03.5 |
|
|
344 |
01FC: BCF 14.5 |
|
|
345 |
01FD: BCF 34.5 |
|
|
346 |
01FE: MOVF 34,W |
|
|
347 |
01FF: BSF 03.5 |
|
|
348 |
0200: MOVWF 07 |
|
|
349 |
0201: BCF 03.5 |
|
|
350 |
0202: BSF 34.4 |
|
|
351 |
0203: MOVF 34,W |
|
|
352 |
0204: BSF 03.5 |
|
|
353 |
0205: MOVWF 07 |
|
|
354 |
0206: BCF 03.5 |
|
|
355 |
0207: BCF 34.3 |
|
|
356 |
0208: MOVF 34,W |
|
|
357 |
0209: BSF 03.5 |
|
|
358 |
020A: MOVWF 07 |
|
|
359 |
020B: MOVLW 01 |
|
|
360 |
020C: BCF 03.5 |
|
|
361 |
020D: MOVWF 14 |
|
|
362 |
020E: MOVLW 00 |
|
|
363 |
020F: BSF 03.5 |
|
|
364 |
0210: MOVWF 14 |
221 |
svejda |
365 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
245 |
kaklik |
366 |
0211: MOVF 01,W |
|
|
367 |
0212: ANDLW C7 |
|
|
368 |
0213: IORLW 08 |
|
|
369 |
0214: MOVWF 01 |
221 |
svejda |
370 |
.................... setup_wdt(WDT_2304MS); |
245 |
kaklik |
371 |
0215: MOVLW 0F |
|
|
372 |
0216: MOVWF 77 |
|
|
373 |
0217: MOVLW 07 |
|
|
374 |
0218: BCF 03.5 |
|
|
375 |
0219: CLRF 01 |
|
|
376 |
021A: MOVLW 81 |
|
|
377 |
021B: MOVWF 04 |
|
|
378 |
021C: MOVF 00,W |
|
|
379 |
021D: ANDLW F0 |
|
|
380 |
021E: IORLW 07 |
|
|
381 |
021F: MOVWF 00 |
|
|
382 |
0220: CLRWDT |
|
|
383 |
0221: MOVF 00,W |
|
|
384 |
0222: ANDLW F7 |
|
|
385 |
0223: BTFSC 77.3 |
|
|
386 |
0224: ANDLW F0 |
|
|
387 |
0225: IORWF 77,W |
|
|
388 |
0226: MOVWF 00 |
221 |
svejda |
389 |
.................... setup_timer_1(T1_DISABLED); |
245 |
kaklik |
390 |
0227: CLRF 10 |
221 |
svejda |
391 |
.................... setup_timer_2(T2_DISABLED,0,1); |
245 |
kaklik |
392 |
0228: MOVLW 00 |
|
|
393 |
0229: MOVWF 78 |
|
|
394 |
022A: MOVWF 12 |
|
|
395 |
022B: MOVLW 00 |
|
|
396 |
022C: BSF 03.5 |
|
|
397 |
022D: MOVWF 12 |
221 |
svejda |
398 |
.................... setup_comparator(NC_NC_NC_NC); |
245 |
kaklik |
399 |
022E: MOVLW 07 |
|
|
400 |
022F: MOVWF 1C |
|
|
401 |
0230: MOVF 05,W |
|
|
402 |
0231: CLRWDT |
|
|
403 |
0232: MOVLW 02 |
|
|
404 |
0233: MOVWF 77 |
|
|
405 |
0234: DECFSZ 77,F |
|
|
406 |
0235: GOTO 234 |
|
|
407 |
0236: NOP |
|
|
408 |
0237: NOP |
|
|
409 |
0238: MOVF 1C,W |
|
|
410 |
0239: BCF 03.5 |
|
|
411 |
023A: BCF 0D.6 |
221 |
svejda |
412 |
.................... setup_vref(FALSE); |
245 |
kaklik |
413 |
023B: BSF 03.5 |
|
|
414 |
023C: CLRF 1D |
221 |
svejda |
415 |
.................... |
|
|
416 |
.................... enable_interrupts(INT_RDA); |
245 |
kaklik |
417 |
023D: BSF 0C.5 |
221 |
svejda |
418 |
.................... enable_interrupts(GLOBAL); |
245 |
kaklik |
419 |
023E: MOVLW C0 |
|
|
420 |
023F: BCF 03.5 |
|
|
421 |
0240: IORWF 0B,F |
221 |
svejda |
422 |
.................... |
237 |
kaklik |
423 |
.................... set_adc_channel(0); // Prevodnik pro Hall |
245 |
kaklik |
424 |
0241: MOVLW 00 |
|
|
425 |
0242: MOVWF 78 |
|
|
426 |
0243: MOVF 1F,W |
|
|
427 |
0244: ANDLW C7 |
|
|
428 |
0245: IORWF 78,W |
|
|
429 |
0246: MOVWF 1F |
237 |
kaklik |
430 |
.................... output_B(0xFF); // Zhasneme |
245 |
kaklik |
431 |
0247: BSF 03.5 |
|
|
432 |
0248: CLRF 06 |
|
|
433 |
0249: MOVLW FF |
|
|
434 |
024A: BCF 03.5 |
|
|
435 |
024B: MOVWF 06 |
221 |
svejda |
436 |
.................... |
237 |
kaklik |
437 |
.................... otacky=0; |
245 |
kaklik |
438 |
024C: CLRF 33 |
240 |
kaklik |
439 |
.................... napis[0]=0; |
245 |
kaklik |
440 |
024D: CLRF 28 |
240 |
kaklik |
441 |
.................... |
221 |
svejda |
442 |
.................... while(TRUE) |
|
|
443 |
.................... { |
245 |
kaklik |
444 |
.................... int1 vyber; |
|
|
445 |
.................... |
|
|
446 |
.................... otacky++; |
|
|
447 |
024E: INCF 33,F |
|
|
448 |
.................... |
|
|
449 |
.................... if (napis[0]!=0 && otacky <= 30) |
|
|
450 |
024F: MOVF 28,F |
|
|
451 |
0250: BTFSC 03.2 |
|
|
452 |
0251: GOTO 258 |
|
|
453 |
0252: MOVF 33,W |
|
|
454 |
0253: SUBLW 1E |
|
|
455 |
0254: BTFSS 03.0 |
|
|
456 |
0255: GOTO 258 |
240 |
kaklik |
457 |
.................... { |
241 |
kaklik |
458 |
.................... LED_print(); |
245 |
kaklik |
459 |
0256: GOTO 193 |
240 |
kaklik |
460 |
.................... } |
241 |
kaklik |
461 |
.................... else |
245 |
kaklik |
462 |
0257: GOTO 27B |
221 |
svejda |
463 |
.................... { |
245 |
kaklik |
464 |
.................... if (vyber == 0) strcpy(napis,logo); |
|
|
465 |
0258: BTFSC 35.0 |
|
|
466 |
0259: GOTO 26A |
|
|
467 |
025A: CLRF 36 |
|
|
468 |
025B: CLRF 37 |
|
|
469 |
025C: MOVLW 28 |
|
|
470 |
025D: MOVWF 04 |
|
|
471 |
025E: MOVF 36,W |
|
|
472 |
025F: ADDWF 04,F |
|
|
473 |
0260: MOVF 37,W |
|
|
474 |
0261: CALL 035 |
|
|
475 |
0262: MOVWF 00 |
|
|
476 |
0263: IORLW 00 |
|
|
477 |
0264: BTFSC 03.2 |
|
|
478 |
0265: GOTO 269 |
|
|
479 |
0266: INCF 37,F |
|
|
480 |
0267: INCF 36,F |
|
|
481 |
0268: GOTO 25C |
|
|
482 |
.................... else strcpy(napis,rok); |
|
|
483 |
0269: GOTO 279 |
|
|
484 |
026A: CLRF 36 |
|
|
485 |
026B: CLRF 37 |
|
|
486 |
026C: MOVLW 28 |
|
|
487 |
026D: MOVWF 04 |
|
|
488 |
026E: MOVF 36,W |
|
|
489 |
026F: ADDWF 04,F |
|
|
490 |
0270: MOVF 37,W |
|
|
491 |
0271: CALL 044 |
|
|
492 |
0272: MOVWF 00 |
|
|
493 |
0273: IORLW 00 |
|
|
494 |
0274: BTFSC 03.2 |
|
|
495 |
0275: GOTO 279 |
|
|
496 |
0276: INCF 37,F |
|
|
497 |
0277: INCF 36,F |
|
|
498 |
0278: GOTO 26C |
|
|
499 |
.................... vyber++; |
|
|
500 |
0279: MOVLW 01 |
|
|
501 |
027A: XORWF 35,F |
221 |
svejda |
502 |
.................... } |
240 |
kaklik |
503 |
.................... } |
245 |
kaklik |
504 |
027B: GOTO 24E |
221 |
svejda |
505 |
.................... } |
245 |
kaklik |
506 |
027C: SLEEP |
221 |
svejda |
507 |
|
|
|
508 |
Configuration Fuses: |
237 |
kaklik |
509 |
Word 1: 3F3D XT WDT NOPUT NODEBUG NOPROTECT NOBROWNOUT NOLVP NOCPD NOWRT |