comparison code_part1/OSTC_code_asm_part1/divemode.asm @ 655:8c01edcf57fc

Allow any diluent to be "First gas" in CCR modes
author heinrichsweikamp
date Tue, 23 Oct 2012 10:03:47 +0200
parents e6ac142e82b0
children 5063fb9f07db
comparison
equal deleted inserted replaced
654:a38d82918458 655:8c01edcf57fc
2056 read_int_eeprom d'27' 2056 read_int_eeprom d'27'
2057 movff EEDATA, gaslist_active 2057 movff EEDATA, gaslist_active
2058 return 2058 return
2059 2059
2060 set_first_gas_ccr: ; Set Diluent 2060 set_first_gas_ccr: ; Set Diluent
2061 movlw .1 2061 call get_first_diluent ; Read first diluent into lo(O2) and hi(He)
2062 movwf active_diluent ; Always start with Diluent 1 (EEPROM 96/97) 2062 movff hi,char_I_He_ratio ; And copy into hold register
2063 read_int_eeprom d'97' ; Read He 2063 movff lo, char_I_O2_ratio ; O2 ratio
2064 movff EEDATA,char_I_He_ratio ; And copy into hold register
2065 read_int_eeprom d'96' ; Read O2
2066 movff EEDATA, char_I_O2_ratio ; O2 ratio
2067 movff char_I_He_ratio, wait_temp ; copy into bank1 register 2064 movff char_I_He_ratio, wait_temp ; copy into bank1 register
2068 bsf STATUS,C ; Borrow bit 2065 bsf STATUS,C ; Borrow bit
2069 movlw d'100' ; 100% 2066 movlw d'100' ; 100%
2070 subfwb wait_temp,W ; minus He 2067 subfwb wait_temp,W ; minus He
2071 bsf STATUS,C ; Borrow bit 2068 bsf STATUS,C ; Borrow bit
2072 subfwb EEDATA,W ; minus O2 2069 subfwb lo,W ; minus O2
2073 movff WREG, char_I_N2_ratio ; = N2! 2070 movff WREG, char_I_N2_ratio ; = N2!
2071 read_int_eeprom d'106' ; Read First Diluent (1-5)
2072 movff EEDATA,active_diluent
2074 return 2073 return