Mercurial > public > mk2
diff code_part1/OSTC_code_asm_part1/start.asm @ 499:2ac77db9c150
Added OLED brightness setting, texts 280, 312 and 313 need update
author | heinrichsweikamp |
---|---|
date | Tue, 15 Nov 2011 20:36:41 +0100 |
parents | 4b2add2adde3 |
children | 014b2b1e82dc |
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/start.asm Mon Nov 14 08:12:13 2011 +0100 +++ b/code_part1/OSTC_code_asm_part1/start.asm Tue Nov 15 20:36:41 2011 +0100 @@ -251,6 +251,18 @@ cpfseq EEDATA ; is 0xAA already? call logbook_convert_64k ; No, convert now (And write 0xAA to internal EEPROM 0x100) +; Set OLED brightness flag + movlw LOW 0x104 + movwf EEADR + movlw HIGH 0x104 + movwf EEADRH ; OLED brightness (=0: Eco, =1: High) + call read_eeprom ; read byte + bcf oled_brightness_high ; Eco mode + movlw .0 + cpfseq EEDATA ; High? + bsf oled_brightness_high ; Yes! + + clrf EEADRH ; Reset EEADRH goto surfloop ; Jump to Surfaceloop!