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