[A86] Re: Low Batteries


[Prev][Next][Index][Thread]

[A86] Re: Low Batteries




Battery level can be checked by measuring the speed of the processor
relative to the interrupts.  You could, for example, set up a custom
interrupt routine that increments a counter every time an interrupt
occurs.  Then you might see how many times hl can be incremented
before the counter hits 10.  hl would reach a higher number with newer
batteries...

What I've described is what's done in iShell or the old YAS.  The ROM
_does_ have a routine that does something similar at startup, except
that it checks to see if an interrupt has occurred based on port 1.

On Sunday, November 18, 2001, Notbynow wrote:

>        I would like to know how the calculator knows when its batteries are 
> low.  I have not yet found any routine in the ROM that deals with this, and 
> I'm not aware of a special interrupt or port that deals with the voltage 
> level.  This leads me to beleive that the "your batteries are low, recommend 
> change of batteries" thing is built into the hardware of the calc.  That 
> leads me to another question:  How does the calc know how to draw the ASCII 
> characters?  It was my understanding that ROM routines like _puts and the 
> like drew strings of characters like it would sprites.  If the calc. can draw 
> characters without a ROM routine, why cant programs use it?  If you can 
> answer any of these questions, or if you can clear up any misunderstanding I 
> may have, I would appreciate it.  I might not be looking hard enough in the 
> ROM, but I dont know.

> Thanks,
> Marc McG

--
Hail Ants! 
Aaron
acurti1@umbc.edu





References: