comparison 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
comparison
equal deleted inserted replaced
499:2ac77db9c150 500:014b2b1e82dc
131 movlw softwareversion_y 131 movlw softwareversion_y
132 movwf EEDATA 132 movwf EEDATA
133 call write_eeprom ; write version y 133 call write_eeprom ; write version y
134 clrf EEADRH ; Reset EEADRH 134 clrf EEADRH ; Reset EEADRH
135 135
136 ; Reset CF48 136 ; After update resets
137 ; movlw d'1' 137 ; Reset brightness to ECO
138 ; movwf EEADRH ; EEPROM Bank1 138 movlw LOW 0x104
139 ; clrf EEDATA ; =0 139 movwf EEADR
140 ; write_int_eeprom d'191' 140 movlw HIGH 0x104
141 ; write_int_eeprom d'192' 141 movwf EEADRH ; OLED brightness (=0: Eco, =1: High)
142 ; write_int_eeprom d'193' 142 movlw .0
143 ; write_int_eeprom d'194' ; Reset Default and Current Value to zero 143 movwf EEDATA
144 ; clrf EEADRH 144 call write_eeprom ; write byte
145 ; 145 clrf EEADRH ; Reset EEADRH
146 ; goto reset_all_cf ; resets all custom functions bank0 and bank1 and jumps to "restart"
147 146
148 restart: 147 restart:
149 movlw b'00000011' 148 movlw b'00000011'
150 movwf T3CON ; Timer3 with 32768Hz clock running 149 movwf T3CON ; Timer3 with 32768Hz clock running
151 clrf TMR3L 150 clrf TMR3L