diff code_part1/OSTC_code_asm_part1/eeprom_rs232.asm @ 537:3091628b2742

BUGFIX: Spurious logbook read issue
author heinrichsweikamp
date Sun, 08 Jan 2012 12:44:51 +0100
parents e2acb601504c
children fbd5e2b75a63
line wrap: on
line diff
--- 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: