2953 |
jacho |
1 |
CCS PCM C Compiler, Version 4.106, 47914 22-4-13 22:27 |
|
|
2 |
|
|
|
3 |
Filename: C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\main.lst |
|
|
4 |
|
|
|
5 |
ROM used: 1306 words (16%) |
|
|
6 |
Largest free fragment is 2048 |
|
|
7 |
RAM used: 6 (2%) at main() level |
|
|
8 |
22 (6%) worst case |
|
|
9 |
Stack: 2 locations |
|
|
10 |
|
|
|
11 |
* |
|
|
12 |
0000: MOVLW 01 |
|
|
13 |
0001: MOVWF 0A |
|
|
14 |
0002: GOTO 19B |
|
|
15 |
0003: NOP |
|
|
16 |
.................... #include "C:\Users\Honza\Documents\pic\I2C_bat_pam\V_MAX\main.h" |
|
|
17 |
.................... #include <16F887.h> |
|
|
18 |
.................... //////// Standard Header file for the PIC16F887 device //////////////// |
|
|
19 |
.................... #device PIC16F887 |
|
|
20 |
.................... #list |
|
|
21 |
.................... |
|
|
22 |
.................... #device adc=8 |
|
|
23 |
.................... |
|
|
24 |
.................... #FUSES NOWDT //No Watch Dog Timer |
|
|
25 |
.................... #FUSES INTRC //Internal RC Osc |
|
|
26 |
.................... #FUSES NOPUT //No Power Up Timer |
|
|
27 |
.................... #FUSES MCLR //Master Clear pin enabled |
|
|
28 |
.................... #FUSES NOPROTECT //Code not protected from reading |
|
|
29 |
.................... #FUSES NOCPD //No EE protection |
|
|
30 |
.................... #FUSES NOBROWNOUT //No brownout reset |
|
|
31 |
.................... #FUSES IESO //Internal External Switch Over mode enabled |
|
|
32 |
.................... #FUSES FCMEN //Fail-safe clock monitor enabled |
|
|
33 |
.................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O |
|
|
34 |
.................... #FUSES NODEBUG //No Debug mode for ICD |
|
|
35 |
.................... #FUSES NOWRT //Program memory not write protected |
|
|
36 |
.................... #FUSES BORV40 //Brownout reset at 4.0V |
|
|
37 |
.................... |
|
|
38 |
.................... #use delay(clock=8000000) |
|
|
39 |
* |
|
|
40 |
00D0: MOVLW 2C |
|
|
41 |
00D1: MOVWF 04 |
|
|
42 |
00D2: BCF 03.7 |
|
|
43 |
00D3: MOVF 00,W |
|
|
44 |
00D4: BTFSC 03.2 |
|
|
45 |
00D5: GOTO 0E3 |
|
|
46 |
00D6: MOVLW 02 |
|
|
47 |
00D7: MOVWF 78 |
|
|
48 |
00D8: CLRF 77 |
|
|
49 |
00D9: DECFSZ 77,F |
|
|
50 |
00DA: GOTO 0D9 |
|
|
51 |
00DB: DECFSZ 78,F |
|
|
52 |
00DC: GOTO 0D8 |
|
|
53 |
00DD: MOVLW 97 |
|
|
54 |
00DE: MOVWF 77 |
|
|
55 |
00DF: DECFSZ 77,F |
|
|
56 |
00E0: GOTO 0DF |
|
|
57 |
00E1: DECFSZ 00,F |
|
|
58 |
00E2: GOTO 0D6 |
|
|
59 |
00E3: RETURN |
|
|
60 |
.................... |
|
|
61 |
.................... |
|
|
62 |
.................... |
|
|
63 |
.................... |
|
|
64 |
.................... #define EEPROM_SDA PIN_C4 |
|
|
65 |
.................... #define EEPROM_SCL PIN_C3 |
|
|
66 |
.................... #use i2c(master, sda=EEPROM_SDA, scl=EEPROM_SCL) |
|
|
67 |
* |
|
|
68 |
0086: MOVLW 08 |
|
|
69 |
0087: MOVWF 78 |
|
|
70 |
0088: NOP |
|
|
71 |
0089: BCF 07.3 |
|
|
72 |
008A: BCF 20.3 |
|
|
73 |
008B: MOVF 20,W |
|
|
74 |
008C: BSF 03.5 |
|
|
75 |
008D: MOVWF 07 |
|
|
76 |
008E: NOP |
|
|
77 |
008F: BCF 03.5 |
|
|
78 |
0090: RLF 2C,F |
|
|
79 |
0091: BCF 07.4 |
|
|
80 |
0092: BTFSS 03.0 |
|
|
81 |
0093: GOTO 09A |
|
|
82 |
0094: BSF 20.4 |
|
|
83 |
0095: MOVF 20,W |
|
|
84 |
0096: BSF 03.5 |
|
|
85 |
0097: MOVWF 07 |
|
|
86 |
0098: GOTO 09E |
|
|
87 |
0099: BCF 03.5 |
|
|
88 |
009A: BCF 20.4 |
|
|
89 |
009B: MOVF 20,W |
|
|
90 |
009C: BSF 03.5 |
|
|
91 |
009D: MOVWF 07 |
|
|
92 |
009E: NOP |
|
|
93 |
009F: BCF 03.5 |
|
|
94 |
00A0: BSF 20.3 |
|
|
95 |
00A1: MOVF 20,W |
|
|
96 |
00A2: BSF 03.5 |
|
|
97 |
00A3: MOVWF 07 |
|
|
98 |
00A4: BCF 03.5 |
|
|
99 |
00A5: BTFSS 07.3 |
|
|
100 |
00A6: GOTO 0A5 |
|
|
101 |
00A7: DECFSZ 78,F |
|
|
102 |
00A8: GOTO 088 |
|
|
103 |
00A9: NOP |
|
|
104 |
00AA: BCF 07.3 |
|
|
105 |
00AB: BCF 20.3 |
|
|
106 |
00AC: MOVF 20,W |
|
|
107 |
00AD: BSF 03.5 |
|
|
108 |
00AE: MOVWF 07 |
|
|
109 |
00AF: NOP |
|
|
110 |
00B0: BCF 03.5 |
|
|
111 |
00B1: BSF 20.4 |
|
|
112 |
00B2: MOVF 20,W |
|
|
113 |
00B3: BSF 03.5 |
|
|
114 |
00B4: MOVWF 07 |
|
|
115 |
00B5: NOP |
|
|
116 |
00B6: NOP |
|
|
117 |
00B7: BCF 03.5 |
|
|
118 |
00B8: BSF 20.3 |
|
|
119 |
00B9: MOVF 20,W |
|
|
120 |
00BA: BSF 03.5 |
|
|
121 |
00BB: MOVWF 07 |
|
|
122 |
00BC: BCF 03.5 |
|
|
123 |
00BD: BTFSS 07.3 |
|
|
124 |
00BE: GOTO 0BD |
|
|
125 |
00BF: CLRF 78 |
|
|
126 |
00C0: NOP |
|
|
127 |
00C1: BTFSC 07.4 |
|
|
128 |
00C2: BSF 78.0 |
|
|
129 |
00C3: BCF 07.3 |
|
|
130 |
00C4: BCF 20.3 |
|
|
131 |
00C5: MOVF 20,W |
|
|
132 |
00C6: BSF 03.5 |
|
|
133 |
00C7: MOVWF 07 |
|
|
134 |
00C8: BCF 03.5 |
|
|
135 |
00C9: BCF 07.4 |
|
|
136 |
00CA: BCF 20.4 |
|
|
137 |
00CB: MOVF 20,W |
|
|
138 |
00CC: BSF 03.5 |
|
|
139 |
00CD: MOVWF 07 |
|
|
140 |
00CE: BCF 03.5 |
|
|
141 |
00CF: RETURN |
|
|
142 |
* |
|
|
143 |
00E4: MOVLW 08 |
|
|
144 |
00E5: MOVWF 2D |
|
|
145 |
00E6: MOVF 77,W |
|
|
146 |
00E7: MOVWF 2E |
|
|
147 |
00E8: BSF 20.4 |
|
|
148 |
00E9: MOVF 20,W |
|
|
149 |
00EA: BSF 03.5 |
|
|
150 |
00EB: MOVWF 07 |
|
|
151 |
00EC: NOP |
|
|
152 |
00ED: BCF 03.5 |
|
|
153 |
00EE: BSF 20.3 |
|
|
154 |
00EF: MOVF 20,W |
|
|
155 |
00F0: BSF 03.5 |
|
|
156 |
00F1: MOVWF 07 |
|
|
157 |
00F2: BCF 03.5 |
|
|
158 |
00F3: BTFSS 07.3 |
|
|
159 |
00F4: GOTO 0F3 |
|
|
160 |
00F5: BTFSC 07.4 |
|
|
161 |
00F6: BSF 03.0 |
|
|
162 |
00F7: BTFSS 07.4 |
|
|
163 |
00F8: BCF 03.0 |
|
|
164 |
00F9: RLF 78,F |
|
|
165 |
00FA: NOP |
|
|
166 |
00FB: BCF 20.3 |
|
|
167 |
00FC: MOVF 20,W |
|
|
168 |
00FD: BSF 03.5 |
|
|
169 |
00FE: MOVWF 07 |
|
|
170 |
00FF: BCF 03.5 |
|
|
171 |
0100: BCF 07.3 |
|
|
172 |
0101: DECFSZ 2D,F |
|
|
173 |
0102: GOTO 0E8 |
|
|
174 |
0103: BSF 20.4 |
|
|
175 |
0104: MOVF 20,W |
|
|
176 |
0105: BSF 03.5 |
|
|
177 |
0106: MOVWF 07 |
|
|
178 |
0107: NOP |
|
|
179 |
0108: BCF 03.5 |
|
|
180 |
0109: BCF 07.4 |
|
|
181 |
010A: MOVF 2E,W |
|
|
182 |
010B: BTFSC 03.2 |
|
|
183 |
010C: GOTO 112 |
|
|
184 |
010D: BCF 20.4 |
|
|
185 |
010E: MOVF 20,W |
|
|
186 |
010F: BSF 03.5 |
|
|
187 |
0110: MOVWF 07 |
|
|
188 |
0111: BCF 03.5 |
|
|
189 |
0112: NOP |
|
|
190 |
0113: BSF 20.3 |
|
|
191 |
0114: MOVF 20,W |
|
|
192 |
0115: BSF 03.5 |
|
|
193 |
0116: MOVWF 07 |
|
|
194 |
0117: BCF 03.5 |
|
|
195 |
0118: BTFSS 07.3 |
|
|
196 |
0119: GOTO 118 |
|
|
197 |
011A: NOP |
|
|
198 |
011B: BCF 07.3 |
|
|
199 |
011C: BCF 20.3 |
|
|
200 |
011D: MOVF 20,W |
|
|
201 |
011E: BSF 03.5 |
|
|
202 |
011F: MOVWF 07 |
|
|
203 |
0120: NOP |
|
|
204 |
0121: BCF 03.5 |
|
|
205 |
0122: BCF 07.4 |
|
|
206 |
0123: BCF 20.4 |
|
|
207 |
0124: MOVF 20,W |
|
|
208 |
0125: BSF 03.5 |
|
|
209 |
0126: MOVWF 07 |
|
|
210 |
0127: BCF 03.5 |
|
|
211 |
0128: RETURN |
|
|
212 |
.................... #use rs232(baud=9600,parity=N,xmit=PIN_C7,rcv=PIN_C6,bits=8) //rcv TXD xmit RXD |
|
|
213 |
* |
|
|
214 |
001A: BCF 20.7 |
|
|
215 |
001B: MOVF 20,W |
|
|
216 |
001C: BSF 03.5 |
|
|
217 |
001D: MOVWF 07 |
|
|
218 |
001E: BCF 03.5 |
|
|
219 |
001F: BCF 07.7 |
|
|
220 |
0020: MOVLW 08 |
|
|
221 |
0021: MOVWF 78 |
|
|
222 |
0022: GOTO 023 |
|
|
223 |
0023: NOP |
|
|
224 |
0024: BSF 78.7 |
|
|
225 |
0025: GOTO 034 |
|
|
226 |
0026: BCF 78.7 |
|
|
227 |
0027: RRF 30,F |
|
|
228 |
0028: BTFSC 03.0 |
|
|
229 |
0029: BSF 07.7 |
|
|
230 |
002A: BTFSS 03.0 |
|
|
231 |
002B: BCF 07.7 |
|
|
232 |
002C: BSF 78.6 |
|
|
233 |
002D: GOTO 034 |
|
|
234 |
002E: BCF 78.6 |
|
|
235 |
002F: DECFSZ 78,F |
|
|
236 |
0030: GOTO 027 |
|
|
237 |
0031: GOTO 032 |
|
|
238 |
0032: NOP |
|
|
239 |
0033: BSF 07.7 |
|
|
240 |
0034: MOVLW 3F |
|
|
241 |
0035: MOVWF 04 |
|
|
242 |
0036: DECFSZ 04,F |
|
|
243 |
0037: GOTO 036 |
|
|
244 |
0038: NOP |
|
|
245 |
0039: BTFSC 78.7 |
|
|
246 |
003A: GOTO 026 |
|
|
247 |
003B: BTFSC 78.6 |
|
|
248 |
003C: GOTO 02E |
|
|
249 |
003D: RETURN |
|
|
250 |
.................... |
|
|
251 |
.................... |
|
|
252 |
.................... void main() |
|
|
253 |
.................... { |
|
|
254 |
* |
|
|
255 |
019B: CLRF 04 |
|
|
256 |
019C: BCF 03.7 |
|
|
257 |
019D: MOVLW 1F |
|
|
258 |
019E: ANDWF 03,F |
|
|
259 |
019F: MOVLW 71 |
|
|
260 |
01A0: BSF 03.5 |
|
|
261 |
01A1: MOVWF 0F |
|
|
262 |
01A2: MOVF 0F,W |
|
|
263 |
01A3: BCF 03.5 |
|
|
264 |
01A4: BCF 20.7 |
|
|
265 |
01A5: MOVF 20,W |
|
|
266 |
01A6: BSF 03.5 |
|
|
267 |
01A7: MOVWF 07 |
|
|
268 |
01A8: BCF 03.5 |
|
|
269 |
01A9: BSF 07.7 |
|
|
270 |
01AA: BSF 03.5 |
|
|
271 |
01AB: BSF 03.6 |
|
|
272 |
01AC: MOVF 09,W |
|
|
273 |
01AD: ANDLW C0 |
|
|
274 |
01AE: MOVWF 09 |
|
|
275 |
01AF: BCF 03.6 |
|
|
276 |
01B0: BCF 1F.4 |
|
|
277 |
01B1: BCF 1F.5 |
|
|
278 |
01B2: MOVLW 00 |
|
|
279 |
01B3: BSF 03.6 |
|
|
280 |
01B4: MOVWF 08 |
|
|
281 |
01B5: BCF 03.5 |
|
|
282 |
01B6: CLRF 07 |
|
|
283 |
01B7: CLRF 08 |
|
|
284 |
01B8: CLRF 09 |
|
|
285 |
.................... |
|
|
286 |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
|
|
287 |
* |
|
|
288 |
01BC: BSF 03.5 |
|
|
289 |
01BD: BSF 03.6 |
|
|
290 |
01BE: MOVF 09,W |
|
|
291 |
01BF: ANDLW C0 |
|
|
292 |
01C0: MOVWF 09 |
|
|
293 |
01C1: BCF 03.6 |
|
|
294 |
01C2: BCF 1F.4 |
|
|
295 |
01C3: BCF 1F.5 |
|
|
296 |
01C4: MOVLW 00 |
|
|
297 |
01C5: BSF 03.6 |
|
|
298 |
01C6: MOVWF 08 |
|
|
299 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
|
|
300 |
01C7: BCF 03.5 |
|
|
301 |
01C8: BCF 03.6 |
|
|
302 |
01C9: BCF 1F.6 |
|
|
303 |
01CA: BCF 1F.7 |
|
|
304 |
01CB: BSF 03.5 |
|
|
305 |
01CC: BCF 1F.7 |
|
|
306 |
01CD: BCF 03.5 |
|
|
307 |
01CE: BSF 1F.0 |
|
|
308 |
.................... setup_spi(SPI_SS_DISABLED); |
|
|
309 |
01CF: BCF 14.5 |
|
|
310 |
01D0: BCF 20.5 |
|
|
311 |
01D1: MOVF 20,W |
|
|
312 |
01D2: BSF 03.5 |
|
|
313 |
01D3: MOVWF 07 |
|
|
314 |
01D4: BCF 03.5 |
|
|
315 |
01D5: BSF 20.4 |
|
|
316 |
01D6: MOVF 20,W |
|
|
317 |
01D7: BSF 03.5 |
|
|
318 |
01D8: MOVWF 07 |
|
|
319 |
01D9: BCF 03.5 |
|
|
320 |
01DA: BCF 20.3 |
|
|
321 |
01DB: MOVF 20,W |
|
|
322 |
01DC: BSF 03.5 |
|
|
323 |
01DD: MOVWF 07 |
|
|
324 |
01DE: MOVLW 01 |
|
|
325 |
01DF: BCF 03.5 |
|
|
326 |
01E0: MOVWF 14 |
|
|
327 |
01E1: MOVLW 00 |
|
|
328 |
01E2: BSF 03.5 |
|
|
329 |
01E3: MOVWF 14 |
|
|
330 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
|
|
331 |
01E4: MOVF 01,W |
|
|
332 |
01E5: ANDLW C7 |
|
|
333 |
01E6: IORLW 08 |
|
|
334 |
01E7: MOVWF 01 |
|
|
335 |
.................... setup_timer_1(T1_DISABLED); |
|
|
336 |
01E8: BCF 03.5 |
|
|
337 |
01E9: CLRF 10 |
|
|
338 |
.................... setup_timer_2(T2_DISABLED,0,1); |
|
|
339 |
01EA: MOVLW 00 |
|
|
340 |
01EB: MOVWF 78 |
|
|
341 |
01EC: MOVWF 12 |
|
|
342 |
01ED: MOVLW 00 |
|
|
343 |
01EE: BSF 03.5 |
|
|
344 |
01EF: MOVWF 12 |
|
|
345 |
.................... setup_ccp1(CCP_OFF); |
|
|
346 |
01F0: BCF 03.5 |
|
|
347 |
01F1: BSF 20.2 |
|
|
348 |
01F2: MOVF 20,W |
|
|
349 |
01F3: BSF 03.5 |
|
|
350 |
01F4: MOVWF 07 |
|
|
351 |
01F5: BCF 03.5 |
|
|
352 |
01F6: CLRF 17 |
|
|
353 |
01F7: BSF 03.5 |
|
|
354 |
01F8: CLRF 1B |
|
|
355 |
01F9: CLRF 1C |
|
|
356 |
01FA: MOVLW 01 |
|
|
357 |
01FB: MOVWF 1D |
|
|
358 |
.................... setup_comparator(NC_NC_NC_NC);// This device COMP currently not supported by the PICWizard |
|
|
359 |
01FC: BCF 03.5 |
|
|
360 |
01FD: BSF 03.6 |
|
|
361 |
01FE: CLRF 07 |
|
|
362 |
01FF: CLRF 08 |
|
|
363 |
0200: CLRF 09 |
|
|
364 |
.................... |
|
|
365 |
.................... printf("Simple Thermomether \r\n",); |
|
|
366 |
0201: MOVLW 04 |
|
|
367 |
0202: MOVWF 0D |
|
|
368 |
0203: MOVLW 00 |
|
|
369 |
0204: MOVWF 0F |
|
|
370 |
0205: BCF 03.6 |
|
|
371 |
0206: GOTO 03E |
|
|
372 |
.................... unsigned int8 STAV1,STAV2; |
|
|
373 |
.................... |
|
|
374 |
.................... unsigned int16 SOUCET, SOUCET1; |
|
|
375 |
.................... unsigned int8 LSB=0,ZK,k=0,VH,VL; |
|
|
376 |
0207: CLRF 27 |
|
|
377 |
0208: CLRF 29 |
|
|
378 |
.................... //unsigned int8 |
|
|
379 |
.................... |
|
|
380 |
.................... while(TRUE) |
|
|
381 |
.................... { |
|
|
382 |
.................... |
|
|
383 |
.................... |
|
|
384 |
.................... |
|
|
385 |
.................... |
|
|
386 |
.................... i2c_start(); //blockdatacontrol |
|
|
387 |
0209: BSF 20.4 |
|
|
388 |
020A: MOVF 20,W |
|
|
389 |
020B: BSF 03.5 |
|
|
390 |
020C: MOVWF 07 |
|
|
391 |
020D: NOP |
|
|
392 |
020E: BCF 03.5 |
|
|
393 |
020F: BSF 20.3 |
|
|
394 |
0210: MOVF 20,W |
|
|
395 |
0211: BSF 03.5 |
|
|
396 |
0212: MOVWF 07 |
|
|
397 |
0213: NOP |
|
|
398 |
0214: BCF 03.5 |
|
|
399 |
0215: BCF 07.4 |
|
|
400 |
0216: BCF 20.4 |
|
|
401 |
0217: MOVF 20,W |
|
|
402 |
0218: BSF 03.5 |
|
|
403 |
0219: MOVWF 07 |
|
|
404 |
021A: NOP |
|
|
405 |
021B: BCF 03.5 |
|
|
406 |
021C: BCF 07.3 |
|
|
407 |
021D: BCF 20.3 |
|
|
408 |
021E: MOVF 20,W |
|
|
409 |
021F: BSF 03.5 |
|
|
410 |
0220: MOVWF 07 |
|
|
411 |
.................... I2C_Write(0xAA); |
|
|
412 |
0221: MOVLW AA |
|
|
413 |
0222: BCF 03.5 |
|
|
414 |
0223: MOVWF 2C |
|
|
415 |
0224: CALL 086 |
|
|
416 |
.................... I2C_write(0x61); |
|
|
417 |
0225: MOVLW 61 |
|
|
418 |
0226: MOVWF 2C |
|
|
419 |
0227: CALL 086 |
|
|
420 |
.................... i2c_start(); |
|
|
421 |
0228: BSF 20.4 |
|
|
422 |
0229: MOVF 20,W |
|
|
423 |
022A: BSF 03.5 |
|
|
424 |
022B: MOVWF 07 |
|
|
425 |
022C: NOP |
|
|
426 |
022D: BCF 03.5 |
|
|
427 |
022E: BSF 20.3 |
|
|
428 |
022F: MOVF 20,W |
|
|
429 |
0230: BSF 03.5 |
|
|
430 |
0231: MOVWF 07 |
|
|
431 |
0232: NOP |
|
|
432 |
0233: BCF 03.5 |
|
|
433 |
0234: BTFSS 07.3 |
|
|
434 |
0235: GOTO 234 |
|
|
435 |
0236: BCF 07.4 |
|
|
436 |
0237: BCF 20.4 |
|
|
437 |
0238: MOVF 20,W |
|
|
438 |
0239: BSF 03.5 |
|
|
439 |
023A: MOVWF 07 |
|
|
440 |
023B: NOP |
|
|
441 |
023C: BCF 03.5 |
|
|
442 |
023D: BCF 07.3 |
|
|
443 |
023E: BCF 20.3 |
|
|
444 |
023F: MOVF 20,W |
|
|
445 |
0240: BSF 03.5 |
|
|
446 |
0241: MOVWF 07 |
|
|
447 |
.................... I2C_Write(0xAA); |
|
|
448 |
0242: MOVLW AA |
|
|
449 |
0243: BCF 03.5 |
|
|
450 |
0244: MOVWF 2C |
|
|
451 |
0245: CALL 086 |
|
|
452 |
.................... i2c_write(0x00); |
|
|
453 |
0246: CLRF 2C |
|
|
454 |
0247: CALL 086 |
|
|
455 |
.................... i2c_stop(); |
|
|
456 |
0248: BCF 20.4 |
|
|
457 |
0249: MOVF 20,W |
|
|
458 |
024A: BSF 03.5 |
|
|
459 |
024B: MOVWF 07 |
|
|
460 |
024C: NOP |
|
|
461 |
024D: BCF 03.5 |
|
|
462 |
024E: BSF 20.3 |
|
|
463 |
024F: MOVF 20,W |
|
|
464 |
0250: BSF 03.5 |
|
|
465 |
0251: MOVWF 07 |
|
|
466 |
0252: BCF 03.5 |
|
|
467 |
0253: BTFSS 07.3 |
|
|
468 |
0254: GOTO 253 |
|
|
469 |
0255: NOP |
|
|
470 |
0256: GOTO 257 |
|
|
471 |
0257: NOP |
|
|
472 |
0258: BSF 20.4 |
|
|
473 |
0259: MOVF 20,W |
|
|
474 |
025A: BSF 03.5 |
|
|
475 |
025B: MOVWF 07 |
|
|
476 |
025C: NOP |
|
|
477 |
.................... delay_ms (1); |
|
|
478 |
025D: MOVLW 01 |
|
|
479 |
025E: BCF 03.5 |
|
|
480 |
025F: MOVWF 2C |
|
|
481 |
0260: CALL 0D0 |
|
|
482 |
.................... |
|
|
483 |
.................... |
|
|
484 |
.................... i2c_start();//dataflashclass |
|
|
485 |
0261: BSF 20.4 |
|
|
486 |
0262: MOVF 20,W |
|
|
487 |
0263: BSF 03.5 |
|
|
488 |
0264: MOVWF 07 |
|
|
489 |
0265: NOP |
|
|
490 |
0266: BCF 03.5 |
|
|
491 |
0267: BSF 20.3 |
|
|
492 |
0268: MOVF 20,W |
|
|
493 |
0269: BSF 03.5 |
|
|
494 |
026A: MOVWF 07 |
|
|
495 |
026B: NOP |
|
|
496 |
026C: BCF 03.5 |
|
|
497 |
026D: BCF 07.4 |
|
|
498 |
026E: BCF 20.4 |
|
|
499 |
026F: MOVF 20,W |
|
|
500 |
0270: BSF 03.5 |
|
|
501 |
0271: MOVWF 07 |
|
|
502 |
0272: NOP |
|
|
503 |
0273: BCF 03.5 |
|
|
504 |
0274: BCF 07.3 |
|
|
505 |
0275: BCF 20.3 |
|
|
506 |
0276: MOVF 20,W |
|
|
507 |
0277: BSF 03.5 |
|
|
508 |
0278: MOVWF 07 |
|
|
509 |
.................... I2C_Write(0xAA); |
|
|
510 |
0279: MOVLW AA |
|
|
511 |
027A: BCF 03.5 |
|
|
512 |
027B: MOVWF 2C |
|
|
513 |
027C: CALL 086 |
|
|
514 |
.................... I2C_write(0x3e); |
|
|
515 |
027D: MOVLW 3E |
|
|
516 |
027E: MOVWF 2C |
|
|
517 |
027F: CALL 086 |
|
|
518 |
.................... |
|
|
519 |
.................... i2c_start(); |
|
|
520 |
0280: BSF 20.4 |
|
|
521 |
0281: MOVF 20,W |
|
|
522 |
0282: BSF 03.5 |
|
|
523 |
0283: MOVWF 07 |
|
|
524 |
0284: NOP |
|
|
525 |
0285: BCF 03.5 |
|
|
526 |
0286: BSF 20.3 |
|
|
527 |
0287: MOVF 20,W |
|
|
528 |
0288: BSF 03.5 |
|
|
529 |
0289: MOVWF 07 |
|
|
530 |
028A: NOP |
|
|
531 |
028B: BCF 03.5 |
|
|
532 |
028C: BTFSS 07.3 |
|
|
533 |
028D: GOTO 28C |
|
|
534 |
028E: BCF 07.4 |
|
|
535 |
028F: BCF 20.4 |
|
|
536 |
0290: MOVF 20,W |
|
|
537 |
0291: BSF 03.5 |
|
|
538 |
0292: MOVWF 07 |
|
|
539 |
0293: NOP |
|
|
540 |
0294: BCF 03.5 |
|
|
541 |
0295: BCF 07.3 |
|
|
542 |
0296: BCF 20.3 |
|
|
543 |
0297: MOVF 20,W |
|
|
544 |
0298: BSF 03.5 |
|
|
545 |
0299: MOVWF 07 |
|
|
546 |
.................... I2C_Write(0xAA); |
|
|
547 |
029A: MOVLW AA |
|
|
548 |
029B: BCF 03.5 |
|
|
549 |
029C: MOVWF 2C |
|
|
550 |
029D: CALL 086 |
|
|
551 |
.................... i2c_write(0x52); |
|
|
552 |
029E: MOVLW 52 |
|
|
553 |
029F: MOVWF 2C |
|
|
554 |
02A0: CALL 086 |
|
|
555 |
.................... i2c_stop(); |
|
|
556 |
02A1: BCF 20.4 |
|
|
557 |
02A2: MOVF 20,W |
|
|
558 |
02A3: BSF 03.5 |
|
|
559 |
02A4: MOVWF 07 |
|
|
560 |
02A5: NOP |
|
|
561 |
02A6: BCF 03.5 |
|
|
562 |
02A7: BSF 20.3 |
|
|
563 |
02A8: MOVF 20,W |
|
|
564 |
02A9: BSF 03.5 |
|
|
565 |
02AA: MOVWF 07 |
|
|
566 |
02AB: BCF 03.5 |
|
|
567 |
02AC: BTFSS 07.3 |
|
|
568 |
02AD: GOTO 2AC |
|
|
569 |
02AE: NOP |
|
|
570 |
02AF: GOTO 2B0 |
|
|
571 |
02B0: NOP |
|
|
572 |
02B1: BSF 20.4 |
|
|
573 |
02B2: MOVF 20,W |
|
|
574 |
02B3: BSF 03.5 |
|
|
575 |
02B4: MOVWF 07 |
|
|
576 |
02B5: NOP |
|
|
577 |
.................... delay_ms (1); |
|
|
578 |
02B6: MOVLW 01 |
|
|
579 |
02B7: BCF 03.5 |
|
|
580 |
02B8: MOVWF 2C |
|
|
581 |
02B9: CALL 0D0 |
|
|
582 |
.................... |
|
|
583 |
.................... |
|
|
584 |
.................... i2c_start();//dataflashblock |
|
|
585 |
02BA: BSF 20.4 |
|
|
586 |
02BB: MOVF 20,W |
|
|
587 |
02BC: BSF 03.5 |
|
|
588 |
02BD: MOVWF 07 |
|
|
589 |
02BE: NOP |
|
|
590 |
02BF: BCF 03.5 |
|
|
591 |
02C0: BSF 20.3 |
|
|
592 |
02C1: MOVF 20,W |
|
|
593 |
02C2: BSF 03.5 |
|
|
594 |
02C3: MOVWF 07 |
|
|
595 |
02C4: NOP |
|
|
596 |
02C5: BCF 03.5 |
|
|
597 |
02C6: BCF 07.4 |
|
|
598 |
02C7: BCF 20.4 |
|
|
599 |
02C8: MOVF 20,W |
|
|
600 |
02C9: BSF 03.5 |
|
|
601 |
02CA: MOVWF 07 |
|
|
602 |
02CB: NOP |
|
|
603 |
02CC: BCF 03.5 |
|
|
604 |
02CD: BCF 07.3 |
|
|
605 |
02CE: BCF 20.3 |
|
|
606 |
02CF: MOVF 20,W |
|
|
607 |
02D0: BSF 03.5 |
|
|
608 |
02D1: MOVWF 07 |
|
|
609 |
.................... I2C_Write(0xAA); |
|
|
610 |
02D2: MOVLW AA |
|
|
611 |
02D3: BCF 03.5 |
|
|
612 |
02D4: MOVWF 2C |
|
|
613 |
02D5: CALL 086 |
|
|
614 |
.................... I2C_write(0x3f); |
|
|
615 |
02D6: MOVLW 3F |
|
|
616 |
02D7: MOVWF 2C |
|
|
617 |
02D8: CALL 086 |
|
|
618 |
.................... |
|
|
619 |
.................... i2c_start(); |
|
|
620 |
02D9: BSF 20.4 |
|
|
621 |
02DA: MOVF 20,W |
|
|
622 |
02DB: BSF 03.5 |
|
|
623 |
02DC: MOVWF 07 |
|
|
624 |
02DD: NOP |
|
|
625 |
02DE: BCF 03.5 |
|
|
626 |
02DF: BSF 20.3 |
|
|
627 |
02E0: MOVF 20,W |
|
|
628 |
02E1: BSF 03.5 |
|
|
629 |
02E2: MOVWF 07 |
|
|
630 |
02E3: NOP |
|
|
631 |
02E4: BCF 03.5 |
|
|
632 |
02E5: BTFSS 07.3 |
|
|
633 |
02E6: GOTO 2E5 |
|
|
634 |
02E7: BCF 07.4 |
|
|
635 |
02E8: BCF 20.4 |
|
|
636 |
02E9: MOVF 20,W |
|
|
637 |
02EA: BSF 03.5 |
|
|
638 |
02EB: MOVWF 07 |
|
|
639 |
02EC: NOP |
|
|
640 |
02ED: BCF 03.5 |
|
|
641 |
02EE: BCF 07.3 |
|
|
642 |
02EF: BCF 20.3 |
|
|
643 |
02F0: MOVF 20,W |
|
|
644 |
02F1: BSF 03.5 |
|
|
645 |
02F2: MOVWF 07 |
|
|
646 |
.................... I2C_Write(0xAA); |
|
|
647 |
02F3: MOVLW AA |
|
|
648 |
02F4: BCF 03.5 |
|
|
649 |
02F5: MOVWF 2C |
|
|
650 |
02F6: CALL 086 |
|
|
651 |
.................... I2C_write(0x00); |
|
|
652 |
02F7: CLRF 2C |
|
|
653 |
02F8: CALL 086 |
|
|
654 |
.................... i2c_stop(); |
|
|
655 |
02F9: BCF 20.4 |
|
|
656 |
02FA: MOVF 20,W |
|
|
657 |
02FB: BSF 03.5 |
|
|
658 |
02FC: MOVWF 07 |
|
|
659 |
02FD: NOP |
|
|
660 |
02FE: BCF 03.5 |
|
|
661 |
02FF: BSF 20.3 |
|
|
662 |
0300: MOVF 20,W |
|
|
663 |
0301: BSF 03.5 |
|
|
664 |
0302: MOVWF 07 |
|
|
665 |
0303: BCF 03.5 |
|
|
666 |
0304: BTFSS 07.3 |
|
|
667 |
0305: GOTO 304 |
|
|
668 |
0306: NOP |
|
|
669 |
0307: GOTO 308 |
|
|
670 |
0308: NOP |
|
|
671 |
0309: BSF 20.4 |
|
|
672 |
030A: MOVF 20,W |
|
|
673 |
030B: BSF 03.5 |
|
|
674 |
030C: MOVWF 07 |
|
|
675 |
030D: NOP |
|
|
676 |
.................... |
|
|
677 |
.................... delay_ms (1); |
|
|
678 |
030E: MOVLW 01 |
|
|
679 |
030F: BCF 03.5 |
|
|
680 |
0310: MOVWF 2C |
|
|
681 |
0311: CALL 0D0 |
|
|
682 |
.................... |
|
|
683 |
.................... |
|
|
684 |
.................... |
|
|
685 |
.................... |
|
|
686 |
.................... i2c_start();//blockdata |
|
|
687 |
0312: BSF 20.4 |
|
|
688 |
0313: MOVF 20,W |
|
|
689 |
0314: BSF 03.5 |
|
|
690 |
0315: MOVWF 07 |
|
|
691 |
0316: NOP |
|
|
692 |
0317: BCF 03.5 |
|
|
693 |
0318: BSF 20.3 |
|
|
694 |
0319: MOVF 20,W |
|
|
695 |
031A: BSF 03.5 |
|
|
696 |
031B: MOVWF 07 |
|
|
697 |
031C: NOP |
|
|
698 |
031D: BCF 03.5 |
|
|
699 |
031E: BCF 07.4 |
|
|
700 |
031F: BCF 20.4 |
|
|
701 |
0320: MOVF 20,W |
|
|
702 |
0321: BSF 03.5 |
|
|
703 |
0322: MOVWF 07 |
|
|
704 |
0323: NOP |
|
|
705 |
0324: BCF 03.5 |
|
|
706 |
0325: BCF 07.3 |
|
|
707 |
0326: BCF 20.3 |
|
|
708 |
0327: MOVF 20,W |
|
|
709 |
0328: BSF 03.5 |
|
|
710 |
0329: MOVWF 07 |
|
|
711 |
.................... I2C_Write(0xAA); |
|
|
712 |
032A: MOVLW AA |
|
|
713 |
032B: BCF 03.5 |
|
|
714 |
032C: MOVWF 2C |
|
|
715 |
032D: CALL 086 |
|
|
716 |
.................... I2C_write(0x45); |
|
|
717 |
032E: MOVLW 45 |
|
|
718 |
032F: MOVWF 2C |
|
|
719 |
0330: CALL 086 |
|
|
720 |
.................... |
|
|
721 |
.................... i2c_start(); |
|
|
722 |
0331: BSF 20.4 |
|
|
723 |
0332: MOVF 20,W |
|
|
724 |
0333: BSF 03.5 |
|
|
725 |
0334: MOVWF 07 |
|
|
726 |
0335: NOP |
|
|
727 |
0336: BCF 03.5 |
|
|
728 |
0337: BSF 20.3 |
|
|
729 |
0338: MOVF 20,W |
|
|
730 |
0339: BSF 03.5 |
|
|
731 |
033A: MOVWF 07 |
|
|
732 |
033B: NOP |
|
|
733 |
033C: BCF 03.5 |
|
|
734 |
033D: BTFSS 07.3 |
|
|
735 |
033E: GOTO 33D |
|
|
736 |
033F: BCF 07.4 |
|
|
737 |
0340: BCF 20.4 |
|
|
738 |
0341: MOVF 20,W |
|
|
739 |
0342: BSF 03.5 |
|
|
740 |
0343: MOVWF 07 |
|
|
741 |
0344: NOP |
|
|
742 |
0345: BCF 03.5 |
|
|
743 |
0346: BCF 07.3 |
|
|
744 |
0347: BCF 20.3 |
|
|
745 |
0348: MOVF 20,W |
|
|
746 |
0349: BSF 03.5 |
|
|
747 |
034A: MOVWF 07 |
|
|
748 |
.................... I2C_Write(0xAB); |
|
|
749 |
034B: MOVLW AB |
|
|
750 |
034C: BCF 03.5 |
|
|
751 |
034D: MOVWF 2C |
|
|
752 |
034E: CALL 086 |
|
|
753 |
.................... VH=I2C_read(0); |
|
|
754 |
034F: CLRF 77 |
|
|
755 |
0350: CALL 0E4 |
|
|
756 |
0351: MOVF 78,W |
|
|
757 |
0352: MOVWF 2A |
|
|
758 |
.................... |
|
|
759 |
.................... i2c_stop(); |
|
|
760 |
0353: BCF 20.4 |
|
|
761 |
0354: MOVF 20,W |
|
|
762 |
0355: BSF 03.5 |
|
|
763 |
0356: MOVWF 07 |
|
|
764 |
0357: NOP |
|
|
765 |
0358: BCF 03.5 |
|
|
766 |
0359: BSF 20.3 |
|
|
767 |
035A: MOVF 20,W |
|
|
768 |
035B: BSF 03.5 |
|
|
769 |
035C: MOVWF 07 |
|
|
770 |
035D: BCF 03.5 |
|
|
771 |
035E: BTFSS 07.3 |
|
|
772 |
035F: GOTO 35E |
|
|
773 |
0360: NOP |
|
|
774 |
0361: GOTO 362 |
|
|
775 |
0362: NOP |
|
|
776 |
0363: BSF 20.4 |
|
|
777 |
0364: MOVF 20,W |
|
|
778 |
0365: BSF 03.5 |
|
|
779 |
0366: MOVWF 07 |
|
|
780 |
0367: NOP |
|
|
781 |
.................... |
|
|
782 |
.................... i2c_start();//blockdata |
|
|
783 |
0368: BCF 03.5 |
|
|
784 |
0369: BSF 20.4 |
|
|
785 |
036A: MOVF 20,W |
|
|
786 |
036B: BSF 03.5 |
|
|
787 |
036C: MOVWF 07 |
|
|
788 |
036D: NOP |
|
|
789 |
036E: BCF 03.5 |
|
|
790 |
036F: BSF 20.3 |
|
|
791 |
0370: MOVF 20,W |
|
|
792 |
0371: BSF 03.5 |
|
|
793 |
0372: MOVWF 07 |
|
|
794 |
0373: NOP |
|
|
795 |
0374: BCF 03.5 |
|
|
796 |
0375: BCF 07.4 |
|
|
797 |
0376: BCF 20.4 |
|
|
798 |
0377: MOVF 20,W |
|
|
799 |
0378: BSF 03.5 |
|
|
800 |
0379: MOVWF 07 |
|
|
801 |
037A: NOP |
|
|
802 |
037B: BCF 03.5 |
|
|
803 |
037C: BCF 07.3 |
|
|
804 |
037D: BCF 20.3 |
|
|
805 |
037E: MOVF 20,W |
|
|
806 |
037F: BSF 03.5 |
|
|
807 |
0380: MOVWF 07 |
|
|
808 |
.................... I2C_Write(0xAA); |
|
|
809 |
0381: MOVLW AA |
|
|
810 |
0382: BCF 03.5 |
|
|
811 |
0383: MOVWF 2C |
|
|
812 |
0384: CALL 086 |
|
|
813 |
.................... I2C_write(0x46); |
|
|
814 |
0385: MOVLW 46 |
|
|
815 |
0386: MOVWF 2C |
|
|
816 |
0387: CALL 086 |
|
|
817 |
.................... |
|
|
818 |
.................... i2c_start(); |
|
|
819 |
0388: BSF 20.4 |
|
|
820 |
0389: MOVF 20,W |
|
|
821 |
038A: BSF 03.5 |
|
|
822 |
038B: MOVWF 07 |
|
|
823 |
038C: NOP |
|
|
824 |
038D: BCF 03.5 |
|
|
825 |
038E: BSF 20.3 |
|
|
826 |
038F: MOVF 20,W |
|
|
827 |
0390: BSF 03.5 |
|
|
828 |
0391: MOVWF 07 |
|
|
829 |
0392: NOP |
|
|
830 |
0393: BCF 03.5 |
|
|
831 |
0394: BTFSS 07.3 |
|
|
832 |
0395: GOTO 394 |
|
|
833 |
0396: BCF 07.4 |
|
|
834 |
0397: BCF 20.4 |
|
|
835 |
0398: MOVF 20,W |
|
|
836 |
0399: BSF 03.5 |
|
|
837 |
039A: MOVWF 07 |
|
|
838 |
039B: NOP |
|
|
839 |
039C: BCF 03.5 |
|
|
840 |
039D: BCF 07.3 |
|
|
841 |
039E: BCF 20.3 |
|
|
842 |
039F: MOVF 20,W |
|
|
843 |
03A0: BSF 03.5 |
|
|
844 |
03A1: MOVWF 07 |
|
|
845 |
.................... I2C_Write(0xAB); |
|
|
846 |
03A2: MOVLW AB |
|
|
847 |
03A3: BCF 03.5 |
|
|
848 |
03A4: MOVWF 2C |
|
|
849 |
03A5: CALL 086 |
|
|
850 |
.................... |
|
|
851 |
.................... VL=I2C_read(0); |
|
|
852 |
03A6: CLRF 77 |
|
|
853 |
03A7: CALL 0E4 |
|
|
854 |
03A8: MOVF 78,W |
|
|
855 |
03A9: MOVWF 2B |
|
|
856 |
.................... i2c_stop(); |
|
|
857 |
03AA: BCF 20.4 |
|
|
858 |
03AB: MOVF 20,W |
|
|
859 |
03AC: BSF 03.5 |
|
|
860 |
03AD: MOVWF 07 |
|
|
861 |
03AE: NOP |
|
|
862 |
03AF: BCF 03.5 |
|
|
863 |
03B0: BSF 20.3 |
|
|
864 |
03B1: MOVF 20,W |
|
|
865 |
03B2: BSF 03.5 |
|
|
866 |
03B3: MOVWF 07 |
|
|
867 |
03B4: BCF 03.5 |
|
|
868 |
03B5: BTFSS 07.3 |
|
|
869 |
03B6: GOTO 3B5 |
|
|
870 |
03B7: NOP |
|
|
871 |
03B8: GOTO 3B9 |
|
|
872 |
03B9: NOP |
|
|
873 |
03BA: BSF 20.4 |
|
|
874 |
03BB: MOVF 20,W |
|
|
875 |
03BC: BSF 03.5 |
|
|
876 |
03BD: MOVWF 07 |
|
|
877 |
03BE: NOP |
|
|
878 |
.................... |
|
|
879 |
.................... |
|
|
880 |
.................... delay_ms (1); |
|
|
881 |
03BF: MOVLW 01 |
|
|
882 |
03C0: BCF 03.5 |
|
|
883 |
03C1: MOVWF 2C |
|
|
884 |
03C2: CALL 0D0 |
|
|
885 |
.................... |
|
|
886 |
.................... printf("VL %lX \r\n", VL); |
|
|
887 |
03C3: MOVLW 56 |
|
|
888 |
03C4: MOVWF 30 |
|
|
889 |
03C5: CALL 01A |
|
|
890 |
03C6: MOVLW 4C |
|
|
891 |
03C7: MOVWF 30 |
|
|
892 |
03C8: CALL 01A |
|
|
893 |
03C9: MOVLW 20 |
|
|
894 |
03CA: MOVWF 30 |
|
|
895 |
03CB: CALL 01A |
|
|
896 |
03CC: MOVF 2B,W |
|
|
897 |
03CD: MOVWF 2C |
|
|
898 |
03CE: MOVLW 37 |
|
|
899 |
03CF: MOVWF 2D |
|
|
900 |
03D0: CALL 129 |
|
|
901 |
03D1: MOVLW 20 |
|
|
902 |
03D2: MOVWF 30 |
|
|
903 |
03D3: CALL 01A |
|
|
904 |
03D4: MOVLW 0D |
|
|
905 |
03D5: MOVWF 30 |
|
|
906 |
03D6: CALL 01A |
|
|
907 |
03D7: MOVLW 0A |
|
|
908 |
03D8: MOVWF 30 |
|
|
909 |
03D9: CALL 01A |
|
|
910 |
.................... printf("LH %lX \r\n", VH); |
|
|
911 |
03DA: MOVLW 4C |
|
|
912 |
03DB: MOVWF 30 |
|
|
913 |
03DC: CALL 01A |
|
|
914 |
03DD: MOVLW 48 |
|
|
915 |
03DE: MOVWF 30 |
|
|
916 |
03DF: CALL 01A |
|
|
917 |
03E0: MOVLW 20 |
|
|
918 |
03E1: MOVWF 30 |
|
|
919 |
03E2: CALL 01A |
|
|
920 |
03E3: MOVF 2A,W |
|
|
921 |
03E4: MOVWF 2C |
|
|
922 |
03E5: MOVLW 37 |
|
|
923 |
03E6: MOVWF 2D |
|
|
924 |
03E7: CALL 129 |
|
|
925 |
03E8: MOVLW 20 |
|
|
926 |
03E9: MOVWF 30 |
|
|
927 |
03EA: CALL 01A |
|
|
928 |
03EB: MOVLW 0D |
|
|
929 |
03EC: MOVWF 30 |
|
|
930 |
03ED: CALL 01A |
|
|
931 |
03EE: MOVLW 0A |
|
|
932 |
03EF: MOVWF 30 |
|
|
933 |
03F0: CALL 01A |
|
|
934 |
.................... |
|
|
935 |
.................... |
|
|
936 |
.................... |
|
|
937 |
.................... |
|
|
938 |
.................... |
|
|
939 |
.................... |
|
|
940 |
.................... if(VL==0x10) |
|
|
941 |
03F1: MOVF 2B,W |
|
|
942 |
03F2: SUBLW 10 |
|
|
943 |
03F3: BTFSS 03.2 |
|
|
944 |
03F4: GOTO 411 |
|
|
945 |
.................... { |
|
|
946 |
.................... LSB=LSB-1; |
|
|
947 |
03F5: MOVLW 01 |
|
|
948 |
03F6: SUBWF 27,F |
|
|
949 |
.................... printf("Vysledne LSB %lX \r\n", LSB); |
|
|
950 |
03F7: MOVLW 10 |
|
|
951 |
03F8: BSF 03.6 |
|
|
952 |
03F9: MOVWF 0D |
|
|
953 |
03FA: MOVLW 00 |
|
|
954 |
03FB: MOVWF 0F |
|
|
955 |
03FC: BCF 03.0 |
|
|
956 |
03FD: MOVLW 0D |
|
|
957 |
03FE: BCF 03.6 |
|
|
958 |
03FF: MOVWF 2C |
|
|
959 |
0400: GOTO 14A |
|
|
960 |
0401: MOVF 27,W |
|
|
961 |
0402: MOVWF 2C |
|
|
962 |
0403: MOVLW 37 |
|
|
963 |
0404: MOVWF 2D |
|
|
964 |
0405: CALL 129 |
|
|
965 |
0406: MOVLW 20 |
|
|
966 |
0407: MOVWF 30 |
|
|
967 |
0408: CALL 01A |
|
|
968 |
0409: MOVLW 0D |
|
|
969 |
040A: MOVWF 30 |
|
|
970 |
040B: CALL 01A |
|
|
971 |
040C: MOVLW 0A |
|
|
972 |
040D: MOVWF 30 |
|
|
973 |
040E: CALL 01A |
|
|
974 |
.................... while(TRUE) |
|
|
975 |
.................... { |
|
|
976 |
.................... } |
|
|
977 |
040F: GOTO 40F |
|
|
978 |
.................... } |
|
|
979 |
.................... |
|
|
980 |
.................... else |
|
|
981 |
0410: GOTO 4BD |
|
|
982 |
.................... { |
|
|
983 |
.................... i2c_start();//blockdata |
|
|
984 |
0411: BSF 20.4 |
|
|
985 |
0412: MOVF 20,W |
|
|
986 |
0413: BSF 03.5 |
|
|
987 |
0414: MOVWF 07 |
|
|
988 |
0415: NOP |
|
|
989 |
0416: BCF 03.5 |
|
|
990 |
0417: BSF 20.3 |
|
|
991 |
0418: MOVF 20,W |
|
|
992 |
0419: BSF 03.5 |
|
|
993 |
041A: MOVWF 07 |
|
|
994 |
041B: NOP |
|
|
995 |
041C: BCF 03.5 |
|
|
996 |
041D: BCF 07.4 |
|
|
997 |
041E: BCF 20.4 |
|
|
998 |
041F: MOVF 20,W |
|
|
999 |
0420: BSF 03.5 |
|
|
1000 |
0421: MOVWF 07 |
|
|
1001 |
0422: NOP |
|
|
1002 |
0423: BCF 03.5 |
|
|
1003 |
0424: BCF 07.3 |
|
|
1004 |
0425: BCF 20.3 |
|
|
1005 |
0426: MOVF 20,W |
|
|
1006 |
0427: BSF 03.5 |
|
|
1007 |
0428: MOVWF 07 |
|
|
1008 |
.................... I2C_Write(0xAA); |
|
|
1009 |
0429: MOVLW AA |
|
|
1010 |
042A: BCF 03.5 |
|
|
1011 |
042B: MOVWF 2C |
|
|
1012 |
042C: CALL 086 |
|
|
1013 |
.................... I2C_write(0x45); |
|
|
1014 |
042D: MOVLW 45 |
|
|
1015 |
042E: MOVWF 2C |
|
|
1016 |
042F: CALL 086 |
|
|
1017 |
.................... |
|
|
1018 |
.................... i2c_start(); |
|
|
1019 |
0430: BSF 20.4 |
|
|
1020 |
0431: MOVF 20,W |
|
|
1021 |
0432: BSF 03.5 |
|
|
1022 |
0433: MOVWF 07 |
|
|
1023 |
0434: NOP |
|
|
1024 |
0435: BCF 03.5 |
|
|
1025 |
0436: BSF 20.3 |
|
|
1026 |
0437: MOVF 20,W |
|
|
1027 |
0438: BSF 03.5 |
|
|
1028 |
0439: MOVWF 07 |
|
|
1029 |
043A: NOP |
|
|
1030 |
043B: BCF 03.5 |
|
|
1031 |
043C: BTFSS 07.3 |
|
|
1032 |
043D: GOTO 43C |
|
|
1033 |
043E: BCF 07.4 |
|
|
1034 |
043F: BCF 20.4 |
|
|
1035 |
0440: MOVF 20,W |
|
|
1036 |
0441: BSF 03.5 |
|
|
1037 |
0442: MOVWF 07 |
|
|
1038 |
0443: NOP |
|
|
1039 |
0444: BCF 03.5 |
|
|
1040 |
0445: BCF 07.3 |
|
|
1041 |
0446: BCF 20.3 |
|
|
1042 |
0447: MOVF 20,W |
|
|
1043 |
0448: BSF 03.5 |
|
|
1044 |
0449: MOVWF 07 |
|
|
1045 |
.................... I2C_Write(0xAA); |
|
|
1046 |
044A: MOVLW AA |
|
|
1047 |
044B: BCF 03.5 |
|
|
1048 |
044C: MOVWF 2C |
|
|
1049 |
044D: CALL 086 |
|
|
1050 |
.................... I2C_write(0x68); |
|
|
1051 |
044E: MOVLW 68 |
|
|
1052 |
044F: MOVWF 2C |
|
|
1053 |
0450: CALL 086 |
|
|
1054 |
.................... i2c_stop(); |
|
|
1055 |
0451: BCF 20.4 |
|
|
1056 |
0452: MOVF 20,W |
|
|
1057 |
0453: BSF 03.5 |
|
|
1058 |
0454: MOVWF 07 |
|
|
1059 |
0455: NOP |
|
|
1060 |
0456: BCF 03.5 |
|
|
1061 |
0457: BSF 20.3 |
|
|
1062 |
0458: MOVF 20,W |
|
|
1063 |
0459: BSF 03.5 |
|
|
1064 |
045A: MOVWF 07 |
|
|
1065 |
045B: BCF 03.5 |
|
|
1066 |
045C: BTFSS 07.3 |
|
|
1067 |
045D: GOTO 45C |
|
|
1068 |
045E: NOP |
|
|
1069 |
045F: GOTO 460 |
|
|
1070 |
0460: NOP |
|
|
1071 |
0461: BSF 20.4 |
|
|
1072 |
0462: MOVF 20,W |
|
|
1073 |
0463: BSF 03.5 |
|
|
1074 |
0464: MOVWF 07 |
|
|
1075 |
0465: NOP |
|
|
1076 |
.................... |
|
|
1077 |
.................... i2c_start();//blockdata |
|
|
1078 |
0466: BCF 03.5 |
|
|
1079 |
0467: BSF 20.4 |
|
|
1080 |
0468: MOVF 20,W |
|
|
1081 |
0469: BSF 03.5 |
|
|
1082 |
046A: MOVWF 07 |
|
|
1083 |
046B: NOP |
|
|
1084 |
046C: BCF 03.5 |
|
|
1085 |
046D: BSF 20.3 |
|
|
1086 |
046E: MOVF 20,W |
|
|
1087 |
046F: BSF 03.5 |
|
|
1088 |
0470: MOVWF 07 |
|
|
1089 |
0471: NOP |
|
|
1090 |
0472: BCF 03.5 |
|
|
1091 |
0473: BCF 07.4 |
|
|
1092 |
0474: BCF 20.4 |
|
|
1093 |
0475: MOVF 20,W |
|
|
1094 |
0476: BSF 03.5 |
|
|
1095 |
0477: MOVWF 07 |
|
|
1096 |
0478: NOP |
|
|
1097 |
0479: BCF 03.5 |
|
|
1098 |
047A: BCF 07.3 |
|
|
1099 |
047B: BCF 20.3 |
|
|
1100 |
047C: MOVF 20,W |
|
|
1101 |
047D: BSF 03.5 |
|
|
1102 |
047E: MOVWF 07 |
|
|
1103 |
.................... I2C_Write(0xAA); |
|
|
1104 |
047F: MOVLW AA |
|
|
1105 |
0480: BCF 03.5 |
|
|
1106 |
0481: MOVWF 2C |
|
|
1107 |
0482: CALL 086 |
|
|
1108 |
.................... I2C_write(0x46); |
|
|
1109 |
0483: MOVLW 46 |
|
|
1110 |
0484: MOVWF 2C |
|
|
1111 |
0485: CALL 086 |
|
|
1112 |
.................... |
|
|
1113 |
.................... i2c_start(); |
|
|
1114 |
0486: BSF 20.4 |
|
|
1115 |
0487: MOVF 20,W |
|
|
1116 |
0488: BSF 03.5 |
|
|
1117 |
0489: MOVWF 07 |
|
|
1118 |
048A: NOP |
|
|
1119 |
048B: BCF 03.5 |
|
|
1120 |
048C: BSF 20.3 |
|
|
1121 |
048D: MOVF 20,W |
|
|
1122 |
048E: BSF 03.5 |
|
|
1123 |
048F: MOVWF 07 |
|
|
1124 |
0490: NOP |
|
|
1125 |
0491: BCF 03.5 |
|
|
1126 |
0492: BTFSS 07.3 |
|
|
1127 |
0493: GOTO 492 |
|
|
1128 |
0494: BCF 07.4 |
|
|
1129 |
0495: BCF 20.4 |
|
|
1130 |
0496: MOVF 20,W |
|
|
1131 |
0497: BSF 03.5 |
|
|
1132 |
0498: MOVWF 07 |
|
|
1133 |
0499: NOP |
|
|
1134 |
049A: BCF 03.5 |
|
|
1135 |
049B: BCF 07.3 |
|
|
1136 |
049C: BCF 20.3 |
|
|
1137 |
049D: MOVF 20,W |
|
|
1138 |
049E: BSF 03.5 |
|
|
1139 |
049F: MOVWF 07 |
|
|
1140 |
.................... I2C_Write(0xAA); |
|
|
1141 |
04A0: MOVLW AA |
|
|
1142 |
04A1: BCF 03.5 |
|
|
1143 |
04A2: MOVWF 2C |
|
|
1144 |
04A3: CALL 086 |
|
|
1145 |
.................... I2C_write(0x10); |
|
|
1146 |
04A4: MOVLW 10 |
|
|
1147 |
04A5: MOVWF 2C |
|
|
1148 |
04A6: CALL 086 |
|
|
1149 |
.................... i2c_stop(); |
|
|
1150 |
04A7: BCF 20.4 |
|
|
1151 |
04A8: MOVF 20,W |
|
|
1152 |
04A9: BSF 03.5 |
|
|
1153 |
04AA: MOVWF 07 |
|
|
1154 |
04AB: NOP |
|
|
1155 |
04AC: BCF 03.5 |
|
|
1156 |
04AD: BSF 20.3 |
|
|
1157 |
04AE: MOVF 20,W |
|
|
1158 |
04AF: BSF 03.5 |
|
|
1159 |
04B0: MOVWF 07 |
|
|
1160 |
04B1: BCF 03.5 |
|
|
1161 |
04B2: BTFSS 07.3 |
|
|
1162 |
04B3: GOTO 4B2 |
|
|
1163 |
04B4: NOP |
|
|
1164 |
04B5: GOTO 4B6 |
|
|
1165 |
04B6: NOP |
|
|
1166 |
04B7: BSF 20.4 |
|
|
1167 |
04B8: MOVF 20,W |
|
|
1168 |
04B9: BSF 03.5 |
|
|
1169 |
04BA: MOVWF 07 |
|
|
1170 |
04BB: NOP |
|
|
1171 |
04BC: BCF 03.5 |
|
|
1172 |
.................... |
|
|
1173 |
.................... |
|
|
1174 |
.................... |
|
|
1175 |
.................... |
|
|
1176 |
.................... |
|
|
1177 |
.................... |
|
|
1178 |
.................... } |
|
|
1179 |
.................... |
|
|
1180 |
.................... i2c_start();//blockdata |
|
|
1181 |
04BD: BSF 20.4 |
|
|
1182 |
04BE: MOVF 20,W |
|
|
1183 |
04BF: BSF 03.5 |
|
|
1184 |
04C0: MOVWF 07 |
|
|
1185 |
04C1: NOP |
|
|
1186 |
04C2: BCF 03.5 |
|
|
1187 |
04C3: BSF 20.3 |
|
|
1188 |
04C4: MOVF 20,W |
|
|
1189 |
04C5: BSF 03.5 |
|
|
1190 |
04C6: MOVWF 07 |
|
|
1191 |
04C7: NOP |
|
|
1192 |
04C8: BCF 03.5 |
|
|
1193 |
04C9: BCF 07.4 |
|
|
1194 |
04CA: BCF 20.4 |
|
|
1195 |
04CB: MOVF 20,W |
|
|
1196 |
04CC: BSF 03.5 |
|
|
1197 |
04CD: MOVWF 07 |
|
|
1198 |
04CE: NOP |
|
|
1199 |
04CF: BCF 03.5 |
|
|
1200 |
04D0: BCF 07.3 |
|
|
1201 |
04D1: BCF 20.3 |
|
|
1202 |
04D2: MOVF 20,W |
|
|
1203 |
04D3: BSF 03.5 |
|
|
1204 |
04D4: MOVWF 07 |
|
|
1205 |
.................... I2C_Write(0xAA); |
|
|
1206 |
04D5: MOVLW AA |
|
|
1207 |
04D6: BCF 03.5 |
|
|
1208 |
04D7: MOVWF 2C |
|
|
1209 |
04D8: CALL 086 |
|
|
1210 |
.................... I2C_write(0x60); |
|
|
1211 |
04D9: MOVLW 60 |
|
|
1212 |
04DA: MOVWF 2C |
|
|
1213 |
04DB: CALL 086 |
|
|
1214 |
.................... |
|
|
1215 |
.................... i2c_start(); |
|
|
1216 |
04DC: BSF 20.4 |
|
|
1217 |
04DD: MOVF 20,W |
|
|
1218 |
04DE: BSF 03.5 |
|
|
1219 |
04DF: MOVWF 07 |
|
|
1220 |
04E0: NOP |
|
|
1221 |
04E1: BCF 03.5 |
|
|
1222 |
04E2: BSF 20.3 |
|
|
1223 |
04E3: MOVF 20,W |
|
|
1224 |
04E4: BSF 03.5 |
|
|
1225 |
04E5: MOVWF 07 |
|
|
1226 |
04E6: NOP |
|
|
1227 |
04E7: BCF 03.5 |
|
|
1228 |
04E8: BTFSS 07.3 |
|
|
1229 |
04E9: GOTO 4E8 |
|
|
1230 |
04EA: BCF 07.4 |
|
|
1231 |
04EB: BCF 20.4 |
|
|
1232 |
04EC: MOVF 20,W |
|
|
1233 |
04ED: BSF 03.5 |
|
|
1234 |
04EE: MOVWF 07 |
|
|
1235 |
04EF: NOP |
|
|
1236 |
04F0: BCF 03.5 |
|
|
1237 |
04F1: BCF 07.3 |
|
|
1238 |
04F2: BCF 20.3 |
|
|
1239 |
04F3: MOVF 20,W |
|
|
1240 |
04F4: BSF 03.5 |
|
|
1241 |
04F5: MOVWF 07 |
|
|
1242 |
.................... I2C_Write(0xAA); |
|
|
1243 |
04F6: MOVLW AA |
|
|
1244 |
04F7: BCF 03.5 |
|
|
1245 |
04F8: MOVWF 2C |
|
|
1246 |
04F9: CALL 086 |
|
|
1247 |
.................... I2C_write(LSB); |
|
|
1248 |
04FA: MOVF 27,W |
|
|
1249 |
04FB: MOVWF 2C |
|
|
1250 |
04FC: CALL 086 |
|
|
1251 |
.................... i2c_stop(); |
|
|
1252 |
04FD: BCF 20.4 |
|
|
1253 |
04FE: MOVF 20,W |
|
|
1254 |
04FF: BSF 03.5 |
|
|
1255 |
0500: MOVWF 07 |
|
|
1256 |
0501: NOP |
|
|
1257 |
0502: BCF 03.5 |
|
|
1258 |
0503: BSF 20.3 |
|
|
1259 |
0504: MOVF 20,W |
|
|
1260 |
0505: BSF 03.5 |
|
|
1261 |
0506: MOVWF 07 |
|
|
1262 |
0507: BCF 03.5 |
|
|
1263 |
0508: BTFSS 07.3 |
|
|
1264 |
0509: GOTO 508 |
|
|
1265 |
050A: NOP |
|
|
1266 |
050B: GOTO 50C |
|
|
1267 |
050C: NOP |
|
|
1268 |
050D: BSF 20.4 |
|
|
1269 |
050E: MOVF 20,W |
|
|
1270 |
050F: BSF 03.5 |
|
|
1271 |
0510: MOVWF 07 |
|
|
1272 |
0511: NOP |
|
|
1273 |
.................... |
|
|
1274 |
.................... LSB=LSB+1; |
|
|
1275 |
0512: MOVLW 01 |
|
|
1276 |
0513: BCF 03.5 |
|
|
1277 |
0514: ADDWF 27,F |
|
|
1278 |
.................... |
|
|
1279 |
.................... delay_ms (100); |
|
|
1280 |
0515: MOVLW 64 |
|
|
1281 |
0516: MOVWF 2C |
|
|
1282 |
0517: CALL 0D0 |
|
|
1283 |
.................... |
|
|
1284 |
.................... } |
|
|
1285 |
0518: GOTO 209 |
|
|
1286 |
.................... |
|
|
1287 |
.................... } |
|
|
1288 |
.................... |
|
|
1289 |
0519: SLEEP |
|
|
1290 |
|
|
|
1291 |
Configuration Fuses: |
|
|
1292 |
Word 1: 2CF5 INTRC NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG |
|
|
1293 |
Word 2: 3FFF NOWRT BORV40 |