comparison code_part1/OSTC_code_asm_part1/menu_gassetup.asm @ 377:be71e563ac09 64kByte Logbook

First gas can be reset to 0m, test for timer1 race condition
author heinrichsweikamp
date Mon, 13 Jun 2011 07:45:59 +0200
parents ed26990716fe
children ab962c4b19d6
comparison
equal deleted inserted replaced
376:ed26990716fe 377:be71e563ac09
901 901
902 movlw d'99' 902 movlw d'99'
903 cpfslt lo 903 cpfslt lo
904 movwf lo ; limit to 99m 904 movwf lo ; limit to 99m
905 905
906 btfsc second_FA ; Is first gas?
907 clrf lo ; Yes, set to 0m
908
906 movf decodata+0,W ; read current value 909 movf decodata+0,W ; read current value
907 addlw d'28' ; offset in memory 910 addlw d'28' ; offset in memory
908 movwf EEADR 911 movwf EEADR
909 call read_eeprom ; Low-value 912 ; call read_eeprom ; Low-value
910 movff lo,EEDATA ; write result 913 movff lo,EEDATA ; write result
911 call write_eeprom ; save result in EEPROM 914 call write_eeprom ; save result in EEPROM
912 915
913 movlw d'5' 916 movlw d'5'
914 movwf menupos 917 movwf menupos