Mercurial > public > hwos_code
diff src/eeprom_rs232.asm @ 628:cd58f7fc86db
3.05 stable work
author | heinrichsweikamp |
---|---|
date | Thu, 19 Sep 2019 12:01:29 +0200 |
parents | c40025d8e750 |
children | 237931377539 |
line wrap: on
line diff
--- a/src/eeprom_rs232.asm Sun Jun 30 23:22:32 2019 +0200 +++ b/src/eeprom_rs232.asm Thu Sep 19 12:01:29 2019 +0200 @@ -1,6 +1,6 @@ ;============================================================================= ; -; File eeprom_rs232.asm combined next generation V3.03.1 +; File eeprom_rs232.asm combined next generation V3.04.3 ; ; Internal EEPROM, RS232 ; @@ -90,12 +90,12 @@ movlw 0xAA movwf EECON2 bsf EECON1,WR - bsf INTCON,GIE ; ...but the flag for the ISR routines were still set, so they will interrupt now! write_eep2: btfsc EECON1,WR bra write_eep2 ; wait about 4ms... bcf EECON1,WREN + bsf INTCON,GIE ; ...but the flag for the ISR routines were still set, so they will interrupt now! return ;============================================================================= @@ -108,10 +108,10 @@ clrf TXSTA2 clrf RCSTA2 banksel common ; back to bank common - bcf ir_power ; IR off - bcf mcp_power ; power-down instrumentation amp - bsf s8_npower ; power-down S8 digital interface - bcf s8_digital_avail ; digital S8 interface not available + bcf ir_power ; IR off + bcf mcp_power ; power-down instrumentation amp + bsf s8_npower ; power-down S8 digital interface + bcf s8_digital_avail ; digital S8 interface not available return @@ -138,16 +138,16 @@ return enable_s8: - ; Check for Digital/Analog - bsf s8_npower ; power-down S8 HUD - WAITMS d'1' ; very short delay - bsf mcp_power ; power-up instrumentation amp - btfss mcp_power - bra $-6 - banksel TXSTA2 ; select bank for IO register access + banksel TXSTA2 ; select bank for IO register access clrf TXSTA2 clrf RCSTA2 banksel common ; back to bank common + ; Check for Digital/Analog + bsf s8_npower ; power-down S8 HUD + WAITMS d'2' ; very short delay + bsf mcp_power ; power-up instrumentation amp + btfss mcp_power + bra $-4 ; It may be digital, check for voltage when isolator is powered bcf s8_npower ; power S8 HUD @@ -190,6 +190,7 @@ btfss speed_is_normal ; speed = normal? bra enable_rs232_1 ; NO - wait for ISR to adjust speed bcf PORTE,0 ; start comm + bsf PORTJ,2 ; /Reset (for very old OSTC sport) ;initialize serial port1 (TRISC6/7) movlw b'00100100' ; BRGH=1, SYNC=0 movwf TXSTA1 @@ -204,6 +205,7 @@ clrf TXSTA1 ; UART disable bcf PORTC,6 ; TX hard to GND bsf PORTE,0 ; stop comm + bcf PORTJ,2 ; /Reset (for very old OSTC sport) return