comparison code_part1/OSTC_code_asm_part1/menu.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
429 show_dateformat3: 429 show_dateformat3:
430 DISPLAYTEXTH .261 ; YY/MM/DD = 2 430 DISPLAYTEXTH .261 ; YY/MM/DD = 2
431 return 431 return
432 432
433 toggle_brightness: 433 toggle_brightness:
434 movlw LOW 0x104 434 movlw LOW 0x103
435 movwf EEADR 435 movwf EEADR
436 movlw HIGH 0x104 436 movlw HIGH 0x103
437 movwf EEADRH ; OLED brightness (=0: Eco, =1: High) 437 movwf EEADRH ; OLED brightness (=0: Eco, =1: High)
438 call read_eeprom ; read byte 438 call read_eeprom ; read byte
439 bcf oled_brightness_high ; Eco mode 439 bcf oled_brightness_high ; Eco mode
440 movlw .0 440 movlw .0
441 cpfseq EEDATA ; High? 441 cpfseq EEDATA ; High?
447 ; ...Display it... 447 ; ...Display it...
448 rcall toggle_brightness_show 448 rcall toggle_brightness_show
449 call PLED_brightness_full ; Set OLED 449 call PLED_brightness_full ; Set OLED
450 450
451 ; ...and write it again to EEPROM 451 ; ...and write it again to EEPROM
452 movlw LOW 0x104 452 movlw LOW 0x103
453 movwf EEADR 453 movwf EEADR
454 movlw HIGH 0x104 454 movlw HIGH 0x103
455 movwf EEADRH ; OLED brightness (=0: Eco, =1: High) 455 movwf EEADRH ; OLED brightness (=0: Eco, =1: High)
456 movlw .0 456 movlw .0
457 btfsc oled_brightness_high 457 btfsc oled_brightness_high
458 movlw .1 458 movlw .1
459 movwf EEDATA 459 movwf EEDATA