Close

20230215b -- I Got the Power!

A project log for ROM Disassembly - AlphaSmart Pro

Wherein I disassemble the ROM from a vintage typewriter-thing

ziggurat29ziggurat29 02/19/2023 at 14:200 Comments

While whizzing through the code I did notice some text:

FCBB 20 20 20 20+aLowBattery:    fcc "             Low Battery!!"
FCBB 20 20 20 20+                fcb 0

referenced at

E514             showLowBattery_E514:
E514 BD F6 18        jsr     clearHomeLCD_F618 ; Clear LCD set cursor pos 0
E517 BD F7 4E        jsr     setcpLine1_F74E ; set cursor Line 1
E51A CE FC BB        ldx     #aLowBattery    ; "             Low Battery!!"
E51D BD F6 69        jsr     showText_F669   ; show nts text @ X
E520 39              rts 

in turn referenced at

E503             sub_E503:
E503 12 00 02 0C     brset   PORTA_0 2 locret_E513 ; leave if PORTA b2 high
E507 BD E5 14        jsr     showLowBattery_E514 ; XXX low-battery related
E50A CE 00 04        ldx     #4              ; about 1.96 sec
E50D             loop_E50D:
E50D BD F6 1E        jsr     delay590ms_F61E ; delay ~ 590 ms
E510 09              dex
E511 26 FA           bne     loop_E50D
E513             locret_E513:
E513 39              rts

in turn referenced early in 'start' at

E02E BD E5 03        jsr     sub_E503   ; XXX check low battery and show message if needed

The code at E503 is interesting because the whole 'show the low battery message' is only executed if Port A, bit 1 is low.  Otherwise it is skipped. 

So I conclude that PAb1 is the 'battery OK' indicator.  Looking at the board photo, there is clearly a power section to the right, and in particular this device:

This is a DC-DC converter, and makes since because two AA batteries at nominally 3V is not going to power the 5V system.  So it steps up.  However, in the datasheet (and I love the '70's disco font used for the section headings), there is a reference circuit on p. 11 for a low-battery indicator, so I suspect that pin 6, A0, of this device is connected to PAb1 of the CPU.  (Maybe with some interceding circuitry, but at least logically so.)

Discussions