Mercurial > public > mk2
comparison code_part1/OSTC_code_asm_part1/start.asm @ 578:fbd5e2b75a63
adding access to CF64-CF95
author | heinrichsweikamp |
---|---|
date | Tue, 24 Apr 2012 08:39:43 +0200 |
parents | ab2686087bce |
children | cda5b45b953f |
comparison
equal
deleted
inserted
replaced
577:e3ffc6d62a63 | 578:fbd5e2b75a63 |
---|---|
150 call write_eeprom ; write version y | 150 call write_eeprom ; write version y |
151 clrf EEADRH ; Reset EEADRH | 151 clrf EEADRH ; Reset EEADRH |
152 | 152 |
153 ; After update resets | 153 ; After update resets |
154 ; Reset brightness to ECO | 154 ; Reset brightness to ECO |
155 movlw LOW 0x104 | 155 movlw LOW 0x103 |
156 movwf EEADR | 156 movwf EEADR |
157 movlw HIGH 0x104 | 157 movlw HIGH 0x103 |
158 movwf EEADRH ; OLED brightness (=0: Eco, =1: High) | 158 movwf EEADRH ; OLED brightness (=0: Eco, =1: High) |
159 movlw .0 | 159 movlw .0 |
160 movwf EEDATA | 160 movwf EEDATA |
161 call write_eeprom ; write byte | 161 call write_eeprom ; write byte |
162 clrf EEADRH ; Reset EEADRH | 162 clrf EEADRH ; Reset EEADRH |
269 movlw 0xAA | 269 movlw 0xAA |
270 cpfseq EEDATA ; is 0xAA already? | 270 cpfseq EEDATA ; is 0xAA already? |
271 call logbook_convert_64k ; No, convert now (And write 0xAA to internal EEPROM 0x100) | 271 call logbook_convert_64k ; No, convert now (And write 0xAA to internal EEPROM 0x100) |
272 | 272 |
273 ; Set OLED brightness flag | 273 ; Set OLED brightness flag |
274 movlw LOW 0x104 | 274 movlw LOW 0x103 |
275 movwf EEADR | 275 movwf EEADR |
276 movlw HIGH 0x104 | 276 movlw HIGH 0x103 |
277 movwf EEADRH ; OLED brightness (=0: Eco, =1: High) | 277 movwf EEADRH ; OLED brightness (=0: Eco, =1: High) |
278 call read_eeprom ; read byte | 278 call read_eeprom ; read byte |
279 bcf oled_brightness_high ; Eco mode | 279 bcf oled_brightness_high ; Eco mode |
280 movlw .0 | 280 movlw .0 |
281 cpfseq EEDATA ; High? | 281 cpfseq EEDATA ; High? |