comparison code_part1/OSTC_code_asm_part1/menu_ppO2.asm @ 685:aebb6d039249

Use 4byte in EEPROM for diluents (Same as OC gases) Show active gas indicator below first gas in surfacemode
author heinrichsweikamp
date Sat, 26 Jan 2013 14:11:07 +0100
parents 6e456a6398e0
children 91ae251d379f
comparison
equal deleted inserted replaced
684:99b3fb0ab4c7 685:aebb6d039249
22 ; last updated: 120920 22 ; last updated: 120920
23 ; known bugs: 23 ; known bugs:
24 ; ToDo: 24 ; ToDo:
25 ; 25 ;
26 ; New in 2.52 Diluents stored seperately in EEPROM Bank0 26 ; New in 2.52 Diluents stored seperately in EEPROM Bank0
27 ;Byte96-97:
28 ;Diluent 1 Default (%O2,%He)
29 ;Byte98-99:
30 ;Diluent 1 Current (%O2,%He)
31 ;Byte100-101:
32 ;Diluent 2 Default (%O2,%He)
33 ;Byte102-103:
34 ;Diluent 2 Current (%O2,%He)
35 ;Byte104-105:
36 ;Diluent 3 Default (%O2,%He)
37 ;Byte106-107:
38 ;Diluent 3 Current (%O2,%He)
39 ;Byte108-109:
40 ;Diluent 4 Default (%O2,%He)
41 ;Byte110-111:
42 ;Diluent 4 Current (%O2,%He)
43 ;Byte112-113:
44 ;Diluent 5 Default (%O2,%He)
45 ;Byte114-115:
46 ;Diluent 5 Current (%O2,%He)
47 ;Byte116:
48 ;First Diluent (1-5)
49
27 ; EEPROM BANK0 Byte96-97: 50 ; EEPROM BANK0 Byte96-97:
28 ; Diluent 1 (%O2,%He) 51 ; Diluent 1 (%O2,%He)
29 ; EEPROM BANK0 Byte98-99: 52 ; EEPROM BANK0 Byte98-99:
30 ; Diluent 2 (%O2,%He) 53 ; Diluent 2 (%O2,%He)
31 ; EEPROM BANK0 Byte100-101: 54 ; EEPROM BANK0 Byte100-101:
97 WIN_INVERT .0 ; Init new Wordprocessor 120 WIN_INVERT .0 ; Init new Wordprocessor
98 clrf decodata+0 ; Here: # of gas 0-4 121 clrf decodata+0 ; Here: # of gas 0-4
99 clrf divemins+0 ; Here: # of Gas * 4 122 clrf divemins+0 ; Here: # of Gas * 4
100 movlw d'5' 123 movlw d'5'
101 movwf waitms_temp ; here: stores row for gas list 124 movwf waitms_temp ; here: stores row for gas list
102 movlw d'94' 125 movlw d'93'
103 movwf wait_temp ; here: stores eeprom address for gas list 126 movwf wait_temp ; here: stores eeprom address for gas list
104 127
105 menu_diluentsetup_list: 128 menu_diluentsetup_list:
106 WIN_LEFT .20 129 WIN_LEFT .20
107 movlw d'2' 130 movlw d'4'
108 addwf wait_temp,F ; Increase eeprom address for gas list 131 addwf wait_temp,F ; Increase eeprom address for diluent list
109 movlw d'30' 132 movlw d'30'
110 addwf waitms_temp,F ; Increase row 133 addwf waitms_temp,F ; Increase row
111 movf waitms_temp,W ; Load row into WREG 134 movf waitms_temp,W ; Load row into WREG
112 movff WREG,win_top 135 movff WREG,win_top
113 lfsr FSR2,letter 136 lfsr FSR2,letter
122 WIN_LEFT .40 145 WIN_LEFT .40
123 movf waitms_temp,W ; Load row into WREG 146 movf waitms_temp,W ; Load row into WREG
124 movff WREG,win_top 147 movff WREG,win_top
125 lfsr FSR2,letter 148 lfsr FSR2,letter
126 149
127 movlw d'106' 150 movlw d'116'
128 movwf EEADR 151 movwf EEADR
129 call read_eeprom ; Get current startgas 1-5 # into EEDATA 152 call read_eeprom ; Get current startgas 1-5 # into EEDATA
130 decf EEDATA,W ; 0-4 153 decf EEDATA,W ; 0-4
131 cpfseq decodata+0 ; =current displayed gas #? 154 cpfseq decodata+0 ; =current displayed gas #?
132 bra menu_diluentsetup_Tx; no, do not display * 155 bra menu_diluentsetup_Tx; no, do not display *
137 WIN_LEFT .48 160 WIN_LEFT .48
138 movf waitms_temp,W ; Load row into WREG 161 movf waitms_temp,W ; Load row into WREG
139 movff WREG,win_top 162 movff WREG,win_top
140 lfsr FSR2,letter 163 lfsr FSR2,letter
141 164
142 incf wait_temp, W ; Gas %O2 165 movff wait_temp, EEADR ; Gas %He - Set address in internal EEPROM
143 movwf EEADR ; Gas %He - Set address in internal EEPROM 166 incf EEADR,F ; Gas %He - Set address in internal EEPROM
144 call read_eeprom ; Read He value from EEPROM 167 call read_eeprom ; Read He value from EEPROM
145 movff EEDATA,lo ; Move EEDATA -> lo 168 movff EEDATA,lo ; Move EEDATA -> lo
146 movf lo,f ; Move lo -> f 169 movf lo,f ; Move lo -> f
147 movlw d'0' ; Move 0 -> WREG 170 movlw d'0' ; Move 0 -> WREG
148 cpfsgt lo ; He > 0? 171 cpfsgt lo ; He > 0?
259 bra menu_const_ppO2 ; Exit List 282 bra menu_const_ppO2 ; Exit List
260 283
261 diluent_list_edit_gas1: 284 diluent_list_edit_gas1:
262 movlw d'0' ; Diluent Number 0-4 285 movlw d'0' ; Diluent Number 0-4
263 movwf decodata+0 286 movwf decodata+0
264 movlw d'96' ; EEPROM address of %O2 287 movlw d'91' ; EEPROM address of %O2
265 movwf divemins+0 288 movwf divemins+0
266 bra menu_diluentgas 289 bra menu_diluentgas
267 diluent_list_edit_gas2: 290 diluent_list_edit_gas2:
268 movlw d'1' ; Diluent Number 0-4 291 movlw d'1' ; Diluent Number 0-4
269 movwf decodata+0 292 movwf decodata+0
270 movlw d'98' ; EEPROM address of %O2 293 movlw d'95' ; EEPROM address of %O2
271 movwf divemins+0 294 movwf divemins+0
272 bra menu_diluentgas 295 bra menu_diluentgas
273 diluent_list_edit_gas3: 296 diluent_list_edit_gas3:
274 movlw d'2' ; Diluent Number 0-4 297 movlw d'2' ; Diluent Number 0-4
275 movwf decodata+0 298 movwf decodata+0
276 movlw d'100' ; EEPROM address of %O2 299 movlw d'99' ; EEPROM address of %O2
277 movwf divemins+0 300 movwf divemins+0
278 bra menu_diluentgas 301 bra menu_diluentgas
279 diluent_list_edit_gas4: 302 diluent_list_edit_gas4:
280 movlw d'3' ; Diluent Number 0-4 303 movlw d'3' ; Diluent Number 0-4
281 movwf decodata+0 304 movwf decodata+0
282 movlw d'102' ; EEPROM address of %O2 305 movlw d'103' ; EEPROM address of %O2
283 movwf divemins+0 306 movwf divemins+0
284 bra menu_diluentgas 307 bra menu_diluentgas
285 diluent_list_edit_gas5: 308 diluent_list_edit_gas5:
286 movlw d'4' ; Diluent Number 0-4 309 movlw d'4' ; Diluent Number 0-4
287 movwf decodata+0 310 movwf decodata+0
288 movlw d'104' ; EEPROM address of %O2 311 movlw d'107' ; EEPROM address of %O2
289 movwf divemins+0 312 movwf divemins+0
290 ; bra menu_diluentgas 313 ; bra menu_diluentgas
291 menu_diluentgas: 314 menu_diluentgas:
292 movlw d'1' 315 movlw d'1'
293 movwf menupos 316 movwf menupos
310 WIN_LEFT .20 333 WIN_LEFT .20
311 lfsr FSR2,letter 334 lfsr FSR2,letter
312 OUTPUTTEXT .88 ; First Gas? 335 OUTPUTTEXT .88 ; First Gas?
313 PUTC ' ' 336 PUTC ' '
314 337
315 movlw d'106' 338 movlw d'116'
316 movwf EEADR 339 movwf EEADR
317 call read_eeprom ; Get current startgas 1-5 # into EEDATA 340 call read_eeprom ; Get current startgas 1-5 # into EEDATA
318 decf EEDATA,W ; 0-4 341 decf EEDATA,W ; 0-4
319 cpfseq decodata+0 ; =current displayed gas #? 342 cpfseq decodata+0 ; =current displayed gas #?
320 bra menu_firstdil0 ; no, display three spaces 343 bra menu_firstdil0 ; no, display three spaces
332 call word_processor 355 call word_processor
333 356
334 WIN_LEFT .20 357 WIN_LEFT .20
335 WIN_TOP .65 358 WIN_TOP .65
336 STRCPY TXT_O2_4 359 STRCPY TXT_O2_4
337 movff divemins+0,EEADR 360
361 movf divemins+0,W
362 addlw 0x06
363 movwf EEADR
338 call read_eeprom ; O2 value 364 call read_eeprom ; O2 value
339 movff EEDATA,lo 365 movff EEDATA,lo
340 output_8 366 output_8
341 STRCAT_PRINT "% " 367 STRCAT_PRINT "% "
342 368
347 373
348 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG 374 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG
349 mullw d'10' 375 mullw d'10'
350 movff PRODL,xA+0 376 movff PRODL,xA+0
351 movff PRODH,xA+1 ; ppO2 in [0.01bar] * 10 377 movff PRODH,xA+1 ; ppO2 in [0.01bar] * 10
352 movff divemins+0,EEADR 378 movf divemins+0,W
379 addlw 0x06
380 movwf EEADR
353 call read_eeprom ; O2 value 381 call read_eeprom ; O2 value
354 movff EEDATA,xB+0 382 movff EEDATA,xB+0
355 clrf xB+1 383 clrf xB+1
356 call div16x16 ; xA/xB=xC with xA as remainder 384 call div16x16 ; xA/xB=xC with xA as remainder
357 movlw d'10' 385 movlw d'10'
365 STRCAT_PRINT TXT_METER3 393 STRCAT_PRINT TXT_METER3
366 394
367 WIN_LEFT .20 395 WIN_LEFT .20
368 WIN_TOP .95 396 WIN_TOP .95
369 STRCPY TXT_HE4 397 STRCPY TXT_HE4
370 incf divemins+0,W 398 movf divemins+0,W
371 movwf EEADR 399 addlw 0x07
400 movwf EEADR
372 call read_eeprom ; He value 401 call read_eeprom ; He value
373 movff EEDATA,lo 402 movff EEDATA,lo
374 output_8 403 output_8
375 STRCAT_PRINT "% " 404 STRCAT_PRINT "% "
376 405
380 OUTPUTTEXTH .298 ; END: 409 OUTPUTTEXTH .298 ; END:
381 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG 410 GETCUSTOM8 .18 ; ppO2 warnvalue in WREG
382 mullw d'10' 411 mullw d'10'
383 movff PRODL,xA+0 412 movff PRODL,xA+0
384 movff PRODH,xA+1 ; ppO2 in [0.01bar] * 10 413 movff PRODH,xA+1 ; ppO2 in [0.01bar] * 10
385 movff divemins+0,EEADR 414 movf divemins+0,W
415 addlw 0x06
416 movwf EEADR
386 call read_eeprom ; O2 value 417 call read_eeprom ; O2 value
387 movff EEDATA,xB+0 418 movff EEDATA,xB+0
388 clrf xB+1 419 clrf xB+1
389 call div16x16 ; xA/xB=xC with xA as remainder 420 call div16x16 ; xA/xB=xC with xA as remainder
390 movlw d'10' 421 movlw d'10'
396 movlw d'10' 427 movlw d'10'
397 addwf lo,F 428 addwf lo,F
398 movlw d'0' 429 movlw d'0'
399 addwfc hi,F ; lo:hi holding MOD+10m 430 addwfc hi,F ; lo:hi holding MOD+10m
400 431
401 incf divemins+0,W 432 movf divemins+0,W
402 movwf EEADR 433 addlw 0x07
434 movwf EEADR
403 call read_eeprom ; He value in % -> EEDATA 435 call read_eeprom ; He value in % -> EEDATA
404 movlw d'100' 436 movlw d'100'
405 movwf xA+0 437 movwf xA+0
406 movf EEDATA,W ; He value in % -> EEDATA 438 movf EEDATA,W ; He value in % -> EEDATA
407 subwf xA+0,F ; xA+0 = 100 - He Value in % 439 subwf xA+0,F ; xA+0 = 100 - He Value in %
435 call word_processor 467 call word_processor
436 468
437 WIN_TOP .155 469 WIN_TOP .155
438 lfsr FSR2,letter 470 lfsr FSR2,letter
439 OUTPUTTEXT .89 ; Default: 471 OUTPUTTEXT .89 ; Default:
440 movlw .21 472 movf divemins+0,W
441 movwf lo ; Default always Air 473 addlw 0x04
474 movwf EEADR
475 call read_eeprom ; Default O2 value
476 movff EEDATA,lo
442 output_8 477 output_8
443 PUTC '/' 478 PUTC '/'
444 clrf lo ; Default He value 479 movf divemins+0,W
480 addlw 0x05
481 movwf EEADR
482 call read_eeprom ; Default He value
483 movff EEDATA,lo
445 output_8 484 output_8
446 STRCAT_PRINT " " 485 STRCAT_PRINT " "
447 486
448 call wait_switches ; Waits until switches are released, resets flag if button stays pressed! 487 call wait_switches ; Waits until switches are released, resets flag if button stays pressed!
449 call DISP_menu_cursor 488 call DISP_menu_cursor
501 bra menu_diluentsetup_prelist 540 bra menu_diluentsetup_prelist
502 541
503 make_first_diluent: 542 make_first_diluent:
504 movff decodata+0,EEDATA ; current gas (0-4) into EEDATA 543 movff decodata+0,EEDATA ; current gas (0-4) into EEDATA
505 incf EEDATA,F ; current gas (1-5) into EEDATA 544 incf EEDATA,F ; current gas (1-5) into EEDATA
506 movlw d'106' 545 movlw d'116'
507 movwf EEADR 546 movwf EEADR
508 call write_eeprom ; store in internal EEPROM 547 call write_eeprom ; store in internal EEPROM
509 movlw d'1' 548 movlw d'1'
510 movwf menupos 549 movwf menupos
511 bra menu_diluentgas1 ; return 550 bra menu_diluentgas1 ; return
515 movlw d'4' 554 movlw d'4'
516 movwf menupos 555 movwf menupos
517 bra menu_diluentgas1 ; return 556 bra menu_diluentgas1 ; return
518 557
519 adjust_o2_diluent: 558 adjust_o2_diluent:
520 movff divemins+0,EEADR ; read current value 559 movf divemins+0,W ; read current value
560 addlw 0x06
561 movwf EEADR
521 call read_eeprom ; Low-value 562 call read_eeprom ; Low-value
522 movff EEDATA,lo 563 movff EEDATA,lo
523 564
524 btfsc first_FA ; Minus? 565 btfsc first_FA ; Minus?
525 bra adjust_o2_1_diluent ; yes, minus! 566 bra adjust_o2_1_diluent ; yes, minus!
536 decf lo,F ; decrease O2 577 decf lo,F ; decrease O2
537 movlw d'3' 578 movlw d'3'
538 cpfseq lo 579 cpfseq lo
539 bra adjust_o2_2_diluent 580 bra adjust_o2_2_diluent
540 581
541 incf divemins+0,W 582 movf divemins+0,W
583 addlw 0x07
542 movwf EEADR 584 movwf EEADR
543 call read_eeprom ; read He value 585 call read_eeprom ; read He value
544 586
545 movlw d'100' 587 movlw d'100'
546 movwf lo 588 movwf lo
547 movf EEDATA,W ; He value 589 movf EEDATA,W ; He value
548 subwf lo,F ; lo=100% - He% 590 subwf lo,F ; lo=100% - He%
549 591
550 adjust_o2_2_diluent: ; test if O2+He>100... 592 adjust_o2_2_diluent: ; test if O2+He>100...
551 incf divemins+0,W 593 addlw 0x07
552 movwf EEADR 594 movwf EEADR
553 call read_eeprom ; read He value 595 call read_eeprom ; read He value
554 movf EEDATA,W ; He value 596 movf EEDATA,W ; He value
555 addwf lo,W ; add O2 value 597 addwf lo,W ; add O2 value
556 movwf hi ; store in temp 598 movwf hi ; store in temp
560 602
561 movlw d'4' ; LOWER O2 Limit 603 movlw d'4' ; LOWER O2 Limit
562 movwf lo 604 movwf lo
563 605
564 adjust_o2_3_diluent: 606 adjust_o2_3_diluent:
565 movff divemins+0,EEADR ; save current value 607 movf divemins+0,W ; save current value
608 addlw 0x06
609 movwf EEADR
566 movff lo,EEDATA 610 movff lo,EEDATA
567 call write_eeprom ; Low-value 611 call write_eeprom ; Low-value
568 612
569 movlw d'2' 613 movlw d'2'
570 movwf menupos 614 movwf menupos
571 bra menu_diluentgas1 ; return 615 bra menu_diluentgas1 ; return
572 616
573 adjust_he_diluent: 617 adjust_he_diluent:
574 incf divemins+0,W 618 movf divemins+0,W ; read current value
619 addlw 0x07
575 movwf EEADR ; read current value (He) 620 movwf EEADR ; read current value (He)
576 call read_eeprom ; Low-value 621 call read_eeprom ; Low-value
577 movff EEDATA,lo 622 movff EEDATA,lo
578 623
579 btfsc first_FA ; Minus? 624 btfsc first_FA ; Minus?
592 cpfseq lo 637 cpfseq lo
593 bra adjust_he_2_diluent 638 bra adjust_he_2_diluent
594 clrf lo ; limit to zero 639 clrf lo ; limit to zero
595 640
596 adjust_he_2_diluent: ; test if O2+He>100... 641 adjust_he_2_diluent: ; test if O2+He>100...
597 movff divemins+0,EEADR; read current O2 value 642 movf divemins+0,W
643 addlw 0x06
644 movwf EEADR
598 call read_eeprom ; Low-value 645 call read_eeprom ; Low-value
599 movf EEDATA,W 646 movf EEDATA,W
600 addwf lo,W ; add He value 647 addwf lo,W ; add He value
601 movwf hi ; store in temp 648 movwf hi ; store in temp
602 movlw d'101' 649 movlw d'101'
604 bra adjust_he_3_diluent ; No! 651 bra adjust_he_3_diluent ; No!
605 ; clrf lo ; Yes, clear He to zero 652 ; clrf lo ; Yes, clear He to zero
606 decf lo,F ; reduce He again = unchanged after operation 653 decf lo,F ; reduce He again = unchanged after operation
607 654
608 adjust_he_3_diluent: 655 adjust_he_3_diluent:
609 incf divemins+0,W ; save current value 656 movf divemins+0,W ; save current value
657 addlw 0x07
610 movwf EEADR 658 movwf EEADR
611 movff lo,EEDATA 659 movff lo,EEDATA
612 call write_eeprom ; Low-value 660 call write_eeprom ; Low-value
613 661
614 movlw d'3' 662 movlw d'3'
615 movwf menupos 663 movwf menupos
616 bra menu_diluentgas1; 664 bra menu_diluentgas1;
617 665
618 restore_gas_diluent: 666 restore_gas_diluent:
619 movff divemins+0,EEADR ; save Default value (O2) 667 movf divemins+0,W ; read Default value
620 movlw .21 ; Always Air 668 addlw 0x04
621 movwf EEDATA 669 movwf EEADR
622 call write_eeprom 670 call read_eeprom ; Low-value
623 incf EEADR,F ; Point to He 671 movff EEDATA,lo
624 clrf EEDATA 672 movf divemins+0,W
625 call write_eeprom 673 addlw 0x05
674 movwf EEADR
675 call read_eeprom ; High-value
676 movff EEDATA,hi
677
678 movf divemins+0,W ; save Default value
679 addlw 0x06
680 movwf EEADR
681 movff lo,EEDATA
682 call write_eeprom ; Low-value
683 movf divemins+0,W
684 addlw 0x07
685 movwf EEADR
686 movff hi,EEDATA
687 call write_eeprom ; High-value
688
626 movlw d'5' 689 movlw d'5'
627 movwf menupos 690 movwf menupos
628 bra menu_diluentgas1 691 bra menu_diluentgas1
629 692
630 693
644 WIN_TOP .2 707 WIN_TOP .2
645 WIN_LEFT .80 708 WIN_LEFT .80
646 lfsr FSR2,letter 709 lfsr FSR2,letter
647 710
648 ;He check 711 ;He check
649 incf divemins+0,W 712 movf divemins+0,W
713 addlw 0x07
650 movwf EEADR 714 movwf EEADR
651 call read_eeprom ; He value 715 call read_eeprom ; He value
652 movff EEDATA,lo ; Move EEData -> lo 716 movff EEDATA,lo ; Move EEData -> lo
653 movf lo,f ; Move lo -> f 717 movf lo,f ; Move lo -> f
654 movlw d'0' ; Move 0 -> WREG 718 movlw d'0' ; Move 0 -> WREG
655 cpfsgt lo ; He > 0? 719 cpfsgt lo ; He > 0?
656 bra diluent_title_bar3 ; NO check o2 720 bra diluent_title_bar3 ; NO check o2
657 721
658 ; YES Write TX 15/55 722 ; YES Write TX 15/55
659 STRCAT TXT_TX3 723 STRCAT TXT_TX3
660 movff divemins+0,EEADR 724 movf divemins+0,W
725 addlw 0x06
726 movwf EEADR
661 call read_eeprom ; O2 value 727 call read_eeprom ; O2 value
662 movff EEDATA,lo 728 movff EEDATA,lo
663 output_8 ; Write O2 729 output_8 ; Write O2
664 PUTC '/' 730 PUTC '/'
665 incf divemins+0,W 731 movf divemins+0,W
732 addlw 0x07
666 movwf EEADR 733 movwf EEADR
667 call read_eeprom ; He value 734 call read_eeprom ; He value
668 movff EEDATA,lo 735 movff EEDATA,lo
669 output_8 ; Write He 736 output_8 ; Write He
670 bra diluent_title_bar7 737 bra diluent_title_bar7
671 738
672 ; New v1.44se 739 ; New v1.44se
673 diluent_title_bar3: ; O2 Check 740 diluent_title_bar3: ; O2 Check
674 movff divemins+0,EEADR 741 movf divemins+0,W
742 addlw 0x06
743 movwf EEADR
675 call read_eeprom ; O2 value 744 call read_eeprom ; O2 value
676 movff EEDATA,lo 745 movff EEDATA,lo
677 movf lo,f ; Move lo -> f 746 movf lo,f ; Move lo -> f
678 movlw d'21' ; Move 21 -> WREG 747 movlw d'21' ; Move 21 -> WREG
679 cpfseq lo ; o2 = 21 748 cpfseq lo ; o2 = 21
855 bra change_ppo2_minus 924 bra change_ppo2_minus
856 dcfsnz menupos,F 925 dcfsnz menupos,F
857 bra change_ppo2_reset 926 bra change_ppo2_reset
858 movlw d'2' 927 movlw d'2'
859 movwf menupos 928 movwf menupos
860 bra menu_const_ppO2_return 929 goto menu_const_ppO2_return
861 930
862 change_ppo2_plus: 931 change_ppo2_plus:
863 movf decodata+0,W ; read current value 932 movf decodata+0,W ; read current value
864 addlw d'36' ; offset in memory 933 addlw d'36' ; offset in memory
865 movwf EEADR 934 movwf EEADR
922 movlw d'1' 991 movlw d'1'
923 movwf menupos 992 movwf menupos
924 bra menu_const_ppO21 993 bra menu_const_ppO21
925 994
926 get_first_diluent: ; Read first diluent into lo(O2) and hi(He) 995 get_first_diluent: ; Read first diluent into lo(O2) and hi(He)
927 read_int_eeprom d'106' ; Read First Diluent (1-5) 996 read_int_eeprom d'116' ; Read First Diluent (1-5)
928 decf EEDATA,W ; WREG: 0-4 997 movf EEDATA,W ; WREG: 0-4
929 mullw .2 ; PRODL: 0-8 998 mullw .4 ; PRODL: 0-16
930 movlw .96 ; Base address for O2 999 movlw .93 ; Base address for O2
931 addwf PRODL,W 1000 addwf PRODL,W
932 movwf EEADR 1001 movwf EEADR
933 call read_eeprom ; Read O2 1002 call read_eeprom ; Read O2
934 movff EEDATA,lo 1003 movff EEDATA,lo
935 incf EEADR,F 1004 incf EEADR,F