Mercurial > public > hwos_code
diff src/eeprom_rs232.asm @ 133:939f1e83c4c2
BUGFIX: Surface interval was not displayed correctly in some cases
NEW: Store tissue load, date and time, surface interval, desat. time and nofly time every hour and reload them after battery change
author | heinrichsweikamp |
---|---|
date | Mon, 14 Jul 2014 15:17:07 +0200 |
parents | f3062a611eef |
children | 5cb177f0948a |
line wrap: on
line diff
--- a/src/eeprom_rs232.asm Tue Jul 08 11:39:00 2014 +0200 +++ b/src/eeprom_rs232.asm Mon Jul 14 15:17:07 2014 +0200 @@ -10,13 +10,7 @@ ; 2011-08-06 : [mH] moving from OSTC code #include "ostc3.inc" -#include "start.inc" -#include "tft.inc" #include "wait.inc" -#include "strings.inc" -#include "convert.inc" -#include "adc_lightsensor.inc" -#include "math.inc" ;============================================================================= eeprom code 0xF00000+0x10 @@ -61,7 +55,7 @@ bcf EECON1,CFGS bsf EECON1,WREN - bcf INTCON,GIE ; even the RTC will be delayed for the next 5 instructions... + bcf INTCON,GIE ; Disable interrups for the next 5 instructions movlw 0x55 movwf EECON2 movlw 0xAA @@ -160,7 +154,6 @@ global enable_rs232 enable_rs232: bcf TRISC,6 ; Output - bsf TRISC,7 ; Input call speed_normal ; 16MHz enable_rs232_2: movlw T2CON_NORMAL @@ -185,7 +178,6 @@ clrf RCSTA1 clrf TXSTA1 ; UART disable bsf TRISC,6 ; Input - bsf TRISC,7 ; Input return global rs232_wait_tx @@ -211,22 +203,18 @@ global rs232_get_byte rs232_get_byte: - bcf PIR1,RCIF ; clear flag bcf rs232_recieve_overflow ; clear flag clrf uart1_temp clrf uart2_temp rs232_get_byte2: btfsc PIR1,RCIF ; data arrived? return -; bra rs232_get_byte3 - decfsz uart2_temp,F bra rs232_get_byte2 decfsz uart1_temp,F bra rs232_get_byte2 ; timeout occoured (about 20ms) bsf rs232_recieve_overflow ; set flag -;rs232_get_byte3: bcf RCSTA1,CREN ; Clear receiver status bsf RCSTA1,CREN return ; and return anyway