Re: A86: Questions on Port 3, calc on, off, APD, etc


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

Re: A86: Questions on Port 3, calc on, off, APD, etc




At 11:17 PM 5/28/98 -0400, you wrote:
>
>>> 3.) When the calculator is off, does the interrupts run in the background
>or
>>> does it disable timer interrupts and wait for an ON interrupt. Does
>anyone
>>> have any details on this?
>
>
>It does this both in the startup reset (before calc is on), and in the
>shut_off routine
>
>; $00 $01 -> Port 4
>0e56  97        sub     a  ;out (3),0
>0e57  d303      out     ($03),a
>0e59  3e01      ld      a,$01  ;out (3),1
>0e5b  d303      out     ($03),a
>0e5d  fb        ei   ;enable interrupts
>0e5e  76        halt   ;wait for interrupt -
>
>As you see, it has no DI. The $00 $01 appears to disable everything but the
>ON key interrupt. It is perfectly possible to override the default interrupt
>handler with IM 2 and create your own shut down routines from which
>interrupts would run in the background. Basically means only the LCD would
>shut off. Would this consume too much more power? Maybe.
>
I belive that a processor uses the same amount of power at all times when
it is on.  By leaving an interrupt running in the background, you consume
as much power when "off" than while "on", except while "off" the display is
not consuming an power, since it is off.  Does the display consume more
power than the cpu?

>
>>It disables the maskable (timer) interrupts, turns off the LCD, and halts.
>>The only way to get out of the halt is through a non-maskable interrupt
>>(the ON interrupt).
>>
>>> 4.) The calculator appears to turn on immediately when you put batteries
>in
>>> it, executes a HALT and waits for the ON key before it initializes. Is
>this
>>> correct?
>>
>>I believe it is, though I am not sure on that.
>>
>>> 5.) Does the calculator do different things if it is shut off depending
>on
>>> whether it what caused by the APD shut it off or [2nd][ON]. It appears to
>>> have a difference
>>
>>APD just turns off the screen, DI's and HALT's.  When you turn back
>>on the calc, it's state will be identical to the way you left it.  [2nd]
>[ON]
>>exits to the homescreen and restores the stack as well.  You exit what
>>you were doing.
>
>No no the calc_off doesnt use a DI, in fact it uses an EI. The calc doesn't
>have any Non-Maskable Interrupts. You can, I believe, disable (mask?) either
>the timer interrupts or the ON key interrupt. I shall do experiments to
>figure out this.
>
If you disable interrupts before turning it off, you'd lock it since it
can't turn it back on with on, since the [on] interrupt would be disabled,
along with the timer interrupt.  I think you'd have to pull all five
batteries.  I'll test after I finish my AP Stat final tommorow...


// David Phillips
// mailto:electrum@tfs.net
// AIM: electrum32


Follow-Ups: References: