Mercurial > public > mk2
changeset 537:3091628b2742
BUGFIX: Spurious logbook read issue
author | heinrichsweikamp |
---|---|
date | Sun, 08 Jan 2012 12:44:51 +0100 |
parents | e77df4e2d025 |
children | 5eff719fd292 |
files | code_part1/OSTC_code_asm_part1/adc_rtc.asm code_part1/OSTC_code_asm_part1/changelog.txt code_part1/OSTC_code_asm_part1/definitions.asm code_part1/OSTC_code_asm_part1/divemode.asm code_part1/OSTC_code_asm_part1/eeprom_rs232.asm code_part1/OSTC_code_asm_part1/i2c_eeprom.asm code_part1/OSTC_code_asm_part1/simulator.asm code_part1/OSTC_code_asm_part1/start.asm |
diffstat | 8 files changed, 22 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/adc_rtc.asm Wed Dec 21 12:06:27 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/adc_rtc.asm Sun Jan 08 12:44:51 2012 +0100 @@ -204,6 +204,7 @@ RTCinit: ; resets RTC movlw 0x80 movwf TMR1H + nop ; See errata DS80284E-page 2 clrf TMR1L ; Reset RTC if any part of the time/date is out of range
--- a/code_part1/OSTC_code_asm_part1/changelog.txt Wed Dec 21 12:06:27 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/changelog.txt Sun Jan 08 12:44:51 2012 +0100 @@ -1,3 +1,8 @@ +New in 2.09 beta: +BETA Version - Do NOT use for diving! +BUGFIX: Spurious logbook read issue +BUGFIX: Improved stability for bootloader v2 + New in 2.09 beta: BETA Version - Do NOT use for diving! BUGFIX: small layout fixes
--- a/code_part1/OSTC_code_asm_part1/definitions.asm Wed Dec 21 12:06:27 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/definitions.asm Sun Jan 08 12:44:51 2012 +0100 @@ -22,7 +22,7 @@ ; ToDo: #DEFINE softwareversion_x d'2' ; Software version XX.YY -#DEFINE softwareversion_y d'09' ; Software version XX.YY +#DEFINE softwareversion_y d'10' ; Software version XX.YY #DEFINE softwareversion_beta 1 ; (and 0 for release) @@ -46,13 +46,16 @@ ; Standard 16MHz mode ; #DEFINE SPBRG_VALUE d'34' ; #DEFINE OSCCON_VALUE b'01101100' ; 4MHz (x4 PLL) +; #DEFINE SSPSTAT_VALUE b'00000000' ; with slew rate control (400kHz) ; #DEFINE SSPADD_VALUE d'8' ; 400kHz I2C clock @ 16MHz Fcy ; #DEFINE T0CON_VALUE b'00011111' ; Timer0 ; #DEFINE SPEED_16MHz ; Experimental 32MHz mode #DEFINE SPBRG_VALUE d'68' #DEFINE OSCCON_VALUE b'01111100' ; 8MHz (x4 PLL) - #DEFINE SSPADD_VALUE d'16' ; 400kHz I2C clock @ 32MHz Fcy +; #DEFINE SSPADD_VALUE d'16' ; 400kHz I2C clock @ 32MHz Fcy + #DEFINE SSPADD_VALUE d'32' ; 200kHz I2C clock @ 32MHz Fcy + #DEFINE SSPSTAT_VALUE b'00000000' ; with slew rate control #DEFINE T0CON_VALUE b'00010000' ; Timer0 #DEFINE SPEED_32MHz
--- a/code_part1/OSTC_code_asm_part1/divemode.asm Wed Dec 21 12:06:27 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/divemode.asm Sun Jan 08 12:44:51 2012 +0100 @@ -435,6 +435,7 @@ movff WREG,char_I_step_is_1min ; Force 2 second deco mode clrf TMR3L + nop ; See errata DS80284E-page 2 clrf TMR3H ; Reset Timer3 call deco_calc_hauptroutine ; calc_tissue
--- a/code_part1/OSTC_code_asm_part1/eeprom_rs232.asm Wed Dec 21 12:06:27 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/eeprom_rs232.asm Sun Jan 08 12:44:51 2012 +0100 @@ -215,17 +215,19 @@ uart_115k_bootloader: bcf PIE1,RCIE ; disable interrupt for RS232 -; bcf PIR1,RCIF ; clear flag call PLED_ClearScreen ; Clear screen movlw color_red call PLED_set_color ; Set to Red DISPLAYTEXTH d'302' ; Bootloader - movlw d'4' ; one second + bcf RCSTA,CREN ; Clear receiver status + bsf RCSTA,CREN + bcf PIR1,RCIF ; clear flag + movlw d'200' ; one second movwf uart1_temp uart_115k_bootloader0: btfsc PIR1,RCIF ; New byte in UART? bra uart_115k_bootloader1 ; Yes, Check if 0xC1 - WAITMS d'250' + WAITMS d'5' decfsz uart1_temp,F bra uart_115k_bootloader0 uart_115k_bootloader2:
--- a/code_part1/OSTC_code_asm_part1/i2c_eeprom.asm Wed Dec 21 12:06:27 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/i2c_eeprom.asm Sun Jan 08 12:44:51 2012 +0100 @@ -369,13 +369,13 @@ bsf TRISC,3 ; SCL Input clrf SSPCON1 ; set I²C Mode WAITMS d'10' ; Reset-Timeout for I2C devices - movlw b'00000000' + movlw SSPSTAT_VALUE movwf SSPSTAT movlw b'00101000' movwf SSPCON1 movlw b'00000000' movwf SSPCON2 - movlw d'8' ; 400kHz I2C clock @ 16MHz Fcy + movlw SSPADD_VALUE movwf SSPADD bcf LED_red ostc_debug 'O' ; Sends debug-information to screen if debugmode active
--- a/code_part1/OSTC_code_asm_part1/simulator.asm Wed Dec 21 12:06:27 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/simulator.asm Sun Jan 08 12:44:51 2012 +0100 @@ -373,6 +373,7 @@ bsf no_sensor_int ; Disable sensor interrupt clrf T3CON ; Disable timer3 counter, clrf TMR3L ; so the simu won't stop right away. + nop clrf TMR3H call diveloop_boot ; configure gases, etc.
--- a/code_part1/OSTC_code_asm_part1/start.asm Wed Dec 21 12:06:27 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/start.asm Sun Jan 08 12:44:51 2012 +0100 @@ -165,6 +165,7 @@ movlw b'00000011' movwf T3CON ; Timer3 with 32768Hz clock running clrf TMR3L + nop clrf TMR3H bcf LED_red bcf LED_blue ; all LEDs off @@ -474,7 +475,7 @@ movwf ADCON2 clrf SSPCON1 ; Set I²C Mode - movlw b'00000000' + movlw SSPSTAT_VALUE movwf SSPSTAT movlw b'00101000' movwf SSPCON1