diff code_part1/OSTC_code_asm_part1/start.asm @ 500:014b2b1e82dc

Reset Brightness after firmware update
author heinrichsweikamp
date Wed, 16 Nov 2011 11:57:21 +0100
parents 2ac77db9c150
children ed51a7a89d9a
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/start.asm	Tue Nov 15 20:36:41 2011 +0100
+++ b/code_part1/OSTC_code_asm_part1/start.asm	Wed Nov 16 11:57:21 2011 +0100
@@ -133,17 +133,16 @@
 	call	write_eeprom			; write version y
 	clrf	EEADRH					; Reset EEADRH
 
-; Reset CF48
-;	movlw	d'1'
-;	movwf	EEADRH					; EEPROM Bank1
-;	clrf	EEDATA					; =0
-;	write_int_eeprom	d'191'
-;	write_int_eeprom	d'192'	
-;	write_int_eeprom	d'193'
-;	write_int_eeprom	d'194'		; Reset Default and Current Value to zero
-;	clrf	EEADRH
-;
-;	goto	reset_all_cf			; resets all custom functions bank0 and bank1 and jumps to "restart"
+; After update resets
+	; Reset brightness to ECO
+	movlw	LOW		0x104
+	movwf	EEADR
+	movlw	HIGH 	0x104
+	movwf	EEADRH					; OLED brightness (=0: Eco, =1: High)
+	movlw	.0
+	movwf	EEDATA
+	call	write_eeprom			; write byte
+	clrf	EEADRH					; Reset EEADRH	
 			
 restart:
 	movlw	b'00000011'