2912 |
kaklik |
1 |
CCS PCM C Compiler, Version 4.106, 47914 14-IV-13 13:00 |
2906 |
jacho |
2 |
|
2912 |
kaklik |
3 |
Filename: D:\MLAB\Modules\Sensors\SHT25V01A\SW\PIC16F887\main.lst |
2906 |
jacho |
4 |
|
2912 |
kaklik |
5 |
ROM used: 2363 words (29%) |
2906 |
jacho |
6 |
Largest free fragment is 2048 |
2912 |
kaklik |
7 |
RAM used: 12 (3%) at main() level |
|
|
8 |
38 (10%) worst case |
2906 |
jacho |
9 |
Stack: 2 locations |
|
|
10 |
|
|
|
11 |
* |
2909 |
kaklik |
12 |
0000: MOVLW 08 |
2906 |
jacho |
13 |
0001: MOVWF 0A |
2909 |
kaklik |
14 |
0002: GOTO 000 |
2906 |
jacho |
15 |
0003: NOP |
2912 |
kaklik |
16 |
.................... /* |
|
|
17 |
.................... SHT25 sensor demo firmware |
|
|
18 |
.................... */ |
|
|
19 |
.................... |
2908 |
kaklik |
20 |
.................... #include "main.h" |
2906 |
jacho |
21 |
.................... #include <16F887.h> |
|
|
22 |
.................... //////// Standard Header file for the PIC16F887 device //////////////// |
|
|
23 |
.................... #device PIC16F887 |
|
|
24 |
.................... #list |
|
|
25 |
.................... |
|
|
26 |
.................... #device adc=8 |
|
|
27 |
.................... |
2908 |
kaklik |
28 |
.................... #FUSES NOWDT //No Watch Dog Timer |
2909 |
kaklik |
29 |
.................... #FUSES INTRC_IO //Internal RC Osc |
2908 |
kaklik |
30 |
.................... #FUSES NOPUT //No Power Up Timer |
|
|
31 |
.................... #FUSES MCLR //Master Clear pin enabled |
|
|
32 |
.................... #FUSES NOPROTECT //Code not protected from reading |
|
|
33 |
.................... #FUSES NOCPD //No EE protection |
|
|
34 |
.................... #FUSES NOBROWNOUT //No brownout reset |
|
|
35 |
.................... #FUSES IESO //Internal External Switch Over mode enabled |
|
|
36 |
.................... #FUSES FCMEN //Fail-safe clock monitor enabled |
|
|
37 |
.................... #FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O |
|
|
38 |
.................... #FUSES NODEBUG //No Debug mode for ICD |
|
|
39 |
.................... #FUSES NOWRT //Program memory not write protected |
|
|
40 |
.................... #FUSES BORV40 //Brownout reset at 4.0V |
2906 |
jacho |
41 |
.................... |
|
|
42 |
.................... #use delay(clock=8000000) |
|
|
43 |
* |
2912 |
kaklik |
44 |
011D: MOVLW 28 |
|
|
45 |
011E: MOVWF 04 |
|
|
46 |
011F: BCF 03.7 |
|
|
47 |
0120: MOVF 00,W |
|
|
48 |
0121: BTFSC 03.2 |
|
|
49 |
0122: GOTO 130 |
|
|
50 |
0123: MOVLW 02 |
|
|
51 |
0124: MOVWF 78 |
|
|
52 |
0125: CLRF 77 |
|
|
53 |
0126: DECFSZ 77,F |
|
|
54 |
0127: GOTO 126 |
|
|
55 |
0128: DECFSZ 78,F |
|
|
56 |
0129: GOTO 125 |
|
|
57 |
012A: MOVLW 97 |
|
|
58 |
012B: MOVWF 77 |
2911 |
kaklik |
59 |
012C: DECFSZ 77,F |
|
|
60 |
012D: GOTO 12C |
2912 |
kaklik |
61 |
012E: DECFSZ 00,F |
|
|
62 |
012F: GOTO 123 |
|
|
63 |
0130: RETURN |
2906 |
jacho |
64 |
.................... |
2908 |
kaklik |
65 |
.................... #use i2c(master, sda=PIN_C4, scl=PIN_C3) |
2911 |
kaklik |
66 |
* |
2912 |
kaklik |
67 |
0031: MOVLW 08 |
|
|
68 |
0032: MOVWF 78 |
|
|
69 |
0033: NOP |
|
|
70 |
0034: BCF 07.3 |
|
|
71 |
0035: BCF 20.3 |
|
|
72 |
0036: MOVF 20,W |
|
|
73 |
0037: BSF 03.5 |
|
|
74 |
0038: MOVWF 07 |
2911 |
kaklik |
75 |
0039: NOP |
2912 |
kaklik |
76 |
003A: BCF 03.5 |
|
|
77 |
003B: RLF 28,F |
|
|
78 |
003C: BCF 07.4 |
|
|
79 |
003D: BTFSS 03.0 |
|
|
80 |
003E: GOTO 045 |
|
|
81 |
003F: BSF 20.4 |
|
|
82 |
0040: MOVF 20,W |
|
|
83 |
0041: BSF 03.5 |
|
|
84 |
0042: MOVWF 07 |
|
|
85 |
0043: GOTO 049 |
|
|
86 |
0044: BCF 03.5 |
|
|
87 |
0045: BCF 20.4 |
2911 |
kaklik |
88 |
0046: MOVF 20,W |
|
|
89 |
0047: BSF 03.5 |
|
|
90 |
0048: MOVWF 07 |
2912 |
kaklik |
91 |
0049: NOP |
2911 |
kaklik |
92 |
004A: BCF 03.5 |
2912 |
kaklik |
93 |
004B: BSF 20.3 |
2911 |
kaklik |
94 |
004C: MOVF 20,W |
|
|
95 |
004D: BSF 03.5 |
|
|
96 |
004E: MOVWF 07 |
2912 |
kaklik |
97 |
004F: BCF 03.5 |
|
|
98 |
0050: BTFSS 07.3 |
|
|
99 |
0051: GOTO 050 |
|
|
100 |
0052: DECFSZ 78,F |
|
|
101 |
0053: GOTO 033 |
|
|
102 |
0054: NOP |
|
|
103 |
0055: BCF 07.3 |
|
|
104 |
0056: BCF 20.3 |
|
|
105 |
0057: MOVF 20,W |
|
|
106 |
0058: BSF 03.5 |
|
|
107 |
0059: MOVWF 07 |
2911 |
kaklik |
108 |
005A: NOP |
2912 |
kaklik |
109 |
005B: BCF 03.5 |
|
|
110 |
005C: BSF 20.4 |
2911 |
kaklik |
111 |
005D: MOVF 20,W |
|
|
112 |
005E: BSF 03.5 |
|
|
113 |
005F: MOVWF 07 |
|
|
114 |
0060: NOP |
2912 |
kaklik |
115 |
0061: NOP |
|
|
116 |
0062: BCF 03.5 |
|
|
117 |
0063: BSF 20.3 |
|
|
118 |
0064: MOVF 20,W |
|
|
119 |
0065: BSF 03.5 |
|
|
120 |
0066: MOVWF 07 |
|
|
121 |
0067: BCF 03.5 |
|
|
122 |
0068: BTFSS 07.3 |
|
|
123 |
0069: GOTO 068 |
|
|
124 |
006A: CLRF 78 |
|
|
125 |
006B: NOP |
|
|
126 |
006C: BTFSC 07.4 |
|
|
127 |
006D: BSF 78.0 |
|
|
128 |
006E: BCF 07.3 |
|
|
129 |
006F: BCF 20.3 |
|
|
130 |
0070: MOVF 20,W |
|
|
131 |
0071: BSF 03.5 |
|
|
132 |
0072: MOVWF 07 |
|
|
133 |
0073: BCF 03.5 |
|
|
134 |
0074: BCF 07.4 |
|
|
135 |
0075: BCF 20.4 |
2911 |
kaklik |
136 |
0076: MOVF 20,W |
|
|
137 |
0077: BSF 03.5 |
|
|
138 |
0078: MOVWF 07 |
|
|
139 |
0079: BCF 03.5 |
2912 |
kaklik |
140 |
007A: RETURN |
2911 |
kaklik |
141 |
* |
2912 |
kaklik |
142 |
0131: MOVLW 08 |
|
|
143 |
0132: MOVWF 29 |
|
|
144 |
0133: MOVF 77,W |
|
|
145 |
0134: MOVWF 2A |
|
|
146 |
0135: BSF 20.4 |
|
|
147 |
0136: MOVF 20,W |
|
|
148 |
0137: BSF 03.5 |
|
|
149 |
0138: MOVWF 07 |
|
|
150 |
0139: NOP |
|
|
151 |
013A: BCF 03.5 |
|
|
152 |
013B: BSF 20.3 |
2911 |
kaklik |
153 |
013C: MOVF 20,W |
|
|
154 |
013D: BSF 03.5 |
|
|
155 |
013E: MOVWF 07 |
2912 |
kaklik |
156 |
013F: BCF 03.5 |
|
|
157 |
0140: BTFSS 07.3 |
|
|
158 |
0141: GOTO 140 |
|
|
159 |
0142: BTFSC 07.4 |
|
|
160 |
0143: BSF 03.0 |
|
|
161 |
0144: BTFSS 07.4 |
|
|
162 |
0145: BCF 03.0 |
|
|
163 |
0146: RLF 78,F |
|
|
164 |
0147: NOP |
|
|
165 |
0148: BCF 20.3 |
|
|
166 |
0149: MOVF 20,W |
|
|
167 |
014A: BSF 03.5 |
|
|
168 |
014B: MOVWF 07 |
|
|
169 |
014C: BCF 03.5 |
|
|
170 |
014D: BCF 07.3 |
|
|
171 |
014E: DECFSZ 29,F |
|
|
172 |
014F: GOTO 135 |
|
|
173 |
0150: BSF 20.4 |
|
|
174 |
0151: MOVF 20,W |
|
|
175 |
0152: BSF 03.5 |
|
|
176 |
0153: MOVWF 07 |
|
|
177 |
0154: NOP |
|
|
178 |
0155: BCF 03.5 |
|
|
179 |
0156: BCF 07.4 |
|
|
180 |
0157: MOVF 2A,W |
|
|
181 |
0158: BTFSC 03.2 |
|
|
182 |
0159: GOTO 15F |
|
|
183 |
015A: BCF 20.4 |
|
|
184 |
015B: MOVF 20,W |
|
|
185 |
015C: BSF 03.5 |
|
|
186 |
015D: MOVWF 07 |
|
|
187 |
015E: BCF 03.5 |
|
|
188 |
015F: NOP |
|
|
189 |
0160: BSF 20.3 |
2911 |
kaklik |
190 |
0161: MOVF 20,W |
|
|
191 |
0162: BSF 03.5 |
|
|
192 |
0163: MOVWF 07 |
|
|
193 |
0164: BCF 03.5 |
2912 |
kaklik |
194 |
0165: BTFSS 07.3 |
|
|
195 |
0166: GOTO 165 |
|
|
196 |
0167: NOP |
|
|
197 |
0168: BCF 07.3 |
|
|
198 |
0169: BCF 20.3 |
|
|
199 |
016A: MOVF 20,W |
|
|
200 |
016B: BSF 03.5 |
|
|
201 |
016C: MOVWF 07 |
2911 |
kaklik |
202 |
016D: NOP |
2912 |
kaklik |
203 |
016E: BCF 03.5 |
|
|
204 |
016F: BCF 07.4 |
|
|
205 |
0170: BCF 20.4 |
|
|
206 |
0171: MOVF 20,W |
|
|
207 |
0172: BSF 03.5 |
|
|
208 |
0173: MOVWF 07 |
2911 |
kaklik |
209 |
0174: BCF 03.5 |
2912 |
kaklik |
210 |
0175: RETURN |
2909 |
kaklik |
211 |
.................... #use rs232(baud=9600,parity=N,xmit=PIN_B7,rcv=PIN_B6,bits=8) //rcv TXD xmit RXD |
2906 |
jacho |
212 |
* |
2912 |
kaklik |
213 |
00B3: BSF 03.5 |
|
|
214 |
00B4: BCF 06.7 |
|
|
215 |
00B5: BCF 03.5 |
|
|
216 |
00B6: BCF 06.7 |
|
|
217 |
00B7: MOVLW 08 |
|
|
218 |
00B8: MOVWF 78 |
|
|
219 |
00B9: GOTO 0BA |
|
|
220 |
00BA: NOP |
|
|
221 |
00BB: BSF 78.7 |
|
|
222 |
00BC: GOTO 0CB |
|
|
223 |
00BD: BCF 78.7 |
|
|
224 |
00BE: RRF 34,F |
|
|
225 |
00BF: BTFSC 03.0 |
|
|
226 |
00C0: BSF 06.7 |
|
|
227 |
00C1: BTFSS 03.0 |
|
|
228 |
00C2: BCF 06.7 |
|
|
229 |
00C3: BSF 78.6 |
|
|
230 |
00C4: GOTO 0CB |
|
|
231 |
00C5: BCF 78.6 |
|
|
232 |
00C6: DECFSZ 78,F |
|
|
233 |
00C7: GOTO 0BE |
|
|
234 |
00C8: GOTO 0C9 |
|
|
235 |
00C9: NOP |
|
|
236 |
00CA: BSF 06.7 |
|
|
237 |
00CB: MOVLW 3F |
|
|
238 |
00CC: MOVWF 04 |
|
|
239 |
00CD: DECFSZ 04,F |
|
|
240 |
00CE: GOTO 0CD |
2911 |
kaklik |
241 |
00CF: NOP |
2912 |
kaklik |
242 |
00D0: BTFSC 78.7 |
|
|
243 |
00D1: GOTO 0BD |
|
|
244 |
00D2: BTFSC 78.6 |
|
|
245 |
00D3: GOTO 0C5 |
|
|
246 |
00D4: RETURN |
2906 |
jacho |
247 |
.................... |
|
|
248 |
.................... |
2912 |
kaklik |
249 |
.................... #include "SHT25.h" |
2908 |
kaklik |
250 |
.................... |
2912 |
kaklik |
251 |
.................... #define SHT25_HEATER_ON 0x04 |
|
|
252 |
.................... #define SHT25_HEATER_OFF 0x00 |
|
|
253 |
.................... #define SHT25_OTP_reload_off 0x02 |
|
|
254 |
.................... #define SHT25_RH12_T14 0x00 |
|
|
255 |
.................... #define SHT25_RH8_T12 0x01 |
|
|
256 |
.................... #define SHT25_RH10_T13 0x80 |
|
|
257 |
.................... #define SHT25_RH11_T11 0x81 |
|
|
258 |
.................... |
|
|
259 |
.................... #define SHT25_ADDR 0x80 |
|
|
260 |
.................... |
|
|
261 |
.................... #include "SHT25.c" |
2909 |
kaklik |
262 |
.................... void SHT25_soft_reset() |
2906 |
jacho |
263 |
.................... { |
2909 |
kaklik |
264 |
.................... i2c_start(); // Start condition |
2911 |
kaklik |
265 |
* |
2912 |
kaklik |
266 |
007B: BSF 20.4 |
|
|
267 |
007C: MOVF 20,W |
|
|
268 |
007D: BSF 03.5 |
|
|
269 |
007E: MOVWF 07 |
|
|
270 |
007F: NOP |
|
|
271 |
0080: BCF 03.5 |
|
|
272 |
0081: BSF 20.3 |
2911 |
kaklik |
273 |
0082: MOVF 20,W |
|
|
274 |
0083: BSF 03.5 |
|
|
275 |
0084: MOVWF 07 |
|
|
276 |
0085: NOP |
|
|
277 |
0086: BCF 03.5 |
2912 |
kaklik |
278 |
0087: BCF 07.4 |
|
|
279 |
0088: BCF 20.4 |
|
|
280 |
0089: MOVF 20,W |
|
|
281 |
008A: BSF 03.5 |
|
|
282 |
008B: MOVWF 07 |
|
|
283 |
008C: NOP |
|
|
284 |
008D: BCF 03.5 |
|
|
285 |
008E: BCF 07.3 |
|
|
286 |
008F: BCF 20.3 |
|
|
287 |
0090: MOVF 20,W |
|
|
288 |
0091: BSF 03.5 |
|
|
289 |
0092: MOVWF 07 |
2909 |
kaklik |
290 |
.................... i2c_write(0x80); // Device address |
2912 |
kaklik |
291 |
0093: MOVLW 80 |
|
|
292 |
0094: BCF 03.5 |
|
|
293 |
0095: MOVWF 28 |
|
|
294 |
0096: CALL 031 |
2909 |
kaklik |
295 |
.................... i2c_write(0xFE); // Device command |
2912 |
kaklik |
296 |
0097: MOVLW FE |
|
|
297 |
0098: MOVWF 28 |
|
|
298 |
0099: CALL 031 |
2909 |
kaklik |
299 |
.................... i2c_stop(); // Stop condition |
2912 |
kaklik |
300 |
009A: BCF 20.4 |
|
|
301 |
009B: MOVF 20,W |
|
|
302 |
009C: BSF 03.5 |
|
|
303 |
009D: MOVWF 07 |
|
|
304 |
009E: NOP |
|
|
305 |
009F: BCF 03.5 |
|
|
306 |
00A0: BSF 20.3 |
2911 |
kaklik |
307 |
00A1: MOVF 20,W |
|
|
308 |
00A2: BSF 03.5 |
|
|
309 |
00A3: MOVWF 07 |
2912 |
kaklik |
310 |
00A4: BCF 03.5 |
|
|
311 |
00A5: BTFSS 07.3 |
|
|
312 |
00A6: GOTO 0A5 |
|
|
313 |
00A7: NOP |
|
|
314 |
00A8: GOTO 0A9 |
|
|
315 |
00A9: NOP |
|
|
316 |
00AA: BSF 20.4 |
|
|
317 |
00AB: MOVF 20,W |
|
|
318 |
00AC: BSF 03.5 |
|
|
319 |
00AD: MOVWF 07 |
|
|
320 |
00AE: NOP |
2909 |
kaklik |
321 |
.................... } |
2912 |
kaklik |
322 |
00AF: BCF 03.5 |
|
|
323 |
00B0: BSF 0A.3 |
|
|
324 |
00B1: BCF 0A.4 |
|
|
325 |
00B2: GOTO 066 (RETURN) |
2906 |
jacho |
326 |
.................... |
2911 |
kaklik |
327 |
.................... unsigned int8 SHT25_setup(unsigned int8 setup_reg ) // writes to status register and returns its value |
2909 |
kaklik |
328 |
.................... { |
|
|
329 |
.................... unsigned int8 reg; |
|
|
330 |
.................... |
|
|
331 |
.................... i2c_start(); // Start condition |
2906 |
jacho |
332 |
* |
2912 |
kaklik |
333 |
0176: BSF 20.4 |
|
|
334 |
0177: MOVF 20,W |
|
|
335 |
0178: BSF 03.5 |
|
|
336 |
0179: MOVWF 07 |
|
|
337 |
017A: NOP |
|
|
338 |
017B: BCF 03.5 |
|
|
339 |
017C: BSF 20.3 |
2911 |
kaklik |
340 |
017D: MOVF 20,W |
|
|
341 |
017E: BSF 03.5 |
|
|
342 |
017F: MOVWF 07 |
|
|
343 |
0180: NOP |
|
|
344 |
0181: BCF 03.5 |
2912 |
kaklik |
345 |
0182: BCF 07.4 |
|
|
346 |
0183: BCF 20.4 |
|
|
347 |
0184: MOVF 20,W |
|
|
348 |
0185: BSF 03.5 |
|
|
349 |
0186: MOVWF 07 |
|
|
350 |
0187: NOP |
|
|
351 |
0188: BCF 03.5 |
|
|
352 |
0189: BCF 07.3 |
|
|
353 |
018A: BCF 20.3 |
|
|
354 |
018B: MOVF 20,W |
|
|
355 |
018C: BSF 03.5 |
|
|
356 |
018D: MOVWF 07 |
2911 |
kaklik |
357 |
.................... i2c_write(SHT25_ADDR); // Device address |
2912 |
kaklik |
358 |
018E: MOVLW 80 |
|
|
359 |
018F: BCF 03.5 |
|
|
360 |
0190: MOVWF 28 |
|
|
361 |
0191: CALL 031 |
2909 |
kaklik |
362 |
.................... i2c_write(0xE7); // Device command |
2912 |
kaklik |
363 |
0192: MOVLW E7 |
|
|
364 |
0193: MOVWF 28 |
|
|
365 |
0194: CALL 031 |
2906 |
jacho |
366 |
.................... |
2909 |
kaklik |
367 |
.................... i2c_start(); // Start condition |
2912 |
kaklik |
368 |
0195: BSF 20.4 |
|
|
369 |
0196: MOVF 20,W |
|
|
370 |
0197: BSF 03.5 |
|
|
371 |
0198: MOVWF 07 |
|
|
372 |
0199: NOP |
|
|
373 |
019A: BCF 03.5 |
|
|
374 |
019B: BSF 20.3 |
2911 |
kaklik |
375 |
019C: MOVF 20,W |
|
|
376 |
019D: BSF 03.5 |
|
|
377 |
019E: MOVWF 07 |
|
|
378 |
019F: NOP |
|
|
379 |
01A0: BCF 03.5 |
2912 |
kaklik |
380 |
01A1: BTFSS 07.3 |
|
|
381 |
01A2: GOTO 1A1 |
|
|
382 |
01A3: BCF 07.4 |
|
|
383 |
01A4: BCF 20.4 |
|
|
384 |
01A5: MOVF 20,W |
|
|
385 |
01A6: BSF 03.5 |
|
|
386 |
01A7: MOVWF 07 |
|
|
387 |
01A8: NOP |
|
|
388 |
01A9: BCF 03.5 |
|
|
389 |
01AA: BCF 07.3 |
|
|
390 |
01AB: BCF 20.3 |
|
|
391 |
01AC: MOVF 20,W |
|
|
392 |
01AD: BSF 03.5 |
|
|
393 |
01AE: MOVWF 07 |
2911 |
kaklik |
394 |
.................... i2c_write(SHT25_ADDR+1); // Device address |
2912 |
kaklik |
395 |
01AF: MOVLW 81 |
|
|
396 |
01B0: BCF 03.5 |
|
|
397 |
01B1: MOVWF 28 |
|
|
398 |
01B2: CALL 031 |
2911 |
kaklik |
399 |
.................... reg=i2c_read(0); // Read status actual status register |
2912 |
kaklik |
400 |
01B3: CLRF 77 |
|
|
401 |
01B4: CALL 131 |
|
|
402 |
01B5: MOVF 78,W |
|
|
403 |
01B6: MOVWF 24 |
2911 |
kaklik |
404 |
.................... |
|
|
405 |
.................... reg = (reg & 0x3A) | setup_reg; |
2912 |
kaklik |
406 |
01B7: MOVF 24,W |
|
|
407 |
01B8: ANDLW 3A |
|
|
408 |
01B9: IORWF 23,W |
|
|
409 |
01BA: MOVWF 24 |
2911 |
kaklik |
410 |
.................... |
|
|
411 |
.................... i2c_start(); // Start condition |
2912 |
kaklik |
412 |
01BB: BSF 20.4 |
|
|
413 |
01BC: MOVF 20,W |
|
|
414 |
01BD: BSF 03.5 |
|
|
415 |
01BE: MOVWF 07 |
|
|
416 |
01BF: NOP |
|
|
417 |
01C0: BCF 03.5 |
|
|
418 |
01C1: BSF 20.3 |
2911 |
kaklik |
419 |
01C2: MOVF 20,W |
|
|
420 |
01C3: BSF 03.5 |
|
|
421 |
01C4: MOVWF 07 |
|
|
422 |
01C5: NOP |
|
|
423 |
01C6: BCF 03.5 |
2912 |
kaklik |
424 |
01C7: BTFSS 07.3 |
|
|
425 |
01C8: GOTO 1C7 |
|
|
426 |
01C9: BCF 07.4 |
|
|
427 |
01CA: BCF 20.4 |
|
|
428 |
01CB: MOVF 20,W |
|
|
429 |
01CC: BSF 03.5 |
|
|
430 |
01CD: MOVWF 07 |
|
|
431 |
01CE: NOP |
|
|
432 |
01CF: BCF 03.5 |
|
|
433 |
01D0: BCF 07.3 |
|
|
434 |
01D1: BCF 20.3 |
|
|
435 |
01D2: MOVF 20,W |
|
|
436 |
01D3: BSF 03.5 |
|
|
437 |
01D4: MOVWF 07 |
2911 |
kaklik |
438 |
.................... i2c_write(SHT25_ADDR); // Device address |
2912 |
kaklik |
439 |
01D5: MOVLW 80 |
|
|
440 |
01D6: BCF 03.5 |
|
|
441 |
01D7: MOVWF 28 |
|
|
442 |
01D8: CALL 031 |
|
|
443 |
.................... i2c_write(0xE6); // Write to status register |
|
|
444 |
01D9: MOVLW E6 |
|
|
445 |
01DA: MOVWF 28 |
|
|
446 |
01DB: CALL 031 |
2911 |
kaklik |
447 |
.................... i2c_write(reg); // Device command |
2912 |
kaklik |
448 |
01DC: MOVF 24,W |
|
|
449 |
01DD: MOVWF 28 |
|
|
450 |
01DE: CALL 031 |
2909 |
kaklik |
451 |
.................... i2c_stop(); // Stop condition |
2912 |
kaklik |
452 |
01DF: BCF 20.4 |
|
|
453 |
01E0: MOVF 20,W |
|
|
454 |
01E1: BSF 03.5 |
|
|
455 |
01E2: MOVWF 07 |
|
|
456 |
01E3: NOP |
|
|
457 |
01E4: BCF 03.5 |
|
|
458 |
01E5: BSF 20.3 |
2911 |
kaklik |
459 |
01E6: MOVF 20,W |
|
|
460 |
01E7: BSF 03.5 |
|
|
461 |
01E8: MOVWF 07 |
2912 |
kaklik |
462 |
01E9: BCF 03.5 |
|
|
463 |
01EA: BTFSS 07.3 |
|
|
464 |
01EB: GOTO 1EA |
|
|
465 |
01EC: NOP |
|
|
466 |
01ED: GOTO 1EE |
|
|
467 |
01EE: NOP |
|
|
468 |
01EF: BSF 20.4 |
|
|
469 |
01F0: MOVF 20,W |
|
|
470 |
01F1: BSF 03.5 |
|
|
471 |
01F2: MOVWF 07 |
|
|
472 |
01F3: NOP |
2911 |
kaklik |
473 |
.................... |
2912 |
kaklik |
474 |
.................... delay_ms(10); |
|
|
475 |
01F4: MOVLW 0A |
|
|
476 |
01F5: BCF 03.5 |
|
|
477 |
01F6: MOVWF 28 |
|
|
478 |
01F7: CALL 11D |
|
|
479 |
.................... |
|
|
480 |
.................... i2c_start(); // Start condition |
|
|
481 |
01F8: BSF 20.4 |
|
|
482 |
01F9: MOVF 20,W |
|
|
483 |
01FA: BSF 03.5 |
|
|
484 |
01FB: MOVWF 07 |
|
|
485 |
01FC: NOP |
|
|
486 |
01FD: BCF 03.5 |
|
|
487 |
01FE: BSF 20.3 |
|
|
488 |
01FF: MOVF 20,W |
|
|
489 |
0200: BSF 03.5 |
|
|
490 |
0201: MOVWF 07 |
|
|
491 |
0202: NOP |
|
|
492 |
0203: BCF 03.5 |
|
|
493 |
0204: BCF 07.4 |
|
|
494 |
0205: BCF 20.4 |
|
|
495 |
0206: MOVF 20,W |
|
|
496 |
0207: BSF 03.5 |
|
|
497 |
0208: MOVWF 07 |
|
|
498 |
0209: NOP |
|
|
499 |
020A: BCF 03.5 |
|
|
500 |
020B: BCF 07.3 |
|
|
501 |
020C: BCF 20.3 |
|
|
502 |
020D: MOVF 20,W |
|
|
503 |
020E: BSF 03.5 |
|
|
504 |
020F: MOVWF 07 |
|
|
505 |
.................... i2c_write(SHT25_ADDR); // Device address |
|
|
506 |
0210: MOVLW 80 |
|
|
507 |
0211: BCF 03.5 |
|
|
508 |
0212: MOVWF 28 |
|
|
509 |
0213: CALL 031 |
|
|
510 |
.................... i2c_write(0xE7); // Device command |
|
|
511 |
0214: MOVLW E7 |
|
|
512 |
0215: MOVWF 28 |
|
|
513 |
0216: CALL 031 |
|
|
514 |
.................... |
|
|
515 |
.................... i2c_start(); // Start condition |
|
|
516 |
0217: BSF 20.4 |
|
|
517 |
0218: MOVF 20,W |
|
|
518 |
0219: BSF 03.5 |
|
|
519 |
021A: MOVWF 07 |
|
|
520 |
021B: NOP |
|
|
521 |
021C: BCF 03.5 |
|
|
522 |
021D: BSF 20.3 |
|
|
523 |
021E: MOVF 20,W |
|
|
524 |
021F: BSF 03.5 |
|
|
525 |
0220: MOVWF 07 |
|
|
526 |
0221: NOP |
|
|
527 |
0222: BCF 03.5 |
|
|
528 |
0223: BTFSS 07.3 |
|
|
529 |
0224: GOTO 223 |
|
|
530 |
0225: BCF 07.4 |
|
|
531 |
0226: BCF 20.4 |
|
|
532 |
0227: MOVF 20,W |
|
|
533 |
0228: BSF 03.5 |
|
|
534 |
0229: MOVWF 07 |
|
|
535 |
022A: NOP |
|
|
536 |
022B: BCF 03.5 |
|
|
537 |
022C: BCF 07.3 |
|
|
538 |
022D: BCF 20.3 |
|
|
539 |
022E: MOVF 20,W |
|
|
540 |
022F: BSF 03.5 |
|
|
541 |
0230: MOVWF 07 |
|
|
542 |
.................... i2c_write(SHT25_ADDR+1); // Device address |
|
|
543 |
0231: MOVLW 81 |
|
|
544 |
0232: BCF 03.5 |
|
|
545 |
0233: MOVWF 28 |
|
|
546 |
0234: CALL 031 |
|
|
547 |
.................... reg=i2c_read(0); // Read status actual status register |
|
|
548 |
0235: CLRF 77 |
|
|
549 |
0236: CALL 131 |
|
|
550 |
0237: MOVF 78,W |
|
|
551 |
0238: MOVWF 24 |
|
|
552 |
.................... |
2911 |
kaklik |
553 |
.................... return (reg); |
2912 |
kaklik |
554 |
0239: MOVF 24,W |
|
|
555 |
023A: MOVWF 78 |
2909 |
kaklik |
556 |
.................... } |
2912 |
kaklik |
557 |
023B: BSF 0A.3 |
|
|
558 |
023C: BCF 0A.4 |
|
|
559 |
023D: GOTO 089 (RETURN) |
2906 |
jacho |
560 |
.................... |
2911 |
kaklik |
561 |
.................... |
2909 |
kaklik |
562 |
.................... float SHT25_get_temp() |
|
|
563 |
.................... { |
|
|
564 |
.................... unsigned int8 MSB, LSB, Check; |
|
|
565 |
.................... unsigned int16 data; |
2906 |
jacho |
566 |
.................... |
2909 |
kaklik |
567 |
.................... i2c_start(); |
|
|
568 |
* |
2912 |
kaklik |
569 |
054B: BSF 20.4 |
|
|
570 |
054C: MOVF 20,W |
|
|
571 |
054D: BSF 03.5 |
|
|
572 |
054E: MOVWF 07 |
|
|
573 |
054F: NOP |
|
|
574 |
0550: BCF 03.5 |
|
|
575 |
0551: BSF 20.3 |
|
|
576 |
0552: MOVF 20,W |
|
|
577 |
0553: BSF 03.5 |
|
|
578 |
0554: MOVWF 07 |
|
|
579 |
0555: NOP |
|
|
580 |
0556: BCF 03.5 |
|
|
581 |
0557: BTFSS 07.3 |
|
|
582 |
0558: GOTO 557 |
|
|
583 |
0559: BCF 07.4 |
|
|
584 |
055A: BCF 20.4 |
|
|
585 |
055B: MOVF 20,W |
|
|
586 |
055C: BSF 03.5 |
|
|
587 |
055D: MOVWF 07 |
|
|
588 |
055E: NOP |
|
|
589 |
055F: BCF 03.5 |
|
|
590 |
0560: BCF 07.3 |
|
|
591 |
0561: BCF 20.3 |
|
|
592 |
0562: MOVF 20,W |
|
|
593 |
0563: BSF 03.5 |
|
|
594 |
0564: MOVWF 07 |
2911 |
kaklik |
595 |
.................... I2C_Write(SHT25_ADDR); |
2912 |
kaklik |
596 |
0565: MOVLW 80 |
|
|
597 |
0566: BCF 03.5 |
|
|
598 |
0567: MOVWF 28 |
|
|
599 |
0568: CALL 031 |
2909 |
kaklik |
600 |
.................... I2C_write(0xE3); |
2912 |
kaklik |
601 |
0569: MOVLW E3 |
|
|
602 |
056A: MOVWF 28 |
|
|
603 |
056B: CALL 031 |
2906 |
jacho |
604 |
.................... i2c_stop(); |
2912 |
kaklik |
605 |
056C: BCF 20.4 |
|
|
606 |
056D: MOVF 20,W |
|
|
607 |
056E: BSF 03.5 |
|
|
608 |
056F: MOVWF 07 |
|
|
609 |
0570: NOP |
|
|
610 |
0571: BCF 03.5 |
|
|
611 |
0572: BSF 20.3 |
|
|
612 |
0573: MOVF 20,W |
|
|
613 |
0574: BSF 03.5 |
|
|
614 |
0575: MOVWF 07 |
|
|
615 |
0576: BCF 03.5 |
|
|
616 |
0577: BTFSS 07.3 |
|
|
617 |
0578: GOTO 577 |
|
|
618 |
0579: NOP |
|
|
619 |
057A: GOTO 57B |
|
|
620 |
057B: NOP |
|
|
621 |
057C: BSF 20.4 |
|
|
622 |
057D: MOVF 20,W |
|
|
623 |
057E: BSF 03.5 |
|
|
624 |
057F: MOVWF 07 |
|
|
625 |
0580: NOP |
2909 |
kaklik |
626 |
.................... |
|
|
627 |
.................... delay_ms(100); |
2912 |
kaklik |
628 |
0581: MOVLW 64 |
|
|
629 |
0582: BCF 03.5 |
|
|
630 |
0583: MOVWF 28 |
|
|
631 |
0584: CALL 11D |
2906 |
jacho |
632 |
.................... |
|
|
633 |
.................... i2c_start(); |
2912 |
kaklik |
634 |
0585: BSF 20.4 |
|
|
635 |
0586: MOVF 20,W |
|
|
636 |
0587: BSF 03.5 |
|
|
637 |
0588: MOVWF 07 |
|
|
638 |
0589: NOP |
|
|
639 |
058A: BCF 03.5 |
|
|
640 |
058B: BSF 20.3 |
|
|
641 |
058C: MOVF 20,W |
|
|
642 |
058D: BSF 03.5 |
|
|
643 |
058E: MOVWF 07 |
|
|
644 |
058F: NOP |
|
|
645 |
0590: BCF 03.5 |
|
|
646 |
0591: BCF 07.4 |
|
|
647 |
0592: BCF 20.4 |
|
|
648 |
0593: MOVF 20,W |
|
|
649 |
0594: BSF 03.5 |
|
|
650 |
0595: MOVWF 07 |
|
|
651 |
0596: NOP |
|
|
652 |
0597: BCF 03.5 |
|
|
653 |
0598: BCF 07.3 |
|
|
654 |
0599: BCF 20.3 |
|
|
655 |
059A: MOVF 20,W |
|
|
656 |
059B: BSF 03.5 |
|
|
657 |
059C: MOVWF 07 |
2911 |
kaklik |
658 |
.................... I2C_Write(SHT25_ADDR+1); |
2912 |
kaklik |
659 |
059D: MOVLW 81 |
|
|
660 |
059E: BCF 03.5 |
|
|
661 |
059F: MOVWF 28 |
|
|
662 |
05A0: CALL 031 |
2909 |
kaklik |
663 |
.................... MSB=i2c_read(1); |
2912 |
kaklik |
664 |
05A1: MOVLW 01 |
|
|
665 |
05A2: MOVWF 77 |
|
|
666 |
05A3: CALL 131 |
|
|
667 |
05A4: MOVF 78,W |
|
|
668 |
05A5: MOVWF 23 |
2909 |
kaklik |
669 |
.................... LSB=i2c_read(1); |
2912 |
kaklik |
670 |
05A6: MOVLW 01 |
|
|
671 |
05A7: MOVWF 77 |
|
|
672 |
05A8: CALL 131 |
|
|
673 |
05A9: MOVF 78,W |
|
|
674 |
05AA: MOVWF 24 |
2909 |
kaklik |
675 |
.................... Check=i2c_read(0); |
2912 |
kaklik |
676 |
05AB: CLRF 77 |
|
|
677 |
05AC: CALL 131 |
|
|
678 |
05AD: MOVF 78,W |
|
|
679 |
05AE: MOVWF 25 |
2909 |
kaklik |
680 |
.................... i2c_stop(); |
2912 |
kaklik |
681 |
05AF: BCF 20.4 |
|
|
682 |
05B0: MOVF 20,W |
|
|
683 |
05B1: BSF 03.5 |
|
|
684 |
05B2: MOVWF 07 |
|
|
685 |
05B3: NOP |
|
|
686 |
05B4: BCF 03.5 |
|
|
687 |
05B5: BSF 20.3 |
|
|
688 |
05B6: MOVF 20,W |
|
|
689 |
05B7: BSF 03.5 |
|
|
690 |
05B8: MOVWF 07 |
|
|
691 |
05B9: BCF 03.5 |
|
|
692 |
05BA: BTFSS 07.3 |
|
|
693 |
05BB: GOTO 5BA |
|
|
694 |
05BC: NOP |
|
|
695 |
05BD: GOTO 5BE |
|
|
696 |
05BE: NOP |
|
|
697 |
05BF: BSF 20.4 |
|
|
698 |
05C0: MOVF 20,W |
|
|
699 |
05C1: BSF 03.5 |
|
|
700 |
05C2: MOVWF 07 |
|
|
701 |
05C3: NOP |
2909 |
kaklik |
702 |
.................... |
|
|
703 |
.................... LSB = LSB >> 2; // trow out status bits |
2912 |
kaklik |
704 |
05C4: BCF 03.5 |
|
|
705 |
05C5: RRF 24,F |
|
|
706 |
05C6: RRF 24,F |
|
|
707 |
05C7: MOVLW 3F |
|
|
708 |
05C8: ANDWF 24,F |
2906 |
jacho |
709 |
.................... |
2909 |
kaklik |
710 |
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4)); |
2912 |
kaklik |
711 |
05C9: CLRF 29 |
|
|
712 |
05CA: MOVF 23,W |
|
|
713 |
05CB: MOVWF 28 |
|
|
714 |
05CC: MOVWF 29 |
|
|
715 |
05CD: CLRF 28 |
|
|
716 |
05CE: SWAPF 24,W |
|
|
717 |
05CF: MOVWF 77 |
|
|
718 |
05D0: MOVLW F0 |
|
|
719 |
05D1: ANDWF 77,F |
|
|
720 |
05D2: MOVF 77,W |
|
|
721 |
05D3: ADDWF 28,W |
|
|
722 |
05D4: MOVWF 26 |
|
|
723 |
05D5: MOVF 29,W |
|
|
724 |
05D6: MOVWF 27 |
|
|
725 |
05D7: BTFSC 03.0 |
|
|
726 |
05D8: INCF 27,F |
2909 |
kaklik |
727 |
.................... return(-46.85 + 175.72*((float)data/0xFFFF)); |
2912 |
kaklik |
728 |
05D9: MOVF 27,W |
|
|
729 |
05DA: MOVWF 29 |
|
|
730 |
05DB: MOVF 26,W |
|
|
731 |
05DC: MOVWF 28 |
|
|
732 |
05DD: CALL 2AE |
|
|
733 |
05DE: MOVF 77,W |
|
|
734 |
05DF: MOVWF 28 |
|
|
735 |
05E0: MOVF 78,W |
|
|
736 |
05E1: MOVWF 29 |
|
|
737 |
05E2: MOVF 79,W |
|
|
738 |
05E3: MOVWF 2A |
|
|
739 |
05E4: MOVF 7A,W |
|
|
740 |
05E5: MOVWF 2B |
|
|
741 |
05E6: MOVWF 2F |
|
|
742 |
05E7: MOVF 79,W |
|
|
743 |
05E8: MOVWF 2E |
|
|
744 |
05E9: MOVF 78,W |
|
|
745 |
05EA: MOVWF 2D |
|
|
746 |
05EB: MOVF 77,W |
|
|
747 |
05EC: MOVWF 2C |
|
|
748 |
05ED: CLRF 33 |
|
|
749 |
05EE: MOVLW FF |
|
|
750 |
05EF: MOVWF 32 |
|
|
751 |
05F0: MOVLW 7F |
|
|
752 |
05F1: MOVWF 31 |
|
|
753 |
05F2: MOVLW 8E |
|
|
754 |
05F3: MOVWF 30 |
|
|
755 |
05F4: CALL 2CB |
|
|
756 |
05F5: MOVLW 52 |
|
|
757 |
05F6: MOVWF 37 |
|
|
758 |
05F7: MOVLW B8 |
|
|
759 |
05F8: MOVWF 36 |
|
|
760 |
05F9: MOVLW 2F |
|
|
761 |
05FA: MOVWF 35 |
|
|
762 |
05FB: MOVLW 86 |
|
|
763 |
05FC: MOVWF 34 |
|
|
764 |
05FD: MOVF 7A,W |
|
|
765 |
05FE: MOVWF 3B |
|
|
766 |
05FF: MOVF 79,W |
|
|
767 |
0600: MOVWF 3A |
|
|
768 |
0601: MOVF 78,W |
|
|
769 |
0602: MOVWF 39 |
|
|
770 |
0603: MOVF 77,W |
|
|
771 |
0604: MOVWF 38 |
|
|
772 |
0605: CALL 395 |
|
|
773 |
0606: BCF 03.1 |
|
|
774 |
0607: MOVLW 66 |
|
|
775 |
0608: MOVWF 2B |
|
|
776 |
0609: MOVWF 2A |
|
|
777 |
060A: MOVLW BB |
|
|
778 |
060B: MOVWF 29 |
|
|
779 |
060C: MOVLW 84 |
|
|
780 |
060D: MOVWF 28 |
|
|
781 |
060E: MOVF 7A,W |
|
|
782 |
060F: MOVWF 2F |
|
|
783 |
0610: MOVF 79,W |
|
|
784 |
0611: MOVWF 2E |
|
|
785 |
0612: MOVF 78,W |
|
|
786 |
0613: MOVWF 2D |
|
|
787 |
0614: MOVF 77,W |
|
|
788 |
0615: MOVWF 2C |
|
|
789 |
0616: CALL 40A |
2909 |
kaklik |
790 |
.................... } |
2912 |
kaklik |
791 |
0617: BSF 0A.3 |
|
|
792 |
0618: BCF 0A.4 |
|
|
793 |
0619: GOTO 0C5 (RETURN) |
2909 |
kaklik |
794 |
.................... |
|
|
795 |
.................... float SHT25_get_hum() |
|
|
796 |
.................... { |
|
|
797 |
.................... unsigned int8 MSB, LSB, Check; |
|
|
798 |
.................... unsigned int16 data; |
|
|
799 |
.................... |
|
|
800 |
.................... i2c_start(); //RH |
|
|
801 |
* |
2912 |
kaklik |
802 |
0743: BSF 20.4 |
|
|
803 |
0744: MOVF 20,W |
|
|
804 |
0745: BSF 03.5 |
|
|
805 |
0746: MOVWF 07 |
|
|
806 |
0747: NOP |
|
|
807 |
0748: BCF 03.5 |
|
|
808 |
0749: BSF 20.3 |
|
|
809 |
074A: MOVF 20,W |
|
|
810 |
074B: BSF 03.5 |
|
|
811 |
074C: MOVWF 07 |
|
|
812 |
074D: NOP |
|
|
813 |
074E: BCF 03.5 |
|
|
814 |
074F: BCF 07.4 |
|
|
815 |
0750: BCF 20.4 |
|
|
816 |
0751: MOVF 20,W |
|
|
817 |
0752: BSF 03.5 |
|
|
818 |
0753: MOVWF 07 |
|
|
819 |
0754: NOP |
|
|
820 |
0755: BCF 03.5 |
|
|
821 |
0756: BCF 07.3 |
|
|
822 |
0757: BCF 20.3 |
|
|
823 |
0758: MOVF 20,W |
|
|
824 |
0759: BSF 03.5 |
|
|
825 |
075A: MOVWF 07 |
2911 |
kaklik |
826 |
.................... I2C_Write(SHT25_ADDR); |
2912 |
kaklik |
827 |
075B: MOVLW 80 |
|
|
828 |
075C: BCF 03.5 |
|
|
829 |
075D: MOVWF 28 |
|
|
830 |
075E: CALL 031 |
2909 |
kaklik |
831 |
.................... I2C_write(0xE5); |
2912 |
kaklik |
832 |
075F: MOVLW E5 |
|
|
833 |
0760: MOVWF 28 |
|
|
834 |
0761: CALL 031 |
2909 |
kaklik |
835 |
.................... |
|
|
836 |
.................... delay_ms(100); |
2912 |
kaklik |
837 |
0762: MOVLW 64 |
|
|
838 |
0763: MOVWF 28 |
|
|
839 |
0764: CALL 11D |
2909 |
kaklik |
840 |
.................... |
2906 |
jacho |
841 |
.................... i2c_start(); |
2912 |
kaklik |
842 |
0765: BSF 20.4 |
|
|
843 |
0766: MOVF 20,W |
|
|
844 |
0767: BSF 03.5 |
|
|
845 |
0768: MOVWF 07 |
|
|
846 |
0769: NOP |
|
|
847 |
076A: BCF 03.5 |
|
|
848 |
076B: BSF 20.3 |
|
|
849 |
076C: MOVF 20,W |
|
|
850 |
076D: BSF 03.5 |
|
|
851 |
076E: MOVWF 07 |
|
|
852 |
076F: NOP |
|
|
853 |
0770: BCF 03.5 |
|
|
854 |
0771: BTFSS 07.3 |
|
|
855 |
0772: GOTO 771 |
|
|
856 |
0773: BCF 07.4 |
|
|
857 |
0774: BCF 20.4 |
|
|
858 |
0775: MOVF 20,W |
|
|
859 |
0776: BSF 03.5 |
|
|
860 |
0777: MOVWF 07 |
|
|
861 |
0778: NOP |
|
|
862 |
0779: BCF 03.5 |
|
|
863 |
077A: BCF 07.3 |
|
|
864 |
077B: BCF 20.3 |
|
|
865 |
077C: MOVF 20,W |
|
|
866 |
077D: BSF 03.5 |
|
|
867 |
077E: MOVWF 07 |
2911 |
kaklik |
868 |
.................... I2C_Write(SHT25_ADDR+1); |
2912 |
kaklik |
869 |
077F: MOVLW 81 |
|
|
870 |
0780: BCF 03.5 |
|
|
871 |
0781: MOVWF 28 |
|
|
872 |
0782: CALL 031 |
2909 |
kaklik |
873 |
.................... MSB=i2c_read(1); |
2912 |
kaklik |
874 |
0783: MOVLW 01 |
|
|
875 |
0784: MOVWF 77 |
|
|
876 |
0785: CALL 131 |
|
|
877 |
0786: MOVF 78,W |
|
|
878 |
0787: MOVWF 23 |
2909 |
kaklik |
879 |
.................... LSB=i2c_read(1); |
2912 |
kaklik |
880 |
0788: MOVLW 01 |
|
|
881 |
0789: MOVWF 77 |
|
|
882 |
078A: CALL 131 |
|
|
883 |
078B: MOVF 78,W |
|
|
884 |
078C: MOVWF 24 |
2909 |
kaklik |
885 |
.................... Check=i2c_read(0); |
2912 |
kaklik |
886 |
078D: CLRF 77 |
|
|
887 |
078E: CALL 131 |
|
|
888 |
078F: MOVF 78,W |
|
|
889 |
0790: MOVWF 25 |
2909 |
kaklik |
890 |
.................... i2c_stop(); |
2912 |
kaklik |
891 |
0791: BCF 20.4 |
|
|
892 |
0792: MOVF 20,W |
|
|
893 |
0793: BSF 03.5 |
|
|
894 |
0794: MOVWF 07 |
|
|
895 |
0795: NOP |
|
|
896 |
0796: BCF 03.5 |
|
|
897 |
0797: BSF 20.3 |
|
|
898 |
0798: MOVF 20,W |
|
|
899 |
0799: BSF 03.5 |
|
|
900 |
079A: MOVWF 07 |
|
|
901 |
079B: BCF 03.5 |
|
|
902 |
079C: BTFSS 07.3 |
|
|
903 |
079D: GOTO 79C |
|
|
904 |
079E: NOP |
|
|
905 |
079F: GOTO 7A0 |
|
|
906 |
07A0: NOP |
|
|
907 |
07A1: BSF 20.4 |
|
|
908 |
07A2: MOVF 20,W |
|
|
909 |
07A3: BSF 03.5 |
|
|
910 |
07A4: MOVWF 07 |
|
|
911 |
07A5: NOP |
2906 |
jacho |
912 |
.................... |
2909 |
kaklik |
913 |
.................... LSB = LSB >> 2; // trow out status bits |
2912 |
kaklik |
914 |
07A6: BCF 03.5 |
|
|
915 |
07A7: RRF 24,F |
|
|
916 |
07A8: RRF 24,F |
|
|
917 |
07A9: MOVLW 3F |
|
|
918 |
07AA: ANDWF 24,F |
2906 |
jacho |
919 |
.................... |
2909 |
kaklik |
920 |
.................... data = (((unsigned int16) MSB << 8) + (LSB << 4) ); |
2912 |
kaklik |
921 |
07AB: CLRF 29 |
|
|
922 |
07AC: MOVF 23,W |
|
|
923 |
07AD: MOVWF 28 |
|
|
924 |
07AE: MOVWF 29 |
|
|
925 |
07AF: CLRF 28 |
|
|
926 |
07B0: SWAPF 24,W |
|
|
927 |
07B1: MOVWF 77 |
|
|
928 |
07B2: MOVLW F0 |
|
|
929 |
07B3: ANDWF 77,F |
|
|
930 |
07B4: MOVF 77,W |
|
|
931 |
07B5: ADDWF 28,W |
|
|
932 |
07B6: MOVWF 26 |
|
|
933 |
07B7: MOVF 29,W |
|
|
934 |
07B8: MOVWF 27 |
|
|
935 |
07B9: BTFSC 03.0 |
|
|
936 |
07BA: INCF 27,F |
2909 |
kaklik |
937 |
.................... return( -6.0 + 125.0*((float)data/0xFFFF)); |
2912 |
kaklik |
938 |
07BB: MOVF 27,W |
|
|
939 |
07BC: MOVWF 29 |
|
|
940 |
07BD: MOVF 26,W |
|
|
941 |
07BE: MOVWF 28 |
|
|
942 |
07BF: CALL 2AE |
|
|
943 |
07C0: MOVF 77,W |
|
|
944 |
07C1: MOVWF 28 |
|
|
945 |
07C2: MOVF 78,W |
|
|
946 |
07C3: MOVWF 29 |
|
|
947 |
07C4: MOVF 79,W |
|
|
948 |
07C5: MOVWF 2A |
|
|
949 |
07C6: MOVF 7A,W |
|
|
950 |
07C7: MOVWF 2B |
|
|
951 |
07C8: MOVWF 2F |
|
|
952 |
07C9: MOVF 79,W |
|
|
953 |
07CA: MOVWF 2E |
|
|
954 |
07CB: MOVF 78,W |
|
|
955 |
07CC: MOVWF 2D |
|
|
956 |
07CD: MOVF 77,W |
|
|
957 |
07CE: MOVWF 2C |
|
|
958 |
07CF: CLRF 33 |
|
|
959 |
07D0: MOVLW FF |
|
|
960 |
07D1: MOVWF 32 |
|
|
961 |
07D2: MOVLW 7F |
|
|
962 |
07D3: MOVWF 31 |
|
|
963 |
07D4: MOVLW 8E |
|
|
964 |
07D5: MOVWF 30 |
|
|
965 |
07D6: CALL 2CB |
|
|
966 |
07D7: CLRF 37 |
|
|
967 |
07D8: CLRF 36 |
|
|
968 |
07D9: MOVLW 7A |
|
|
969 |
07DA: MOVWF 35 |
|
|
970 |
07DB: MOVLW 85 |
|
|
971 |
07DC: MOVWF 34 |
|
|
972 |
07DD: MOVF 7A,W |
|
|
973 |
07DE: MOVWF 3B |
|
|
974 |
07DF: MOVF 79,W |
|
|
975 |
07E0: MOVWF 3A |
|
|
976 |
07E1: MOVF 78,W |
|
|
977 |
07E2: MOVWF 39 |
|
|
978 |
07E3: MOVF 77,W |
|
|
979 |
07E4: MOVWF 38 |
|
|
980 |
07E5: CALL 395 |
|
|
981 |
07E6: BCF 03.1 |
|
|
982 |
07E7: CLRF 2B |
|
|
983 |
07E8: CLRF 2A |
|
|
984 |
07E9: MOVLW C0 |
|
|
985 |
07EA: MOVWF 29 |
|
|
986 |
07EB: MOVLW 81 |
|
|
987 |
07EC: MOVWF 28 |
|
|
988 |
07ED: MOVF 7A,W |
|
|
989 |
07EE: MOVWF 2F |
|
|
990 |
07EF: MOVF 79,W |
|
|
991 |
07F0: MOVWF 2E |
|
|
992 |
07F1: MOVF 78,W |
|
|
993 |
07F2: MOVWF 2D |
|
|
994 |
07F3: MOVF 77,W |
|
|
995 |
07F4: MOVWF 2C |
|
|
996 |
07F5: CALL 40A |
2909 |
kaklik |
997 |
.................... } |
2912 |
kaklik |
998 |
07F6: BSF 0A.3 |
|
|
999 |
07F7: BCF 0A.4 |
|
|
1000 |
07F8: GOTO 103 (RETURN) |
2906 |
jacho |
1001 |
.................... |
|
|
1002 |
.................... |
2912 |
kaklik |
1003 |
.................... |
|
|
1004 |
.................... |
|
|
1005 |
.................... |
2909 |
kaklik |
1006 |
.................... void main() |
|
|
1007 |
.................... { |
|
|
1008 |
* |
2912 |
kaklik |
1009 |
0030: DATA 00,00 |
2909 |
kaklik |
1010 |
* |
|
|
1011 |
0800: CLRF 04 |
|
|
1012 |
0801: BCF 03.7 |
|
|
1013 |
0802: MOVLW 1F |
|
|
1014 |
0803: ANDWF 03,F |
|
|
1015 |
0804: MOVLW 71 |
|
|
1016 |
0805: BSF 03.5 |
|
|
1017 |
0806: MOVWF 0F |
|
|
1018 |
0807: MOVF 0F,W |
|
|
1019 |
0808: BCF 06.7 |
|
|
1020 |
0809: BCF 03.5 |
|
|
1021 |
080A: BSF 06.7 |
|
|
1022 |
080B: BSF 03.5 |
|
|
1023 |
080C: BSF 03.6 |
|
|
1024 |
080D: MOVF 09,W |
|
|
1025 |
080E: ANDLW C0 |
|
|
1026 |
080F: MOVWF 09 |
|
|
1027 |
0810: BCF 03.6 |
|
|
1028 |
0811: BCF 1F.4 |
|
|
1029 |
0812: BCF 1F.5 |
|
|
1030 |
0813: MOVLW 00 |
|
|
1031 |
0814: BSF 03.6 |
|
|
1032 |
0815: MOVWF 08 |
|
|
1033 |
0816: BCF 03.5 |
|
|
1034 |
0817: CLRF 07 |
|
|
1035 |
0818: CLRF 08 |
|
|
1036 |
0819: CLRF 09 |
2911 |
kaklik |
1037 |
* |
|
|
1038 |
081D: CLRF 21 |
2912 |
kaklik |
1039 |
.................... unsigned int8 i=0, sht_config; |
2906 |
jacho |
1040 |
.................... |
2909 |
kaklik |
1041 |
.................... setup_adc_ports(NO_ANALOGS|VSS_VDD); |
2911 |
kaklik |
1042 |
081E: BSF 03.5 |
|
|
1043 |
081F: BSF 03.6 |
|
|
1044 |
0820: MOVF 09,W |
|
|
1045 |
0821: ANDLW C0 |
|
|
1046 |
0822: MOVWF 09 |
|
|
1047 |
0823: BCF 03.6 |
|
|
1048 |
0824: BCF 1F.4 |
|
|
1049 |
0825: BCF 1F.5 |
|
|
1050 |
0826: MOVLW 00 |
|
|
1051 |
0827: BSF 03.6 |
|
|
1052 |
0828: MOVWF 08 |
2909 |
kaklik |
1053 |
.................... setup_adc(ADC_CLOCK_DIV_2); |
2911 |
kaklik |
1054 |
0829: BCF 03.5 |
|
|
1055 |
082A: BCF 03.6 |
|
|
1056 |
082B: BCF 1F.6 |
|
|
1057 |
082C: BCF 1F.7 |
|
|
1058 |
082D: BSF 03.5 |
|
|
1059 |
082E: BCF 1F.7 |
|
|
1060 |
082F: BCF 03.5 |
|
|
1061 |
0830: BSF 1F.0 |
2909 |
kaklik |
1062 |
.................... setup_spi(SPI_SS_DISABLED); |
2911 |
kaklik |
1063 |
0831: BCF 14.5 |
|
|
1064 |
0832: BCF 20.5 |
|
|
1065 |
0833: MOVF 20,W |
|
|
1066 |
0834: BSF 03.5 |
|
|
1067 |
0835: MOVWF 07 |
|
|
1068 |
0836: BCF 03.5 |
|
|
1069 |
0837: BSF 20.4 |
|
|
1070 |
0838: MOVF 20,W |
|
|
1071 |
0839: BSF 03.5 |
|
|
1072 |
083A: MOVWF 07 |
|
|
1073 |
083B: BCF 03.5 |
|
|
1074 |
083C: BCF 20.3 |
|
|
1075 |
083D: MOVF 20,W |
|
|
1076 |
083E: BSF 03.5 |
|
|
1077 |
083F: MOVWF 07 |
|
|
1078 |
0840: MOVLW 01 |
|
|
1079 |
0841: BCF 03.5 |
|
|
1080 |
0842: MOVWF 14 |
|
|
1081 |
0843: MOVLW 00 |
|
|
1082 |
0844: BSF 03.5 |
|
|
1083 |
0845: MOVWF 14 |
2909 |
kaklik |
1084 |
.................... setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1); |
2911 |
kaklik |
1085 |
0846: MOVF 01,W |
|
|
1086 |
0847: ANDLW C7 |
|
|
1087 |
0848: IORLW 08 |
|
|
1088 |
0849: MOVWF 01 |
2909 |
kaklik |
1089 |
.................... setup_timer_1(T1_DISABLED); |
2911 |
kaklik |
1090 |
084A: BCF 03.5 |
|
|
1091 |
084B: CLRF 10 |
2909 |
kaklik |
1092 |
.................... setup_timer_2(T2_DISABLED,0,1); |
2911 |
kaklik |
1093 |
084C: MOVLW 00 |
|
|
1094 |
084D: MOVWF 78 |
|
|
1095 |
084E: MOVWF 12 |
|
|
1096 |
084F: MOVLW 00 |
|
|
1097 |
0850: BSF 03.5 |
|
|
1098 |
0851: MOVWF 12 |
2909 |
kaklik |
1099 |
.................... setup_ccp1(CCP_OFF); |
2911 |
kaklik |
1100 |
0852: BCF 03.5 |
|
|
1101 |
0853: BSF 20.2 |
|
|
1102 |
0854: MOVF 20,W |
|
|
1103 |
0855: BSF 03.5 |
|
|
1104 |
0856: MOVWF 07 |
|
|
1105 |
0857: BCF 03.5 |
|
|
1106 |
0858: CLRF 17 |
|
|
1107 |
0859: BSF 03.5 |
|
|
1108 |
085A: CLRF 1B |
|
|
1109 |
085B: CLRF 1C |
|
|
1110 |
085C: MOVLW 01 |
|
|
1111 |
085D: MOVWF 1D |
2909 |
kaklik |
1112 |
.................... setup_comparator(NC_NC_NC_NC); |
2911 |
kaklik |
1113 |
085E: BCF 03.5 |
|
|
1114 |
085F: BSF 03.6 |
|
|
1115 |
0860: CLRF 07 |
|
|
1116 |
0861: CLRF 08 |
|
|
1117 |
0862: CLRF 09 |
2909 |
kaklik |
1118 |
.................... |
2911 |
kaklik |
1119 |
.................... SHT25_soft_reset(); |
|
|
1120 |
0863: BCF 0A.3 |
|
|
1121 |
0864: BCF 03.6 |
2912 |
kaklik |
1122 |
0865: GOTO 07B |
2911 |
kaklik |
1123 |
0866: BSF 0A.3 |
2909 |
kaklik |
1124 |
.................... printf("SHT25 humidity and temperature sensor example \r\n",); |
2911 |
kaklik |
1125 |
0867: MOVLW 04 |
|
|
1126 |
0868: BSF 03.6 |
|
|
1127 |
0869: MOVWF 0D |
|
|
1128 |
086A: MOVLW 00 |
|
|
1129 |
086B: MOVWF 0F |
|
|
1130 |
086C: BCF 0A.3 |
|
|
1131 |
086D: BCF 03.6 |
2912 |
kaklik |
1132 |
086E: GOTO 0D5 |
2911 |
kaklik |
1133 |
086F: BSF 0A.3 |
2909 |
kaklik |
1134 |
.................... delay_ms (500); |
2911 |
kaklik |
1135 |
0870: MOVLW 02 |
2912 |
kaklik |
1136 |
0871: MOVWF 23 |
2911 |
kaklik |
1137 |
0872: MOVLW FA |
2912 |
kaklik |
1138 |
0873: MOVWF 28 |
2911 |
kaklik |
1139 |
0874: BCF 0A.3 |
2912 |
kaklik |
1140 |
0875: CALL 11D |
2911 |
kaklik |
1141 |
0876: BSF 0A.3 |
2912 |
kaklik |
1142 |
0877: DECFSZ 23,F |
2911 |
kaklik |
1143 |
0878: GOTO 072 |
2909 |
kaklik |
1144 |
.................... |
|
|
1145 |
.................... while(TRUE) |
|
|
1146 |
.................... { |
2912 |
kaklik |
1147 |
.................... if (i<10) sht_config = SHT25_RH12_T14 | SHT25_HEATER_OFF; // loop alters on chip heater on and off to check correct function |
2911 |
kaklik |
1148 |
0879: MOVF 21,W |
|
|
1149 |
087A: SUBLW 09 |
|
|
1150 |
087B: BTFSS 03.0 |
2912 |
kaklik |
1151 |
087C: GOTO 07F |
2911 |
kaklik |
1152 |
087D: CLRF 22 |
|
|
1153 |
.................... else |
2912 |
kaklik |
1154 |
087E: GOTO 085 |
2911 |
kaklik |
1155 |
.................... { |
2912 |
kaklik |
1156 |
.................... sht_config = SHT25_RH12_T14 | SHT25_HEATER_ON; |
|
|
1157 |
087F: MOVLW 04 |
|
|
1158 |
0880: MOVWF 22 |
|
|
1159 |
.................... if (i > 20) i = 0; |
|
|
1160 |
0881: MOVF 21,W |
|
|
1161 |
0882: SUBLW 14 |
|
|
1162 |
0883: BTFSS 03.0 |
|
|
1163 |
0884: CLRF 21 |
|
|
1164 |
.................... } |
|
|
1165 |
.................... printf("setup: %X %X \r\n",SHT25_setup(sht_config),sht_config); |
|
|
1166 |
0885: MOVF 22,W |
|
|
1167 |
0886: MOVWF 23 |
|
|
1168 |
0887: BCF 0A.3 |
|
|
1169 |
0888: GOTO 176 |
|
|
1170 |
0889: BSF 0A.3 |
|
|
1171 |
088A: MOVF 78,W |
|
|
1172 |
088B: MOVWF 23 |
|
|
1173 |
088C: MOVLW 1D |
|
|
1174 |
088D: BSF 03.6 |
|
|
1175 |
088E: MOVWF 0D |
|
|
1176 |
088F: MOVLW 00 |
|
|
1177 |
0890: MOVWF 0F |
|
|
1178 |
0891: BCF 03.0 |
|
|
1179 |
0892: MOVLW 07 |
|
|
1180 |
0893: BCF 03.6 |
|
|
1181 |
0894: MOVWF 27 |
|
|
1182 |
0895: BCF 0A.3 |
|
|
1183 |
0896: CALL 23E |
|
|
1184 |
0897: BSF 0A.3 |
|
|
1185 |
0898: MOVF 23,W |
|
|
1186 |
0899: MOVWF 24 |
|
|
1187 |
089A: MOVLW 37 |
|
|
1188 |
089B: MOVWF 25 |
|
|
1189 |
089C: BCF 0A.3 |
|
|
1190 |
089D: CALL 28D |
|
|
1191 |
089E: BSF 0A.3 |
|
|
1192 |
089F: MOVLW 20 |
|
|
1193 |
08A0: MOVWF 34 |
|
|
1194 |
08A1: BCF 0A.3 |
|
|
1195 |
08A2: CALL 0B3 |
|
|
1196 |
08A3: BSF 0A.3 |
|
|
1197 |
08A4: MOVF 22,W |
|
|
1198 |
08A5: MOVWF 24 |
|
|
1199 |
08A6: MOVLW 37 |
|
|
1200 |
08A7: MOVWF 25 |
2911 |
kaklik |
1201 |
08A8: BCF 0A.3 |
2912 |
kaklik |
1202 |
08A9: CALL 28D |
2911 |
kaklik |
1203 |
08AA: BSF 0A.3 |
2912 |
kaklik |
1204 |
08AB: MOVLW 20 |
|
|
1205 |
08AC: MOVWF 34 |
|
|
1206 |
08AD: BCF 0A.3 |
|
|
1207 |
08AE: CALL 0B3 |
|
|
1208 |
08AF: BSF 0A.3 |
|
|
1209 |
08B0: MOVLW 0D |
|
|
1210 |
08B1: MOVWF 34 |
|
|
1211 |
08B2: BCF 0A.3 |
|
|
1212 |
08B3: CALL 0B3 |
|
|
1213 |
08B4: BSF 0A.3 |
|
|
1214 |
08B5: MOVLW 0A |
|
|
1215 |
08B6: MOVWF 34 |
|
|
1216 |
08B7: BCF 0A.3 |
|
|
1217 |
08B8: CALL 0B3 |
|
|
1218 |
08B9: BSF 0A.3 |
2909 |
kaklik |
1219 |
.................... delay_ms (500); |
2912 |
kaklik |
1220 |
08BA: MOVLW 02 |
|
|
1221 |
08BB: MOVWF 23 |
|
|
1222 |
08BC: MOVLW FA |
|
|
1223 |
08BD: MOVWF 28 |
|
|
1224 |
08BE: BCF 0A.3 |
|
|
1225 |
08BF: CALL 11D |
|
|
1226 |
08C0: BSF 0A.3 |
|
|
1227 |
08C1: DECFSZ 23,F |
|
|
1228 |
08C2: GOTO 0BC |
2909 |
kaklik |
1229 |
.................... printf("Temp: %f \r\n",SHT25_get_temp()); |
2912 |
kaklik |
1230 |
08C3: BCF 0A.3 |
|
|
1231 |
08C4: GOTO 54B |
|
|
1232 |
08C5: BSF 0A.3 |
|
|
1233 |
08C6: MOVF 77,W |
|
|
1234 |
08C7: MOVWF 23 |
|
|
1235 |
08C8: MOVF 78,W |
|
|
1236 |
08C9: MOVWF 24 |
|
|
1237 |
08CA: MOVF 79,W |
|
|
1238 |
08CB: MOVWF 25 |
|
|
1239 |
08CC: MOVF 7A,W |
|
|
1240 |
08CD: MOVWF 26 |
|
|
1241 |
08CE: MOVLW 25 |
|
|
1242 |
08CF: BSF 03.6 |
|
|
1243 |
08D0: MOVWF 0D |
|
|
1244 |
08D1: MOVLW 00 |
|
|
1245 |
08D2: MOVWF 0F |
|
|
1246 |
08D3: BCF 03.0 |
|
|
1247 |
08D4: MOVLW 06 |
|
|
1248 |
08D5: BCF 03.6 |
|
|
1249 |
08D6: MOVWF 27 |
|
|
1250 |
08D7: BCF 0A.3 |
|
|
1251 |
08D8: CALL 23E |
|
|
1252 |
08D9: BSF 0A.3 |
|
|
1253 |
08DA: MOVLW 89 |
|
|
1254 |
08DB: MOVWF 04 |
|
|
1255 |
08DC: MOVF 26,W |
|
|
1256 |
08DD: MOVWF 2A |
|
|
1257 |
08DE: MOVF 25,W |
|
|
1258 |
08DF: MOVWF 29 |
|
|
1259 |
08E0: MOVF 24,W |
|
|
1260 |
08E1: MOVWF 28 |
|
|
1261 |
08E2: MOVF 23,W |
|
|
1262 |
08E3: MOVWF 27 |
|
|
1263 |
08E4: MOVLW 02 |
|
|
1264 |
08E5: MOVWF 2B |
|
|
1265 |
08E6: BCF 0A.3 |
|
|
1266 |
08E7: CALL 65C |
|
|
1267 |
08E8: BSF 0A.3 |
|
|
1268 |
08E9: MOVLW 20 |
|
|
1269 |
08EA: MOVWF 34 |
|
|
1270 |
08EB: BCF 0A.3 |
|
|
1271 |
08EC: CALL 0B3 |
|
|
1272 |
08ED: BSF 0A.3 |
|
|
1273 |
08EE: MOVLW 0D |
|
|
1274 |
08EF: MOVWF 34 |
|
|
1275 |
08F0: BCF 0A.3 |
|
|
1276 |
08F1: CALL 0B3 |
|
|
1277 |
08F2: BSF 0A.3 |
|
|
1278 |
08F3: MOVLW 0A |
|
|
1279 |
08F4: MOVWF 34 |
|
|
1280 |
08F5: BCF 0A.3 |
|
|
1281 |
08F6: CALL 0B3 |
|
|
1282 |
08F7: BSF 0A.3 |
|
|
1283 |
.................... delay_ms (500); |
|
|
1284 |
08F8: MOVLW 02 |
|
|
1285 |
08F9: MOVWF 23 |
|
|
1286 |
08FA: MOVLW FA |
|
|
1287 |
08FB: MOVWF 28 |
2911 |
kaklik |
1288 |
08FC: BCF 0A.3 |
2912 |
kaklik |
1289 |
08FD: CALL 11D |
2911 |
kaklik |
1290 |
08FE: BSF 0A.3 |
2912 |
kaklik |
1291 |
08FF: DECFSZ 23,F |
|
|
1292 |
0900: GOTO 0FA |
|
|
1293 |
.................... printf("Hum: %f \r\n",SHT25_get_hum()); |
2911 |
kaklik |
1294 |
0901: BCF 0A.3 |
2912 |
kaklik |
1295 |
0902: GOTO 743 |
2911 |
kaklik |
1296 |
0903: BSF 0A.3 |
2912 |
kaklik |
1297 |
0904: MOVF 77,W |
|
|
1298 |
0905: MOVWF 23 |
|
|
1299 |
0906: MOVF 78,W |
|
|
1300 |
0907: MOVWF 24 |
|
|
1301 |
0908: MOVF 79,W |
|
|
1302 |
0909: MOVWF 25 |
|
|
1303 |
090A: MOVF 7A,W |
|
|
1304 |
090B: MOVWF 26 |
|
|
1305 |
090C: MOVLW 2B |
|
|
1306 |
090D: BSF 03.6 |
|
|
1307 |
090E: MOVWF 0D |
|
|
1308 |
090F: MOVLW 00 |
|
|
1309 |
0910: MOVWF 0F |
|
|
1310 |
0911: BCF 03.0 |
|
|
1311 |
0912: MOVLW 05 |
|
|
1312 |
0913: BCF 03.6 |
|
|
1313 |
0914: MOVWF 27 |
|
|
1314 |
0915: BCF 0A.3 |
|
|
1315 |
0916: CALL 23E |
|
|
1316 |
0917: BSF 0A.3 |
|
|
1317 |
0918: MOVLW 89 |
|
|
1318 |
0919: MOVWF 04 |
|
|
1319 |
091A: MOVF 26,W |
|
|
1320 |
091B: MOVWF 2A |
|
|
1321 |
091C: MOVF 25,W |
|
|
1322 |
091D: MOVWF 29 |
|
|
1323 |
091E: MOVF 24,W |
|
|
1324 |
091F: MOVWF 28 |
|
|
1325 |
0920: MOVF 23,W |
|
|
1326 |
0921: MOVWF 27 |
|
|
1327 |
0922: MOVLW 02 |
|
|
1328 |
0923: MOVWF 2B |
|
|
1329 |
0924: BCF 0A.3 |
|
|
1330 |
0925: CALL 65C |
|
|
1331 |
0926: BSF 0A.3 |
|
|
1332 |
0927: MOVLW 20 |
|
|
1333 |
0928: MOVWF 34 |
|
|
1334 |
0929: BCF 0A.3 |
|
|
1335 |
092A: CALL 0B3 |
|
|
1336 |
092B: BSF 0A.3 |
|
|
1337 |
092C: MOVLW 0D |
|
|
1338 |
092D: MOVWF 34 |
|
|
1339 |
092E: BCF 0A.3 |
|
|
1340 |
092F: CALL 0B3 |
|
|
1341 |
0930: BSF 0A.3 |
|
|
1342 |
0931: MOVLW 0A |
|
|
1343 |
0932: MOVWF 34 |
|
|
1344 |
0933: BCF 0A.3 |
|
|
1345 |
0934: CALL 0B3 |
|
|
1346 |
0935: BSF 0A.3 |
|
|
1347 |
.................... delay_ms (1000); |
|
|
1348 |
0936: MOVLW 04 |
|
|
1349 |
0937: MOVWF 23 |
|
|
1350 |
0938: MOVLW FA |
|
|
1351 |
0939: MOVWF 28 |
2911 |
kaklik |
1352 |
093A: BCF 0A.3 |
2912 |
kaklik |
1353 |
093B: CALL 11D |
2911 |
kaklik |
1354 |
093C: BSF 0A.3 |
2912 |
kaklik |
1355 |
093D: DECFSZ 23,F |
|
|
1356 |
093E: GOTO 138 |
2911 |
kaklik |
1357 |
.................... i++; |
2912 |
kaklik |
1358 |
093F: INCF 21,F |
2909 |
kaklik |
1359 |
.................... } |
2912 |
kaklik |
1360 |
0940: GOTO 079 |
2906 |
jacho |
1361 |
.................... } |
|
|
1362 |
.................... |
2912 |
kaklik |
1363 |
0941: SLEEP |
2906 |
jacho |
1364 |
|
|
|
1365 |
Configuration Fuses: |
2909 |
kaklik |
1366 |
Word 1: 2CF4 INTRC_IO NOWDT NOPUT MCLR NOPROTECT NOCPD NOBROWNOUT IESO FCMEN NOLVP NODEBUG |
2906 |
jacho |
1367 |
Word 2: 3FFF NOWRT BORV40 |