Re: A83: Time on TI-83


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

Re: A83: Time on TI-83




He doesn't turn the interrupt off... he just turns the LCD off and waits
for ON to be pressed.

Master M wrote:
> 
> But, if the timer interrupts are disabled, how will he keep accurate
> time?
> 
> <<<<<<<<<<<<<<<<<<<<<<<<<+>>>>>>>>>>>>>>>>>>>>>>>>>
>        See ya,
>        Mastermind
> 
>        http://www.bigfoot.com/~mastermind5
> 
> >
> >I have messed around with such an idea, and you can probably do it
> >with
> >minimal power.  Basically, when you press [2nd]+[ON] to turn off the
> >calc,
> >it does this:
> >
> >ld a, 1
> >out (3), a
> >ei
> >halt
> >ld a, 11
> >out (3), a
> >
> >What that does exactly, is turn off the LCD by writing a 1 to port 3.
> >Then
> >it enables interrupts and goes into "halt" mode.  When the Z80 is in
> >"halt"
> >it will not execute further until an interrupt happens.  As we all
> >know, the
> >only key on the keypad with an interrupt is the ON key.  Upon pressing
> >[ON],
> >a interrupt occurs, so the Z80 moves to the next instruction which is
> >to
> >turn back on the LCD (by writing an 11 to port 3)
> >
> >It seems weird, but when you turn your calc off, the calc isn't really
> >off.
> >The RAM is kept alive because of the batteries and the Z80 is still
> >alive,
> >but just in halt.  The only thing that really happened is the LCD is
> >off.
> >This shows how much the LCD sucks battery power because you can
> >probably
> >have your calculator off for a year and it would still work next time
> >you
> >turned it on.  This means that the Z80 and RAM use very very little
> >battery
> >power.
> >
> >I haven't messed with it too much, but I have tried to do other
> >things
> >besides a halt after turning off the LCD.  For instance, I wrote a 1
> >to port
> >3 and then started drawing on the screen, then i went into halt (so it
> >waits
> >for the [ON] key).  I followed up with a write of 11 to port 3 (to
> >turn the
> >screen back on) and then BUFCOPY.  So basically, the new rendering I
> >was
> >looking at was created when the calc was off.
> >
> >One thing I haven't figured out is how come no other interrupts can
> >trigger
> >the screen.  What about the 200 times a second timer interrupt?  That
> >doesn't skip over the halt, which means it probably isn't even
> >running.
> >I've tried using GETKEY, WAITKEY, READKEY all when the calc is off and
> >it
> >just turned it back on.  I think I remember even doing direct input
> >and it
> >still turned on the calc when I wrote to the keypad port (although
> >someone
> >may want to correct me on that).
> >
> >Anyways, a good way to implement a clock would be to shut off the LCD,
> >then
> >just sit in a loop counting.  When the user presses [ON], turn the LCD
> >back
> >on.  I don't know how to detect the ON key, but I know it can be
> >done.
> >
> >-Justin Karneges [Infiniti]
> >
> >>Also, how would you implement *time* on a calcuator? Surally
> >>it would need to know what day it was! An internal clock
> >>operating inside some low-power mode using the APD counter?
> >>
> >>Quized,
> >>
> >>Bill J Ellis
> >>
> >>----------------
> >>Bill James Ellis
> >>Heriot-Watt University
> >>
> >>B.J.Ellis@hw.ac.uk
> >>http://www.cee.hw.ac.uk/~ceebje/
> >>
> >
> >
> 
> ___________________________________________________________________
> You don't need to buy Internet access to use free Internet e-mail.
> Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
> or call Juno at (800) 654-JUNO [654-5866]

-- 
Scott Dial
revenant_1@hotmail.com
ICQ#3608935


References: