Mercurial > public > hwos_code
annotate src/comm.asm @ 108:24e8bac09013
language updates
author | heinrichsweikamp |
---|---|
date | Wed, 04 Jun 2014 19:19:18 +0200 |
parents | 53a99a2dc6a1 |
children | d39493c786a2 |
rev | line source |
---|---|
0 | 1 ;============================================================================= |
2 ; | |
3 ; File comm.asm | |
4 ; | |
5 ; RS232 via USB | |
6 ; | |
7 ; Copyright (c) 2012, JD Gascuel, HeinrichsWeikamp, all right reserved. | |
8 ;============================================================================= | |
9 ; HISTORY | |
10 ; 2011-08-22 : [mH] Creation | |
11 ; 2012-02-11 : [jDG] Added "c" set custom text, and "i" identify. | |
12 | |
13 #include "ostc3.inc" | |
14 #include "eeprom_rs232.inc" | |
15 #include "tft.inc" | |
16 #include "wait.inc" | |
17 #include "strings.inc" | |
18 #include "convert.inc" | |
19 #include "external_flash.inc" | |
20 #include "tft_outputs.inc" | |
21 #include "surfmode.inc" | |
22 #include "rtc.inc" | |
23 #include "adc_lightsensor.inc" | |
24 | |
66
00636132cca6
BUGFIX: Maintain last selected customview in surface mode
heinrichsweikamp
parents:
50
diff
changeset
|
25 extern testloop,new_battery_menu,restart,option_reset_all |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
26 extern char_I_dil_change, char_I_setpoint_cbar, char_I_setpoint_change |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
27 extern char_I_deco_model, char_I_extra_time, char_I_saturation_multiplier, char_I_desaturation_multiplier |
81
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
28 extern option_check_all, gaslist_cleanup_list, get_first_gas_to_WREG, get_first_dil_to_WREG |
0 | 29 |
30 #DEFINE timeout_comm_pre_mode .120 ; Pre-loop | |
31 #DEFINE timeout_comm_mode .120 ; Download mode | |
32 #DEFINE timeout_service_mode .120 ; Service mode | |
33 | |
34 #DEFINE comm_title_row .0 | |
35 #DEFINE comm_title_column .50 | |
36 | |
37 #DEFINE comm_string_row .30 | |
38 #DEFINE comm_string_column .40 | |
39 | |
40 | |
41 #DEFINE comm_status1_row .70 | |
42 #DEFINE comm_status1_column .10 | |
43 #DEFINE comm_status2_row .100 | |
44 #DEFINE comm_status2_column comm_status1_column | |
45 #DEFINE comm_status3_row .130 | |
46 #DEFINE comm_status3_column comm_status1_column | |
47 | |
48 #DEFINE comm_warning_row .160 | |
49 #DEFINE comm_warning_column .65 | |
50 | |
51 comm code | |
52 | |
53 ; test for comm | |
54 global comm_mode | |
55 comm_mode: | |
56 call TFT_ClearScreen | |
57 WIN_COLOR color_greenish | |
58 WIN_SMALL comm_title_column, comm_title_row | |
59 STRCPY_TEXT_PRINT tUsbTitle ; comm Mode | |
60 call TFT_standard_color | |
61 WIN_TOP .10 | |
62 WIN_LEFT .1 | |
63 movlw 0xDE | |
64 movwf TBLPTRL | |
65 movlw 0xEE | |
66 movwf TBLPTRH | |
67 movlw 0x01 | |
68 movwf TBLPTRU | |
69 call color_image ; Show usb logo | |
70 WIN_SMALL comm_status1_column, comm_status1_row | |
71 STRCPY_TEXT_PRINT tUsbStarting ; Starting... | |
72 call TFT_serial ; Show serial and firmware version | |
73 bcf enable_screen_dumps ; =1: Ignore vin_usb, wait for "l" command (Screen dump) | |
74 bcf switch_right | |
75 bcf comm_service_enabled | |
76 bsf menubit | |
77 bcf battery_removed_in_usb ; =1: The battery has been removed in USB | |
78 movlw timeout_comm_pre_mode | |
79 movwf timeout_counter | |
80 WIN_SMALL comm_status1_column+.80, comm_status1_row | |
81 STRCPY_TEXT_PRINT tUsbStartDone ; Done... | |
82 call enable_rs232 ; Also sets to speed_normal ... | |
83 comm_mode1: | |
84 bcf onesecupdate | |
85 bcf LEDr | |
86 dcfsnz timeout_counter,F | |
87 bra comm_service_exit ; Timeout -> Exit | |
88 comm_mode2: | |
89 call get_battery_voltage ; gets battery voltage | |
90 movlw .3 | |
91 cpfslt batt_voltage+1 ; Batt Voltage less then 3*256mV? | |
92 bra comm_mode3 ; No | |
93 ; Set flag | |
94 bsf battery_removed_in_usb ; =1: The battery has been removed in USB | |
95 bra comm_mode4 | |
96 | |
97 comm_mode3: | |
98 ; Voltage ok. Do we have a new battery now? | |
99 btfsc battery_removed_in_usb ; =1: The battery has been removed in USB | |
100 goto new_battery_menu ; show "New battery dialog" | |
101 | |
102 comm_mode4: | |
103 call rs232_get_byte | |
104 | |
105 btfss vusb_in ; USB plugged in? | |
69 | 106 bra comm_service_exit_nousb_delay ; Disconnected -> Exit |
107 comm_mode4a: | |
0 | 108 |
109 btfsc switch_right ; Abort with right | |
110 bra comm_service_exit | |
111 | |
112 btfsc onesecupdate | |
113 bra comm_mode1 | |
114 | |
115 movlw 0xAA ; start byte=0xAA? | |
116 cpfseq RCREG1 | |
117 bra comm_mode2a | |
118 bra comm_mode2b ; Startbyte for service mode found | |
119 comm_mode2a: | |
120 movlw 0xBB ; start byte=0xBB? | |
121 cpfseq RCREG1 | |
122 bra comm_mode2 ; Cycle | |
123 bra comm_download_mode ; Startbyte for download mode found | |
124 | |
125 comm_mode2b: | |
126 ; Startbyte found | |
127 call rs232_wait_tx ; Wait for UART | |
128 movlw 0x4B | |
129 movwf TXREG1 ; Send Answer | |
130 ; Now, check comm command | |
131 | |
132 call rs232_get_byte ; first byte | |
133 call rs232_wait_tx ; Wait for UART | |
134 movff RCREG1,TXREG1 ; Echo | |
135 movlw UPPER comm_service_key | |
136 cpfseq RCREG1 | |
137 bra comm_mode1 ; Wrong -> Restart | |
138 call rs232_get_byte ; second byte | |
139 call rs232_wait_tx ; Wait for UART | |
140 movff RCREG1,TXREG1 ; Echo | |
141 movlw HIGH (comm_service_key & 0xFFFF) | |
142 cpfseq RCREG1 | |
143 bra comm_mode1 ; Wrong -> Restart | |
144 call rs232_get_byte ; third byte | |
145 call rs232_wait_tx ; Wait for UART | |
146 movff RCREG1,TXREG1 ; Echo | |
147 movlw LOW comm_service_key | |
148 cpfseq RCREG1 | |
149 bra comm_mode1 ; Wrong -> Restart | |
150 | |
151 ; Enable comm service mode | |
152 WIN_SMALL comm_status2_column, comm_status2_row | |
153 STRCPY_TEXT_PRINT tUsbServiceMode ; Service mode enabled | |
154 bsf comm_service_enabled | |
155 bra comm_download_mode0 ; Startbyte for download mode found | |
156 | |
69 | 157 |
158 comm_service_exit_nousb_delay: | |
159 WAITMS d'200' | |
160 btfss vusb_in ; USB plugged in? | |
161 bra comm_service_exit_nousb ; Disconnected -> Exit | |
162 bra comm_mode4a ; (Still) connected, return | |
163 | |
0 | 164 comm_service_exit_nousb: ; Disconnected -> Exit |
165 WIN_SMALL comm_status3_column, comm_status3_row | |
166 STRCPY_TEXT_PRINT tUsbClosed ; Port closed | |
167 bra comm_service_exit_common | |
168 | |
169 comm_service_exit: | |
170 WIN_SMALL comm_status3_column, comm_status3_row | |
171 STRCPY_TEXT_PRINT tUsbExit ; Exited | |
172 | |
173 comm_service_exit_common: | |
174 call rs232_wait_tx ; Wait for UART | |
175 movlw 0xFF ; Reply FF | |
176 movwf TXREG1 ; Send Answer | |
177 | |
178 ; Wait 1 second | |
179 bcf onesecupdate | |
180 btfss onesecupdate | |
181 bra $-2 | |
182 ; Wait 1 second | |
183 bcf onesecupdate | |
184 btfss onesecupdate | |
185 bra $-2 | |
186 | |
187 call disable_rs232 | |
188 bcf LEDr | |
189 goto restart | |
190 | |
191 ;----------------------------------------------------------------------------- | |
192 | |
193 comm_service_ll_bootloader: | |
194 bsf LEDr | |
195 WIN_SMALL comm_status3_column, comm_status3_row | |
196 STRCPY_TEXT_PRINT tUsbLlBld ; Low Level Bootloader started | |
197 WIN_TOP comm_warning_row | |
198 WIN_LEFT comm_warning_column | |
199 TFT_WRITE_PROM_IMAGE dive_warning_block ; Show Warning icon | |
200 goto 0x1FF0C | |
201 | |
202 ;----------------------------------------------------------------------------- | |
203 ; Sends external flash from 0x3E0000 to 0x3FD000 (118784bytes) via comm | |
204 ; | |
205 comm_send_firmware: | |
206 movlw 0x50 ; send echo | |
207 movwf TXREG1 | |
208 call rs232_wait_tx ; Wait for UART | |
209 | |
210 ; Read 5 bytes into buffer. | |
211 lfsr FSR2,buffer | |
212 movlw .5 ; counter | |
213 movwf lo | |
214 movlw 0x55 ; 5'ft byte checksum. | |
215 movwf hi | |
216 | |
217 comm_send_firmware_loop: | |
218 call rs232_get_byte | |
219 btfsc rs232_recieve_overflow ; Got byte? | |
220 bra comm_send_firmware_abort ; No, abort! | |
221 movf RCREG1,W | |
222 movwf POSTINC2 ; Store checksum byte. | |
223 xorwf hi,F ; Also xor into checksum | |
224 rlncf hi,F ; And rotate it. | |
225 decfsz lo,F | |
226 bra comm_send_firmware_loop | |
227 | |
228 ; Check that 5ft byte checksum's checksum | |
229 movf hi,W | |
230 bnz comm_send_firmware_failed | |
231 | |
232 movlw 0x4C ; send OK | |
233 movwf TXREG1 | |
234 call rs232_wait_tx ; Wait for UART | |
235 | |
236 ; Passed: goto second stage verification. | |
237 ; NOTE: Bootloader is Bank0. With buffer at address 0x200. | |
238 goto 0x1FDF0 ; And pray... | |
239 | |
240 comm_send_firmware_failed: | |
241 WIN_SMALL comm_string_column, comm_string_row | |
50 | 242 call TFT_warnings_color |
0 | 243 STRCPY_PRINT "Checksum failed" |
244 | |
245 comm_send_firmware_abort: | |
246 | |
247 movlw 0xFF ; send ABORTED byte. | |
248 movwf TXREG1 | |
249 call rs232_wait_tx ; Wait for UART | |
250 bra comm_download_mode0 ; Done. | |
251 | |
252 ;----------------------------------------------------------------------------- | |
253 ; Reset to Dive 1 in logbook | |
254 | |
255 comm_reset_logbook_pointers: | |
256 clrf EEADRH ; Make sure to select eeprom bank 0 | |
257 clrf EEDATA | |
258 write_int_eeprom .4 | |
259 write_int_eeprom .5 | |
260 write_int_eeprom .6 | |
261 write_int_eeprom .2 ; Also, delete total dive counter | |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
262 write_int_eeprom .3 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
263 write_int_eeprom .15 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
264 write_int_eeprom .16 ; And the backup counter, too |
0 | 265 call ext_flash_erase_logbook ; And complete logbook (!) |
266 bra comm_download_mode0 ; Done. | |
267 | |
268 ;----------------------------------------------------------------------------- | |
269 comm_reset_battery_gauge: ; Resets battery gauge registers | |
270 call reset_battery_pointer ; Resets battery pointer 0x07-0x0C and battery_gauge:5 | |
271 bra comm_download_mode0 ; Done. | |
272 | |
273 ;----------------------------------------------------------------------------- | |
274 ; erases range in 4kB steps | |
275 | |
276 comm_erase_range4kb: | |
277 movlw 0x42 ; send echo | |
278 movwf TXREG1 | |
279 call rs232_wait_tx ; Wait for UART | |
280 | |
281 bcf INTCON,GIE ; All interrups off! | |
282 | |
283 rcall comm_get_flash_address ; Get three bytes address or return | |
284 btfsc rs232_recieve_overflow ; Got Data? | |
285 bra comm_download_mode0 ; No, Done. | |
286 | |
287 call rs232_get_byte | |
288 btfsc rs232_recieve_overflow ; Got byte? | |
289 bra comm_download_mode0 ; No, Done. | |
290 movff RCREG1,lo | |
291 ; Got 4bytes: 3bytes address and 1 bytes (lo) amount of 4kB blocks | |
292 | |
293 comm_erase_range4kb1: | |
294 call ext_flash_erase4kB ; Erase block! | |
295 | |
296 movlw 0x10 | |
297 addwf ext_flash_address+1,F | |
298 movlw .0 | |
299 addwfc ext_flash_address+2,F ; Increase address by .4096, or 0x1000 | |
300 decfsz lo,F | |
301 bra comm_erase_range4kb1 ; Loop until lo=zero | |
302 | |
303 bra comm_download_mode0 ; Done (Sends the 4C OK too). | |
304 | |
305 ;----------------------------------------------------------------------------- | |
306 | |
307 comm_erase_4kb: ; Get 3 bytes start address | |
308 bcf INTCON,GIE ; All interrups off! | |
309 | |
310 rcall comm_get_flash_address ; Get three bytes address or return | |
311 btfsc rs232_recieve_overflow ; Got Data? | |
312 bra comm_download_mode0 ; No, Done. | |
313 | |
314 call ext_flash_erase4kB ; Erase one block | |
315 bra comm_download_mode0 ; Done. | |
316 | |
317 ;----------------------------------------------------------------------------- | |
318 | |
319 comm_write_range: ; Get 3 bytes start address | |
320 movlw 0x30 ; send echo | |
321 movwf TXREG1 | |
322 call rs232_wait_tx ; Wait for UART | |
323 | |
324 bcf INTCON,GIE ; All interrups off! | |
325 | |
326 rcall comm_get_flash_address ; Get three bytes address or return | |
327 btfsc rs232_recieve_overflow ; Got Data? | |
328 bra comm_download_mode0 ; No, Done. | |
329 | |
330 comm_write_range_loop: | |
331 call rs232_get_byte | |
332 btfsc rs232_recieve_overflow ; Got byte? | |
333 bra comm_download_mode0 ; No, Done (and send OK byte too). | |
334 movf RCREG1,W | |
335 call ext_flash_byte_write ; write one byte | |
336 call incf_ext_flash_address_p1 ; increase address+1 | |
337 bra comm_write_range_loop | |
338 | |
339 ;----------------------------------------------------------------------------- | |
340 | |
341 comm_send_range: ; Get 3 bytes start address and 3 bytes amount | |
342 movlw 0x20 ; send echo | |
343 movwf TXREG1 | |
344 call rs232_wait_tx ; Wait for UART | |
345 | |
346 bcf INTCON,GIE ; All interrups off! | |
347 | |
348 rcall comm_get_flash_address ; Get three bytes address or return | |
349 btfsc rs232_recieve_overflow ; Got Data? | |
350 bra comm_download_mode0 ; No, Done. | |
351 | |
352 call rs232_get_byte | |
353 btfsc rs232_recieve_overflow ; Got byte? | |
354 bra comm_download_mode0 ; No, Done. | |
355 movff RCREG1,up | |
356 call rs232_get_byte | |
357 btfsc rs232_recieve_overflow ; Got byte? | |
358 bra comm_download_mode0 ; No, Done. | |
359 movff RCREG1,hi | |
360 call rs232_get_byte | |
361 btfsc rs232_recieve_overflow ; Got byte? | |
362 bra comm_download_mode0 ; No, Done. | |
363 movff RCREG1,lo | |
364 | |
365 ; If lo==0, we must precondition hi because there is to many bytes send ! | |
366 movf lo,W | |
367 bnz $+4 | |
368 decf hi,F | |
369 | |
370 ; 6bytes received, send data | |
371 comm_send_range2: ; needs ext_flash_address:3 start address and up:hi:lo amount | |
372 call ext_flash_read_block_start | |
373 movwf TXREG1 | |
374 | |
375 bra comm_send_range24 ; counter 24bit | |
376 comm_send_range24_loop: | |
377 call ext_flash_read_block ; Read one byte | |
378 movwf TXREG1 ; Start new transmit | |
379 comm_send_range24: | |
380 call rs232_wait_tx ; Wait for UART | |
381 decfsz lo,F | |
382 bra comm_send_range24_loop | |
383 decf hi,F | |
384 movlw 0xFF | |
385 cpfseq hi | |
386 bra comm_send_range24_loop | |
387 decf up,F | |
388 movlw 0xFF | |
389 cpfseq up | |
390 bra comm_send_range24_loop | |
391 call ext_flash_read_block_stop | |
392 | |
393 bra comm_download_mode0 ; Done. | |
394 | |
395 ;----------------------------------------------------------------------------- | |
396 | |
397 comm_get_flash_address: | |
398 call rs232_get_byte | |
399 btfsc rs232_recieve_overflow ; Got byte? | |
400 return ; No, return | |
401 movff RCREG1,ext_flash_address+2 | |
402 call rs232_get_byte | |
403 btfsc rs232_recieve_overflow ; Got byte? | |
404 return ; No, return | |
405 movff RCREG1,ext_flash_address+1 | |
406 call rs232_get_byte | |
407 btfsc rs232_recieve_overflow ; Got byte? | |
408 return ; No, return | |
409 movff RCREG1,ext_flash_address+0 | |
410 return | |
411 | |
412 ;----------------------------------------------------------------------------- | |
413 | |
414 comm_download_mode: | |
415 ; Enable comm download mode | |
416 WIN_SMALL comm_status2_column, comm_status2_row | |
417 STRCPY_TEXT_PRINT tUsbDownloadMode; Download mode enabled | |
418 bsf INTCON,GIE ; All interrups on | |
419 call rs232_wait_tx ; Wait for UART | |
420 movlw 0xBB ; Command Echo | |
421 movwf TXREG1 ; Send Answer | |
422 comm_download_mode0: | |
423 bsf INTCON,GIE ; All interrups on | |
424 call rs232_wait_tx ; Wait for UART | |
425 movlw 0x4C ; 4C in service mode | |
426 btfss comm_service_enabled | |
427 movlw 0x4D ; 4D in download mode | |
428 movwf TXREG1 ; Send Answer | |
429 movlw timeout_service_mode | |
430 movwf timeout_counter ; Timeout | |
431 bcf switch_right | |
432 comm_download_mode1: | |
433 bcf onesecupdate | |
434 dcfsnz timeout_counter,F | |
435 bra comm_service_exit ; Timeout -> Exit | |
436 comm_download_mode2: | |
437 call rs232_get_byte ; Check for a byte | |
438 btfsc comm_service_enabled | |
439 btg LEDr ; Blink in Service mode | |
440 btfss vusb_in ; USB plugged in? | |
441 bra comm_service_exit_nousb ; Disconnected -> Exit | |
442 btfsc switch_right ; Abort with right | |
443 bra comm_service_exit | |
444 btfsc onesecupdate | |
445 bra comm_download_mode1 | |
446 btfsc rs232_recieve_overflow | |
447 bra comm_download_mode2 ; Wait for command byte | |
448 | |
449 ; command received! | |
450 bcf LEDr | |
451 movlw 0xFF | |
452 cpfseq RCREG1 | |
453 bra $+4 | |
454 bra comm_service_exit ; exit | |
455 movlw "a" | |
456 cpfseq RCREG1 | |
457 bra $+4 | |
458 bra comm_send_headers ; Send all 256 dive headers | |
459 movlw "b" | |
460 cpfseq RCREG1 | |
461 bra $+4 | |
462 bra comm_set_time ; Read time and date from the PC and set clock | |
463 movlw "c" | |
464 cpfseq RCREG1 | |
465 bra $+4 | |
466 bra comm_set_custom_text ; Send a opt_name_length byte string of custom text. | |
467 movlw "f" | |
468 cpfseq RCREG1 | |
469 bra $+4 | |
470 bra comm_send_dive ; Send header and profile for one dive | |
471 movlw "i" | |
472 cpfseq RCREG1 | |
473 bra $+4 | |
474 bra comm_identify ; Send firmware, serial, etc. | |
475 movlw "n" | |
476 cpfseq RCREG1 | |
477 bra $+4 | |
80 | 478 goto comm_send_string ; Send a 15byte string to the screen |
0 | 479 movlw "l" |
480 cpfseq RCREG1 | |
481 bra $+4 | |
482 call TFT_dump_screen ; Dump the screen contents | |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
483 movlw "r" |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
484 cpfseq RCREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
485 bra $+4 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
486 bra comm_read_setting ; Read a setting (And send via USB) |
80 | 487 movlw "w" |
488 cpfseq RCREG1 | |
489 bra $+4 | |
490 bra comm_write_setting ; Write a setting (Into RAM) | |
491 movlw "x" | |
492 cpfseq RCREG1 | |
493 bra $+4 | |
494 bra comm_option_reset_all ; Reset all options to factory default. | |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
495 |
0 | 496 |
497 btfss comm_service_enabled ; Done for Download mode | |
498 bra comm_download_mode0 ; Loop with timeout reset | |
499 | |
500 movlw 0x20 | |
501 cpfseq RCREG1 | |
502 bra $+4 | |
503 bra comm_send_range ; send hi:lo:temp1 bytes starting from ext_flash_address:3 | |
504 movlw 0x22 | |
505 cpfseq RCREG1 | |
506 bra $+4 | |
507 bra comm_reset_logbook_pointers ; Resets all logbook pointers and the logbook (!) | |
508 movlw 0x23 | |
509 cpfseq RCREG1 | |
510 bra $+4 | |
511 bra comm_reset_battery_gauge ; Resets battery gauge registers | |
512 movlw 0x30 | |
513 cpfseq RCREG1 | |
514 bra $+4 | |
515 bra comm_write_range ; write bytes starting from ext_flash_address:3 (Stop when timeout) | |
516 movlw 0x40 | |
517 cpfseq RCREG1 | |
518 bra $+4 | |
519 bra comm_erase_4kb ; erases 4kB block from ext_flash_address:3 (Warning: No confirmation or built-in security here...) | |
520 movlw 0x42 | |
521 cpfseq RCREG1 | |
522 bra $+4 | |
523 bra comm_erase_range4kb ; erases range in 4kB steps (Get 3 bytes address and 1byte amount of 4kB blocks) | |
524 movlw 0x50 | |
525 cpfseq RCREG1 | |
526 bra $+4 | |
527 bra comm_send_firmware ; sends firmware from external flash from 0x3E0000 to 0x3FD000 (118784bytes) via comm | |
528 movlw "t" | |
529 cpfseq RCREG1 | |
530 bra $+4 | |
531 goto testloop ; Start raw-data testloop | |
532 movlw 0xC1 | |
533 cpfseq RCREG1 | |
534 bra $+4 | |
535 bra comm_service_ll_bootloader ; Start low-level bootloader | |
536 bra comm_download_mode0 ; Loop with timeout reset | |
537 | |
538 ;----------------------------------------------------------------------------- | |
539 | |
540 comm_send_headers: | |
541 movlw "a" ; send echo | |
542 movwf TXREG1 | |
543 ; Send 256 bytes/dive (Header) | |
544 ; 1st: 200000h-2000FFh | |
545 ; 2nd: 201000h-2010FFh | |
546 ; 3rd: 202000h-2020FFh | |
547 ; 100: 264000h-2640FFh | |
548 ; 256: 2FF000h-2FF0FFh | |
549 movlw 0x1F | |
550 movwf ext_flash_address+2 | |
551 movlw 0xF0 | |
552 movwf ext_flash_address+1 | |
553 | |
554 comm_send_headers2: | |
555 movlw 0x00 | |
556 movwf ext_flash_address+0 | |
557 ; Adjust address for next dive | |
558 movlw 0x10 | |
559 addwf ext_flash_address+1 | |
560 movlw 0x00 | |
561 addwfc ext_flash_address+2 | |
562 | |
563 movlw 0x30 | |
564 cpfseq ext_flash_address+2 ; All 256 dive send? | |
565 bra comm_send_headers4 ; No, continue | |
566 bra comm_download_mode0 ; Done. Loop with timeout reset | |
567 | |
568 comm_send_headers4: | |
569 clrf lo ; Counter | |
570 call rs232_wait_tx ; Wait for UART | |
571 call ext_flash_read_block_start ; 1st byte | |
572 movwf TXREG1 | |
573 bra comm_send_headers3 ; counter 24bit | |
574 comm_send_headers_loop: | |
575 call ext_flash_read_block ; Read one byte | |
576 movwf TXREG1 ; Start new transmit | |
577 comm_send_headers3: | |
578 call rs232_wait_tx ; Wait for UART | |
579 decfsz lo,F | |
580 bra comm_send_headers_loop | |
581 call ext_flash_read_block_stop | |
582 bra comm_send_headers2 ; continue | |
583 | |
584 ;----------------------------------------------------------------------------- | |
80 | 585 |
586 comm_option_reset_all: ; Reset all options to factory default. | |
587 movlw "x" ; send echo | |
588 movwf TXREG1 | |
589 call option_reset_all | |
590 bra comm_download_mode0 ; Done. back to loop with timeout reset | |
591 | |
592 ;----------------------------------------------------------------------------- | |
0 | 593 |
594 comm_set_time: | |
595 movlw "b" ; send echo | |
596 movwf TXREG1 | |
597 | |
598 call rs232_wait_tx ; wait for UART | |
599 call rs232_get_byte | |
600 btfsc rs232_recieve_overflow ; Got byte? | |
601 return ; No, abort! | |
602 movff RCREG1, hours | |
603 movlw d'24' | |
604 cpfslt hours | |
605 clrf hours | |
606 call rs232_get_byte | |
607 btfsc rs232_recieve_overflow ; Got byte? | |
608 return ; No, abort! | |
609 movff RCREG1, mins | |
610 movlw d'60' | |
611 cpfslt mins | |
612 clrf mins | |
613 call rs232_get_byte | |
614 btfsc rs232_recieve_overflow ; Got byte? | |
615 return ; No, abort! | |
616 movff RCREG1, secs | |
617 movlw d'60' | |
618 cpfslt secs | |
619 clrf secs | |
620 call rs232_get_byte | |
621 btfsc rs232_recieve_overflow ; Got byte? | |
622 return ; No, abort! | |
623 movff RCREG1, month | |
624 movlw d'13' | |
625 cpfslt month | |
626 movwf month | |
627 call rs232_get_byte | |
628 btfsc rs232_recieve_overflow ; Got byte? | |
629 return ; No, abort! | |
92
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
630 call comm_check_day ; Check day |
0 | 631 call rs232_get_byte |
632 btfsc rs232_recieve_overflow ; Got byte? | |
633 return ; No, abort! | |
634 movff RCREG1, year | |
635 movlw d'100' | |
636 cpfslt year | |
637 clrf year | |
638 ; All ok, set RTCC | |
639 call rtc_set_rtc ; writes mins,sec,hours,day,month and year to rtc module | |
640 bra comm_download_mode0 ; Done. back to loop with timeout reset | |
641 | |
642 ;----------------------------------------------------------------------------- | |
643 ; Set OSTC3 custom text string (opt_name_length ascii chars). | |
644 ; | |
645 | |
646 comm_set_custom_text: | |
647 movlw "c" ; send echo | |
648 movwf TXREG1 | |
649 call rs232_wait_tx ; wait for UART | |
650 lfsr FSR2,opt_name | |
651 movlw opt_name_length | |
652 movwf lo ; counter | |
653 comm_set_ctext_loop: | |
654 call rs232_get_byte | |
655 btfsc rs232_recieve_overflow ; Got byte? | |
7 | 656 bra comm_download_mode0 ; No, loop with timeout reset |
657 movff RCREG1,POSTINC2 ; Store character | |
0 | 658 decfsz lo,F |
659 bra comm_set_ctext_loop | |
7 | 660 bra comm_download_mode0 ; Done. Loop with timeout reset |
0 | 661 |
662 ;----------------------------------------------------------------------------- | |
663 ; Reply Serial (2 bytes low:high), firmware (major.minor) and custom text. | |
664 ; | |
665 | |
666 comm_identify: | |
667 movlw "i" ; send echo | |
668 movwf TXREG1 | |
669 call rs232_wait_tx ; wait for UART | |
670 | |
671 ;---- Read serial from internal EEPROM address 0000 | |
672 clrf EEADRH | |
673 clrf EEADR ; Get Serial number LOW | |
674 call read_eeprom ; read byte | |
675 movff EEDATA,lo | |
676 incf EEADR,F ; Get Serial number HIGH | |
677 call read_eeprom ; read byte | |
678 movff EEDATA,hi | |
679 | |
680 ;---- Emit serial number | |
681 movff lo,TXREG1 | |
682 call rs232_wait_tx | |
683 movff hi,TXREG1 | |
684 call rs232_wait_tx | |
685 | |
686 ;---- Emit fiwmware hi.lo | |
687 movlw softwareversion_x | |
688 movwf TXREG1 | |
689 call rs232_wait_tx | |
690 movlw softwareversion_y | |
691 movwf TXREG1 | |
692 call rs232_wait_tx | |
693 | |
694 ;---- Emit custom text | |
695 movlw opt_name_length | |
696 movwf hi | |
697 lfsr FSR2,opt_name | |
698 | |
699 common_identify_loop: | |
700 movff POSTINC2,TXREG1 | |
701 call rs232_wait_tx | |
702 decfsz hi,F | |
703 bra common_identify_loop | |
704 | |
705 bra comm_download_mode0 ; Done. | |
706 | |
707 | |
708 ;----------------------------------------------------------------------------- | |
709 | |
710 comm_send_dive: | |
711 movlw "f" ; send echo | |
712 movwf TXREG1 | |
713 | |
714 call rs232_get_byte | |
715 btfsc rs232_recieve_overflow ; Got byte? | |
716 bra comm_download_mode0 ; No, abort! | |
717 movff RCREG1,lo ; Store dive number (0-255) | |
718 ; First, send the header (again) | |
719 ; Set ext_flash_address:3 to TOC entry of this dive | |
720 ; 1st: 200000h-200FFFh -> lo=0 | |
721 ; 2nd: 201000h-201FFFh -> lo=1 | |
722 ; 3rd: 202000h-202FFFh -> lo=2 | |
723 ; 256: 2FF000h-2FFFFFh -> lo=255 | |
724 clrf ext_flash_address+0 | |
725 clrf ext_flash_address+1 | |
726 movlw 0x20 | |
727 movwf ext_flash_address+2 | |
728 movlw .16 | |
729 mulwf lo ; lo*16 = offset to 0x2000 (up:hi) | |
730 movf PRODL,W | |
731 addwf ext_flash_address+1,F | |
732 movf PRODH,W | |
733 addwfc ext_flash_address+2,F | |
734 | |
735 incf_ext_flash_address d'2' ; Skip 0xFA, 0xFA | |
736 call ext_flash_byte_read_plus ; Read start address of profile | |
737 movff temp1,ext_flash_log_pointer+0 | |
738 call ext_flash_byte_read_plus ; Read start address of profile | |
739 movff temp1,ext_flash_log_pointer+1 | |
740 call ext_flash_byte_read_plus ; Read start address of profile | |
741 movff temp1,ext_flash_log_pointer+2 | |
742 call ext_flash_byte_read_plus ; Read end address of profile | |
743 movff temp1,convert_value_temp+0 | |
744 call ext_flash_byte_read_plus ; Read end address of profile | |
745 movff temp1,convert_value_temp+1 | |
746 call ext_flash_byte_read_plus ; Read end address of profile | |
747 movff temp1,convert_value_temp+2 | |
748 decf_ext_flash_address d'8' ; Back again to first 0xFA in header | |
749 | |
750 movf ext_flash_log_pointer+0,W | |
751 cpfseq convert_value_temp+0 ; Equal? | |
752 bra comm_send_dive1 ; No, Send header | |
753 | |
754 movf ext_flash_log_pointer+1,W | |
755 cpfseq convert_value_temp+1 ; Equal? | |
756 bra comm_send_dive1 ; No, Send header | |
757 | |
758 movf ext_flash_log_pointer+2,W | |
759 cpfseq convert_value_temp+2 ; Equal? | |
760 bra comm_send_dive1 ; No, Send header | |
761 | |
762 ; Start=End -> Not good, abort | |
763 bra comm_download_mode0 ; Done. Loop with timeout reset | |
764 | |
765 comm_send_dive1: | |
766 ; Send header | |
767 clrf hi ; Counter | |
768 call rs232_wait_tx ; Wait for UART | |
769 call ext_flash_read_block_start ; 1st byte | |
770 movwf TXREG1 | |
771 bra comm_send_dive_header | |
772 comm_send_dive_header2: | |
773 call ext_flash_read_block ; Read one byte | |
774 movwf TXREG1 ; Start new transmit | |
775 comm_send_dive_header: | |
776 call rs232_wait_tx ; Wait for UART | |
777 decfsz hi,F | |
778 bra comm_send_dive_header2 | |
779 call ext_flash_read_block_stop | |
780 | |
781 ; Set address for profile | |
782 movff ext_flash_log_pointer+0,ext_flash_address+0 | |
783 movff ext_flash_log_pointer+1,ext_flash_address+1 | |
784 movff ext_flash_log_pointer+2,ext_flash_address+2 | |
785 | |
786 movlw .6 ; Skip 6byte short header in profile - only for internal use | |
787 call incf_ext_flash_address0_0x20 ; increases bytes in ext_flash_address:3 with 0x200000 bank switching | |
788 | |
789 comm_send_dive_profile: | |
790 call ext_flash_byte_read_plus_0x20 ; Read one byte into temp1, takes care of banking at 0x200000 | |
791 call rs232_wait_tx ; Wait for UART | |
792 movff temp1,TXREG1 ; Send a byte | |
793 | |
794 ; 24bit compare with end address | |
795 movff convert_value_temp+0,WREG | |
796 cpfseq ext_flash_address+0 | |
797 bra comm_send_dive_profile | |
798 movff convert_value_temp+1,WREG | |
799 cpfseq ext_flash_address+1 | |
800 bra comm_send_dive_profile | |
801 movff convert_value_temp+2,WREG | |
802 cpfseq ext_flash_address+2 | |
803 bra comm_send_dive_profile | |
804 | |
805 call rs232_wait_tx ; Wait for UART | |
806 bra comm_download_mode0 ; Done. Loop with timeout reset | |
807 | |
808 ;----------------------------------------------------------------------------- | |
809 | |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
810 comm_read_setting: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
811 movlw "r" |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
812 movwf TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
813 call rs232_get_byte |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
814 btfsc rs232_recieve_overflow ; Got byte? |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
815 bra comm_read_abort ; No, abort! |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
816 call rs232_wait_tx ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
817 movf RCREG1,W ; Copy |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
818 bz comm_read_unused ; RCREG1=0 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
819 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
820 bra comm_read_unused ; RCREG1=1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
821 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
822 bra comm_read_unused ; RCREG1=2 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
823 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
824 bra comm_read_unused ; RCREG1=3 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
825 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
826 bra comm_read_unused ; RCREG1=4 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
827 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
828 bra comm_read_unused ; RCREG1=5 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
829 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
830 bra comm_read_unused ; RCREG1=6 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
831 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
832 bra comm_read_unused ; RCREG1=7 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
833 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
834 bra comm_read_unused ; RCREG1=8 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
835 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
836 bra comm_read_unused ; RCREG1=9 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
837 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
838 bra comm_read_unused ; RCREG1=10 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
839 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
840 bra comm_read_unused ; RCREG1=11 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
841 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
842 bra comm_read_unused ; RCREG1=12 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
843 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
844 bra comm_read_unused ; RCREG1=13 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
845 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
846 bra comm_read_unused ; RCREG1=14 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
847 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
848 bra comm_read_unused ; RCREG1=15 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
849 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
850 bra comm_read_gas1 ; RCREG1=0x10 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
851 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
852 bra comm_read_gas2 ; RCREG1=0x11 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
853 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
854 bra comm_read_gas3 ; RCREG1=0x12 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
855 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
856 bra comm_read_gas4 ; RCREG1=0x13 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
857 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
858 bra comm_read_gas5 ; RCREG1=0x14 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
859 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
860 bra comm_read_dil1 ; RCREG1=0x15 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
861 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
862 bra comm_read_dil2 ; RCREG1=0x16 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
863 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
864 bra comm_read_dil3 ; RCREG1=0x17 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
865 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
866 bra comm_read_dil4 ; RCREG1=0x18 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
867 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
868 bra comm_read_dil5 ; RCREG1=0x19 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
869 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
870 bra comm_read_sp1 ; RCREG1=0x1A |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
871 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
872 bra comm_read_sp2 ; RCREG1=0x1B |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
873 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
874 bra comm_read_sp3 ; RCREG1=0x1C |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
875 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
876 bra comm_read_sp4 ; RCREG1=0x1D |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
877 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
878 bra comm_read_sp5 ; RCREG1=0x1E |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
879 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
880 bra comm_read_ccr_mode ; RCREG1=0x1F |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
881 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
882 bra comm_read_dive_mode ; RCREG1=0x20 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
883 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
884 bra comm_read_decotype ; RCREG1=0x21 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
885 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
886 bra comm_read_ppo2_max ; RCREG1=0x22 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
887 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
888 bra comm_read_ppo2_min ; RCREG1=0x23 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
889 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
890 bra comm_read_ftts ; RCREG1=0x24 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
891 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
892 bra comm_read_gf_low ; RCREG1=0x25 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
893 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
894 bra comm_read_gf_high ; RCREG1=0x26 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
895 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
896 bra comm_read_agf_low ; RCREG1=0x27 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
897 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
898 bra comm_read_agf_high ; RCREG1=0x28 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
899 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
900 bra comm_read_agf_selectable ; RCREG1=0x29 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
901 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
902 bra comm_read_saturation ; RCREG1=0x2A |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
903 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
904 bra comm_read_desaturation ; RCREG1=0x2B |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
905 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
906 bra comm_read_last_deco ; RCREG1=0x2C |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
907 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
908 bra comm_read_brightness ; RCREG1=0x2D |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
909 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
910 bra comm_read_units ; RCREG1=0x2E |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
911 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
912 bra comm_read_samplingrate ; RCREG1=0x2F |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
913 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
914 bra comm_read_salinity ; RCREG1=0x30 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
915 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
916 bra comm_read_divemode_colour ; RCREG1=0x31 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
917 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
918 bra comm_read_language ; RCREG1=0x32 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
919 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
920 bra comm_read_date_format ; RCREG1=0x33 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
921 dcfsnz WREG |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
922 bra comm_read_compass_gain ; RCREG1=0x34 |
92
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
923 dcfsnz WREG |
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
924 bra comm_read_pressure_adjust ; RCREG1=0x35 |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
925 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
926 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
927 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
928 comm_read_unused: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
929 comm_read_abort: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
930 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
931 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
932 comm_read_setting_wait: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
933 call rs232_wait_tx ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
934 return |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
935 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
936 comm_read_gas1: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
937 movff opt_gas_O2_ratio+0, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
938 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
939 movff opt_gas_He_ratio+0, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
940 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
941 movff opt_gas_type+0, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
942 rcall comm_read_setting_wait ; Wait for UART |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
943 movff opt_OC_bail_gas_change+0,TXREG1 |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
944 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
945 comm_read_gas2: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
946 movff opt_gas_O2_ratio+1, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
947 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
948 movff opt_gas_He_ratio+1, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
949 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
950 movff opt_gas_type+1, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
951 rcall comm_read_setting_wait ; Wait for UART |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
952 movff opt_OC_bail_gas_change+1,TXREG1 |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
953 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
954 comm_read_gas3: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
955 movff opt_gas_O2_ratio+2, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
956 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
957 movff opt_gas_He_ratio+2, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
958 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
959 movff opt_gas_type+2, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
960 rcall comm_read_setting_wait ; Wait for UART |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
961 movff opt_OC_bail_gas_change+2,TXREG1 |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
962 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
963 comm_read_gas4: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
964 movff opt_gas_O2_ratio+3, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
965 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
966 movff opt_gas_He_ratio+3, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
967 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
968 movff opt_gas_type+3, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
969 rcall comm_read_setting_wait ; Wait for UART |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
970 movff opt_OC_bail_gas_change+3,TXREG1 |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
971 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
972 comm_read_gas5: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
973 movff opt_gas_O2_ratio+4, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
974 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
975 movff opt_gas_He_ratio+4, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
976 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
977 movff opt_gas_type+4, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
978 rcall comm_read_setting_wait ; Wait for UART |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
979 movff opt_OC_bail_gas_change+4,TXREG1 |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
980 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
981 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
982 comm_read_dil1: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
983 movff opt_dil_O2_ratio+0, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
984 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
985 movff opt_dil_He_ratio+0, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
986 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
987 movff opt_dil_type+0, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
988 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
989 movff char_I_dil_change+0,TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
990 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
991 comm_read_dil2: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
992 movff opt_dil_O2_ratio+1, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
993 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
994 movff opt_dil_He_ratio+1, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
995 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
996 movff opt_dil_type+1, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
997 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
998 movff char_I_dil_change+1,TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
999 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1000 comm_read_dil3: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1001 movff opt_dil_O2_ratio+2, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1002 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1003 movff opt_dil_He_ratio+2, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1004 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1005 movff opt_dil_type+2, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1006 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1007 movff char_I_dil_change+2,TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1008 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1009 comm_read_dil4: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1010 movff opt_dil_O2_ratio+3, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1011 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1012 movff opt_dil_He_ratio+3, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1013 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1014 movff opt_dil_type+3, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1015 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1016 movff char_I_dil_change+3,TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1017 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1018 comm_read_dil5: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1019 movff opt_dil_O2_ratio+4, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1020 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1021 movff opt_dil_He_ratio+4, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1022 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1023 movff opt_dil_type+4, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1024 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1025 movff char_I_dil_change+4,TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1026 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1027 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1028 comm_read_sp1: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1029 movff char_I_setpoint_cbar+0, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1030 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1031 movff char_I_setpoint_change+0, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1032 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1033 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1034 comm_read_sp2: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1035 movff char_I_setpoint_cbar+1, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1036 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1037 movff char_I_setpoint_change+1, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1038 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1039 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1040 comm_read_sp3: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1041 movff char_I_setpoint_cbar+2, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1042 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1043 movff char_I_setpoint_change+2, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1044 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1045 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1046 comm_read_sp4: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1047 movff char_I_setpoint_cbar+3, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1048 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1049 movff char_I_setpoint_change+3, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1050 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1051 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1052 comm_read_sp5: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1053 movff char_I_setpoint_cbar+4, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1054 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1055 movff char_I_setpoint_change+4, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1056 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1057 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1058 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1059 comm_read_ccr_mode: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1060 movff opt_ccr_mode, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1061 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1062 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1063 comm_read_dive_mode: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1064 movff opt_dive_mode, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1065 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1066 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1067 comm_read_decotype: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1068 movff char_I_deco_model, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1069 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1070 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1071 comm_read_ppo2_max: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1072 movff opt_ppO2_max, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1073 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1074 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1075 comm_read_ppo2_min: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1076 movff opt_ppO2_min, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1077 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1078 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1079 comm_read_ftts: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1080 movff char_I_extra_time, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1081 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1082 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1083 comm_read_gf_low: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1084 movff opt_GF_low, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1085 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1086 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1087 comm_read_gf_high: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1088 movff opt_GF_high, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1089 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1090 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1091 comm_read_agf_low: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1092 movff opt_aGF_low, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1093 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1094 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1095 comm_read_agf_high: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1096 movff opt_aGF_high, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1097 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1098 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1099 comm_read_agf_selectable: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1100 movff opt_enable_aGF, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1101 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1102 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1103 comm_read_saturation: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1104 movff char_I_saturation_multiplier, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1105 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1106 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1107 comm_read_desaturation: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1108 movff char_I_desaturation_multiplier, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1109 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1110 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1111 comm_read_last_deco: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1112 movff opt_last_stop, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1113 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1114 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1115 comm_read_brightness: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1116 movff opt_brightness, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1117 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1118 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1119 comm_read_units: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1120 movff opt_units, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1121 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1122 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1123 comm_read_samplingrate: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1124 movff opt_sampling_rate, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1125 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1126 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1127 comm_read_salinity: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1128 movff opt_salinity, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1129 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1130 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1131 comm_read_divemode_colour: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1132 movff opt_dive_color_scheme, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1133 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1134 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1135 comm_read_language: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1136 movff opt_language, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1137 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1138 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1139 comm_read_date_format: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1140 movff opt_dateformat, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1141 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1142 bra comm_download_mode0 ; Done. Loop with timeout reset |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1143 comm_read_compass_gain: |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1144 movff opt_compass_gain, TXREG1 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1145 rcall comm_read_setting_wait ; Wait for UART |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1146 bra comm_download_mode0 ; Done. Loop with timeout reset |
92
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1147 comm_read_pressure_adjust: |
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1148 movff opt_pressure_adjust, TXREG1 |
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1149 rcall comm_read_setting_wait ; Wait for UART |
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1150 bra comm_download_mode0 ; Done. Loop with timeout reset |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1151 |
80 | 1152 ;----------------------------------------------------------------------------- |
1153 | |
1154 | |
1155 comm_write_setting: | |
1156 movlw "w" | |
1157 movwf TXREG1 | |
1158 call rs232_get_byte | |
1159 btfsc rs232_recieve_overflow ; Got byte? | |
1160 bra comm_write_abort ; No, abort! | |
1161 call rs232_wait_tx ; Wait for UART | |
1162 movf RCREG1,W ; Copy | |
1163 bz comm_write_unused ; RCREG1=0 | |
1164 dcfsnz WREG | |
1165 bra comm_write_unused ; RCREG1=1 | |
1166 dcfsnz WREG | |
1167 bra comm_write_unused ; RCREG1=2 | |
1168 dcfsnz WREG | |
1169 bra comm_write_unused ; RCREG1=3 | |
1170 dcfsnz WREG | |
1171 bra comm_write_unused ; RCREG1=4 | |
1172 dcfsnz WREG | |
1173 bra comm_write_unused ; RCREG1=5 | |
1174 dcfsnz WREG | |
1175 bra comm_write_unused ; RCREG1=6 | |
1176 dcfsnz WREG | |
1177 bra comm_write_unused ; RCREG1=7 | |
1178 dcfsnz WREG | |
1179 bra comm_write_unused ; RCREG1=8 | |
1180 dcfsnz WREG | |
1181 bra comm_write_unused ; RCREG1=9 | |
1182 dcfsnz WREG | |
1183 bra comm_write_unused ; RCREG1=10 | |
1184 dcfsnz WREG | |
1185 bra comm_write_unused ; RCREG1=11 | |
1186 dcfsnz WREG | |
1187 bra comm_write_unused ; RCREG1=12 | |
1188 dcfsnz WREG | |
1189 bra comm_write_unused ; RCREG1=13 | |
1190 dcfsnz WREG | |
1191 bra comm_write_unused ; RCREG1=14 | |
1192 dcfsnz WREG | |
1193 bra comm_write_unused ; RCREG1=15 | |
1194 dcfsnz WREG | |
1195 bra comm_write_gas1 ; RCREG1=0x10 | |
1196 dcfsnz WREG | |
1197 bra comm_write_gas2 ; RCREG1=0x11 | |
1198 dcfsnz WREG | |
1199 bra comm_write_gas3 ; RCREG1=0x12 | |
1200 dcfsnz WREG | |
1201 bra comm_write_gas4 ; RCREG1=0x13 | |
1202 dcfsnz WREG | |
1203 bra comm_write_gas5 ; RCREG1=0x14 | |
1204 dcfsnz WREG | |
1205 bra comm_write_dil1 ; RCREG1=0x15 | |
1206 dcfsnz WREG | |
1207 bra comm_write_dil2 ; RCREG1=0x16 | |
1208 dcfsnz WREG | |
1209 bra comm_write_dil3 ; RCREG1=0x17 | |
1210 dcfsnz WREG | |
1211 bra comm_write_dil4 ; RCREG1=0x18 | |
1212 dcfsnz WREG | |
1213 bra comm_write_dil5 ; RCREG1=0x19 | |
1214 dcfsnz WREG | |
1215 bra comm_write_sp1 ; RCREG1=0x1A | |
1216 dcfsnz WREG | |
1217 bra comm_write_sp2 ; RCREG1=0x1B | |
1218 dcfsnz WREG | |
1219 bra comm_write_sp3 ; RCREG1=0x1C | |
1220 dcfsnz WREG | |
1221 bra comm_write_sp4 ; RCREG1=0x1D | |
1222 dcfsnz WREG | |
1223 bra comm_write_sp5 ; RCREG1=0x1E | |
1224 dcfsnz WREG | |
1225 bra comm_write_ccr_mode ; RCREG1=0x1F | |
1226 dcfsnz WREG | |
1227 bra comm_write_dive_mode ; RCREG1=0x20 | |
1228 dcfsnz WREG | |
1229 bra comm_write_decotype ; RCREG1=0x21 | |
1230 dcfsnz WREG | |
1231 bra comm_write_ppo2_max ; RCREG1=0x22 | |
1232 dcfsnz WREG | |
1233 bra comm_write_ppo2_min ; RCREG1=0x23 | |
1234 dcfsnz WREG | |
1235 bra comm_write_ftts ; RCREG1=0x24 | |
1236 dcfsnz WREG | |
1237 bra comm_write_gf_low ; RCREG1=0x25 | |
1238 dcfsnz WREG | |
1239 bra comm_write_gf_high ; RCREG1=0x26 | |
1240 dcfsnz WREG | |
1241 bra comm_write_agf_low ; RCREG1=0x27 | |
1242 dcfsnz WREG | |
1243 bra comm_write_agf_high ; RCREG1=0x28 | |
1244 dcfsnz WREG | |
1245 bra comm_write_agf_selectable ; RCREG1=0x29 | |
1246 dcfsnz WREG | |
1247 bra comm_write_saturation ; RCREG1=0x2A | |
1248 dcfsnz WREG | |
1249 bra comm_write_desaturation ; RCREG1=0x2B | |
1250 dcfsnz WREG | |
1251 bra comm_write_last_deco ; RCREG1=0x2C | |
1252 dcfsnz WREG | |
1253 bra comm_write_brightness ; RCREG1=0x2D | |
1254 dcfsnz WREG | |
1255 bra comm_write_units ; RCREG1=0x2E | |
1256 dcfsnz WREG | |
1257 bra comm_write_samplingrate ; RCREG1=0x2F | |
1258 dcfsnz WREG | |
1259 bra comm_write_salinity ; RCREG1=0x30 | |
1260 dcfsnz WREG | |
1261 bra comm_write_divemode_colour ; RCREG1=0x31 | |
1262 dcfsnz WREG | |
1263 bra comm_write_language ; RCREG1=0x32 | |
1264 dcfsnz WREG | |
1265 bra comm_write_date_format ; RCREG1=0x33 | |
1266 dcfsnz WREG | |
1267 bra comm_write_compass_gain ; RCREG1=0x34 | |
92
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1268 dcfsnz WREG |
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1269 bra comm_write_pressure_adjust ; RCREG1=0x35 |
80 | 1270 |
1271 comm_write_unused: | |
1272 comm_write_abort: | |
81
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
1273 ; Check Options, gases and diluents |
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
1274 call option_check_all ; Check all options (and reset if not within their min/max boundaries) |
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
1275 bsf ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
1276 call gaslist_cleanup_list ; Takes care that only one gas can be first and first has 0m change depth |
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
1277 bcf ccr_diluent_setup ; =1: Setting up Diluents ("Gas6-10") |
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
1278 call gaslist_cleanup_list ; Takes care that only one gas can be first and first has 0m change depth |
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
1279 call get_first_gas_to_WREG ; Makes sure at least one Gas is "First" |
8e13866b5496
add some extra safety checks when settings were altered from the PC software
mh@mh-THINK.localdomain
parents:
80
diff
changeset
|
1280 call get_first_dil_to_WREG ; Makes sure at least one Diluent is "First" |
80 | 1281 bra comm_download_mode0 ; Done. Loop with timeout reset |
1282 | |
1283 comm_write_gas1: | |
1284 call rs232_get_byte | |
1285 movff RCREG1,opt_gas_O2_ratio+0 | |
1286 call rs232_get_byte | |
1287 movff RCREG1,opt_gas_He_ratio+0 | |
1288 call rs232_get_byte | |
1289 movff RCREG1,opt_gas_type+0 | |
1290 call rs232_get_byte | |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
1291 movff RCREG1,opt_OC_bail_gas_change+0 |
80 | 1292 bra comm_write_abort ; Done. Loop with timeout reset |
1293 comm_write_gas2: | |
1294 call rs232_get_byte | |
1295 movff RCREG1,opt_gas_O2_ratio+1 | |
1296 call rs232_get_byte | |
1297 movff RCREG1,opt_gas_He_ratio+1 | |
1298 call rs232_get_byte | |
1299 movff RCREG1,opt_gas_type+1 | |
1300 call rs232_get_byte | |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
1301 movff RCREG1,opt_OC_bail_gas_change+1 |
80 | 1302 bra comm_write_abort ; Done. Loop with timeout reset |
1303 comm_write_gas3: | |
1304 call rs232_get_byte | |
1305 movff RCREG1,opt_gas_O2_ratio+2 | |
1306 call rs232_get_byte | |
1307 movff RCREG1,opt_gas_He_ratio+2 | |
1308 call rs232_get_byte | |
1309 movff RCREG1,opt_gas_type+2 | |
1310 call rs232_get_byte | |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
1311 movff RCREG1,opt_OC_bail_gas_change+2 |
80 | 1312 bra comm_write_abort ; Done. Loop with timeout reset |
1313 comm_write_gas4: | |
1314 call rs232_get_byte | |
1315 movff RCREG1,opt_gas_O2_ratio+3 | |
1316 call rs232_get_byte | |
1317 movff RCREG1,opt_gas_He_ratio+3 | |
1318 call rs232_get_byte | |
1319 movff RCREG1,opt_gas_type+3 | |
1320 call rs232_get_byte | |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
1321 movff RCREG1,opt_OC_bail_gas_change+3 |
80 | 1322 bra comm_write_abort ; Done. Loop with timeout reset |
1323 comm_write_gas5: | |
1324 call rs232_get_byte | |
1325 movff RCREG1,opt_gas_O2_ratio+4 | |
1326 call rs232_get_byte | |
1327 movff RCREG1,opt_gas_He_ratio+4 | |
1328 call rs232_get_byte | |
1329 movff RCREG1,opt_gas_type+4 | |
1330 call rs232_get_byte | |
97
53a99a2dc6a1
CHANGE: Always compute bailout plan based on all active gases
heinrichsweikamp
parents:
92
diff
changeset
|
1331 movff RCREG1,opt_OC_bail_gas_change+4 |
80 | 1332 bra comm_write_abort ; Done. Loop with timeout reset |
1333 | |
1334 comm_write_dil1: | |
1335 call rs232_get_byte | |
1336 movff RCREG1,opt_dil_O2_ratio+0 | |
1337 call rs232_get_byte | |
1338 movff RCREG1,opt_dil_He_ratio+0 | |
1339 call rs232_get_byte | |
1340 movff RCREG1,opt_dil_type+0 | |
1341 call rs232_get_byte | |
1342 movff RCREG1,char_I_dil_change+0 | |
1343 bra comm_write_abort ; Done. Loop with timeout reset | |
1344 comm_write_dil2: | |
1345 call rs232_get_byte | |
1346 movff RCREG1,opt_dil_O2_ratio+1 | |
1347 call rs232_get_byte | |
1348 movff RCREG1,opt_dil_He_ratio+1 | |
1349 call rs232_get_byte | |
1350 movff RCREG1,opt_dil_type+1 | |
1351 call rs232_get_byte | |
1352 movff RCREG1,char_I_dil_change+1 | |
1353 bra comm_write_abort ; Done. Loop with timeout reset | |
1354 comm_write_dil3: | |
1355 call rs232_get_byte | |
1356 movff RCREG1,opt_dil_O2_ratio+2 | |
1357 call rs232_get_byte | |
1358 movff RCREG1,opt_dil_He_ratio+2 | |
1359 call rs232_get_byte | |
1360 movff RCREG1,opt_dil_type+2 | |
1361 call rs232_get_byte | |
1362 movff RCREG1,char_I_dil_change+2 | |
1363 bra comm_write_abort ; Done. Loop with timeout reset | |
1364 comm_write_dil4: | |
1365 call rs232_get_byte | |
1366 movff RCREG1,opt_dil_O2_ratio+3 | |
1367 call rs232_get_byte | |
1368 movff RCREG1,opt_dil_He_ratio+3 | |
1369 call rs232_get_byte | |
1370 movff RCREG1,opt_dil_type+3 | |
1371 call rs232_get_byte | |
1372 movff RCREG1,char_I_dil_change+3 | |
1373 bra comm_write_abort ; Done. Loop with timeout reset | |
1374 comm_write_dil5: | |
1375 call rs232_get_byte | |
1376 movff RCREG1,opt_dil_O2_ratio+4 | |
1377 call rs232_get_byte | |
1378 movff RCREG1,opt_dil_He_ratio+4 | |
1379 call rs232_get_byte | |
1380 movff RCREG1,opt_dil_type+4 | |
1381 call rs232_get_byte | |
1382 movff RCREG1,char_I_dil_change+4 | |
1383 bra comm_write_abort ; Done. Loop with timeout reset | |
1384 | |
1385 comm_write_sp1: | |
1386 call rs232_get_byte | |
1387 movff RCREG1,char_I_setpoint_cbar+0 | |
1388 call rs232_get_byte | |
1389 movff RCREG1,char_I_setpoint_change+0 | |
1390 bra comm_write_abort ; Done. Loop with timeout reset | |
1391 comm_write_sp2: | |
1392 call rs232_get_byte | |
1393 movff RCREG1,char_I_setpoint_cbar+1 | |
1394 call rs232_get_byte | |
1395 movff RCREG1,char_I_setpoint_change+1 | |
1396 bra comm_write_abort ; Done. Loop with timeout reset | |
1397 comm_write_sp3: | |
1398 call rs232_get_byte | |
1399 movff RCREG1,char_I_setpoint_cbar+2 | |
1400 call rs232_get_byte | |
1401 movff RCREG1,char_I_setpoint_change+2 | |
1402 bra comm_write_abort ; Done. Loop with timeout reset | |
1403 comm_write_sp4: | |
1404 call rs232_get_byte | |
1405 movff RCREG1,char_I_setpoint_cbar+3 | |
1406 call rs232_get_byte | |
1407 movff RCREG1,char_I_setpoint_change+3 | |
1408 bra comm_write_abort ; Done. Loop with timeout reset | |
1409 comm_write_sp5: | |
1410 call rs232_get_byte | |
1411 movff RCREG1,char_I_setpoint_cbar+4 | |
1412 call rs232_get_byte | |
1413 movff RCREG1,char_I_setpoint_change+4 | |
1414 bra comm_write_abort ; Done. Loop with timeout reset | |
1415 | |
1416 comm_write_ccr_mode: | |
1417 call rs232_get_byte | |
1418 movff RCREG1, opt_ccr_mode | |
1419 bra comm_write_abort ; Done. Loop with timeout reset | |
1420 comm_write_dive_mode: | |
1421 call rs232_get_byte | |
1422 movff RCREG1, opt_dive_mode | |
1423 bra comm_write_abort ; Done. Loop with timeout reset | |
1424 comm_write_decotype: | |
1425 call rs232_get_byte | |
1426 movff RCREG1, char_I_deco_model | |
1427 bra comm_write_abort ; Done. Loop with timeout reset | |
1428 comm_write_ppo2_max: | |
1429 call rs232_get_byte | |
1430 movff RCREG1, opt_ppO2_max | |
1431 bra comm_write_abort ; Done. Loop with timeout reset | |
1432 comm_write_ppo2_min: | |
1433 call rs232_get_byte | |
1434 movff RCREG1, opt_ppO2_min | |
1435 bra comm_write_abort ; Done. Loop with timeout reset | |
1436 comm_write_ftts: | |
1437 call rs232_get_byte | |
1438 movff RCREG1, char_I_extra_time | |
1439 bra comm_write_abort ; Done. Loop with timeout reset | |
1440 comm_write_gf_low: | |
1441 call rs232_get_byte | |
1442 movff RCREG1, opt_GF_low | |
1443 bra comm_write_abort ; Done. Loop with timeout reset | |
1444 comm_write_gf_high: | |
1445 call rs232_get_byte | |
1446 movff RCREG1, opt_GF_high | |
1447 bra comm_write_abort ; Done. Loop with timeout reset | |
1448 comm_write_agf_low: | |
1449 call rs232_get_byte | |
1450 movff RCREG1, opt_aGF_low | |
1451 bra comm_write_abort ; Done. Loop with timeout reset | |
1452 comm_write_agf_high: | |
1453 call rs232_get_byte | |
1454 movff RCREG1, opt_aGF_high | |
1455 bra comm_write_abort ; Done. Loop with timeout reset | |
1456 comm_write_agf_selectable: | |
1457 call rs232_get_byte | |
1458 movff RCREG1, opt_enable_aGF | |
1459 bra comm_write_abort ; Done. Loop with timeout reset | |
1460 comm_write_saturation: | |
1461 call rs232_get_byte | |
1462 movff RCREG1, char_I_saturation_multiplier | |
1463 bra comm_write_abort ; Done. Loop with timeout reset | |
1464 comm_write_desaturation: | |
1465 call rs232_get_byte | |
1466 movff RCREG1, char_I_desaturation_multiplier | |
1467 bra comm_write_abort ; Done. Loop with timeout reset | |
1468 comm_write_last_deco: | |
1469 call rs232_get_byte | |
1470 movff RCREG1, opt_last_stop | |
1471 bra comm_write_abort ; Done. Loop with timeout reset | |
1472 comm_write_brightness: | |
1473 call rs232_get_byte | |
1474 movff RCREG1, opt_brightness | |
1475 bra comm_write_abort ; Done. Loop with timeout reset | |
1476 comm_write_units: | |
1477 call rs232_get_byte | |
1478 movff RCREG1, opt_units | |
1479 bra comm_write_abort ; Done. Loop with timeout reset | |
1480 comm_write_samplingrate: | |
1481 call rs232_get_byte | |
1482 movff RCREG1, opt_sampling_rate | |
1483 bra comm_write_abort ; Done. Loop with timeout reset | |
1484 comm_write_salinity: | |
1485 call rs232_get_byte | |
1486 movff RCREG1, opt_salinity | |
1487 bra comm_write_abort ; Done. Loop with timeout reset | |
1488 comm_write_divemode_colour: | |
1489 call rs232_get_byte | |
1490 movff RCREG1, opt_dive_color_scheme | |
1491 bra comm_write_abort ; Done. Loop with timeout reset | |
1492 comm_write_language: | |
1493 call rs232_get_byte | |
1494 movff RCREG1, opt_language | |
1495 bra comm_write_abort ; Done. Loop with timeout reset | |
1496 comm_write_date_format: | |
1497 call rs232_get_byte | |
1498 movff RCREG1, opt_dateformat | |
1499 bra comm_write_abort ; Done. Loop with timeout reset | |
1500 comm_write_compass_gain: | |
1501 call rs232_get_byte | |
1502 movff RCREG1, opt_compass_gain | |
1503 bra comm_write_abort ; Done. Loop with timeout reset | |
92
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1504 comm_write_pressure_adjust: |
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1505 call rs232_get_byte |
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1506 movff RCREG1, opt_pressure_adjust |
7ca1105751c7
add sensor calibration option (PC only), some cleanup
heinrichsweikamp
parents:
81
diff
changeset
|
1507 bra comm_write_abort ; Done. Loop with timeout reset |
79
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1508 |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1509 ;----------------------------------------------------------------------------- |
0fc8113ddf6d
new command in download mode: "r" - read setting
mh@mh-THINK.localdomain
parents:
69
diff
changeset
|
1510 |
0 | 1511 comm_send_string: |
1512 movlw "n" ; send echo | |
1513 movwf TXREG1 | |
1514 call rs232_wait_tx ; Wait for UART | |
1515 WIN_SMALL comm_string_column, comm_string_row | |
1516 lfsr FSR2,buffer | |
1517 movlw .16 | |
1518 movwf lo ; counter | |
1519 comm_send_string_loop: | |
1520 call rs232_get_byte | |
1521 btfsc rs232_recieve_overflow ; Got byte? | |
1522 bra comm_send_string_abort ; No, abort! | |
1523 movff RCREG1,POSTINC2 ; Store character | |
1524 decfsz lo,F | |
1525 bra comm_send_string_loop | |
1526 comm_send_string_abort: | |
1527 STRCAT_PRINT "" ; Show the text | |
80 | 1528 goto comm_download_mode0 ; Done. Loop with timeout reset |
0 | 1529 |
1530 ;----------------------------------------------------------------------------- | |
1531 | |
1532 comm_check_day: | |
1533 movff RCREG1, day | |
1534 movff month,lo ; new month | |
1535 dcfsnz lo,F | |
1536 movlw .31 | |
1537 dcfsnz lo,F | |
1538 movlw .28 | |
1539 dcfsnz lo,F | |
1540 movlw .31 | |
1541 dcfsnz lo,F | |
1542 movlw .30 | |
1543 dcfsnz lo,F | |
1544 movlw .31 | |
1545 dcfsnz lo,F | |
1546 movlw .30 | |
1547 dcfsnz lo,F | |
1548 movlw .31 | |
1549 dcfsnz lo,F | |
1550 movlw .31 | |
1551 dcfsnz lo,F | |
1552 movlw .30 | |
1553 dcfsnz lo,F | |
1554 movlw .31 | |
1555 dcfsnz lo,F | |
1556 movlw .30 | |
1557 dcfsnz lo,F | |
1558 movlw .31 | |
1559 cpfsgt day ; day ok? | |
1560 return ; OK | |
1561 movlw .1 ; not OK, set to 1st | |
1562 movwf day | |
1563 return | |
1564 | |
1565 ;---------------------------------------------------------------------------- | |
1566 END |