diff code_part1/OSTC_code_asm_part1/surfmode.asm @ 703:39e02673db4c

some cleanup
author heinrichsweikamp
date Sun, 17 Mar 2013 13:33:17 +0100
parents 6e456a6398e0
children 91ae251d379f
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/surfmode.asm	Sat Mar 16 13:56:26 2013 +0100
+++ b/code_part1/OSTC_code_asm_part1/surfmode.asm	Sun Mar 17 13:33:17 2013 +0100
@@ -310,6 +310,7 @@
 	btfsc	RCSTA,7						; RS232 already disabled
 	call	disable_rs232				; No, disable UART module
 
+    clrf    EEADRH
 	btfss	charge_done					; charge done?
 	bra		test_charger2				; No, add incomplete cycle!
 	
@@ -408,9 +409,9 @@
 	movff	EEDATA,temp2				; high byte
 	bcf		STATUS,C
 	movlw	d'1'
-	addwf	temp1
+	addwf	temp1,F
 	movlw	d'0'
-	addwfc	temp2				
+	addwfc	temp2,F
 	movff	temp1,EEDATA
 	write_int_eeprom	d'50'			; write byte stored in EEDATA
 	movff	temp2,EEDATA
@@ -427,6 +428,7 @@
 	WAITMS	d'100'
 	bsf		LED_red
 	bsf		charge_done					; Charge cycle finished
+    bsf		charge_started				; Charger started in CV mode
 	return
 
 show_cc_active:							; CC mode