comparison code_part1/OSTC_code_asm_part1/isr.asm @ 347:ba0f30f3d560

Ignore depths>130m in PC simulation
author heinrichsweikamp
date Wed, 25 May 2011 20:44:29 +0200
parents 8bb7c901743d
children 9ef9b681f38f 562f1bc79f3c
comparison
equal deleted inserted replaced
346:193d1adc97b7 347:ba0f30f3d560
108 bra simulator_int1 ; No 108 bra simulator_int1 ; No
109 incf RCREG,F ; Yes, so force RCREG=1 109 incf RCREG,F ; Yes, so force RCREG=1
110 110
111 simulator_int1: 111 simulator_int1:
112 movf RCREG,w ; depth in m 112 movf RCREG,w ; depth in m
113 movwf PRODL ; Copy
114
115 movlw d'140' ; Limit to 130m
116 cpfslt PRODL ; compare with value in UART
117 movwf PRODL ; Overwrite reading
118
119 movf PRODL,w ; depth in m
113 mullw d'100' ; result will be mbar 120 mullw d'100' ; result will be mbar
114 movff PRODL,sim_pressure+0 ; stored for pressure overwrite 121 movff PRODL,sim_pressure+0 ; stored for pressure overwrite
115 movff PRODH,sim_pressure+1 122 movff PRODH,sim_pressure+1
116 bra uartint1 ; exit uart int 123 bra uartint1 ; exit uart int
117 124