home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / hp48 / 5820 < prev    next >
Encoding:
Text File  |  1992-11-18  |  2.3 KB  |  59 lines

  1. Newsgroups: comp.sys.hp48
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!haven.umd.edu!decuac!pa.dec.com!engage.pko.dec.com!pinbot.enet.dec.com!ervin
  3. From: ervin@pinbot.enet.dec.com (Joseph James Ervin)
  4. Subject: Re: Coma mode
  5. Message-ID: <1992Nov18.173606.6467@engage.pko.dec.com>
  6. Sender: newsdaemon@engage.pko.dec.com (USENET News Daemon)
  7. Reply-To: ervin@pinbot.enet.dec.com (Joseph James Ervin)
  8. Organization: Digital Equipment Corporation
  9. References:  <9211181142.AA01229@turing.u-strasbg.fr>
  10. Date: Wed, 18 Nov 1992 17:36:06 GMT
  11. Lines: 46
  12.  
  13.  
  14. In article <9211181142.AA01229@turing.u-strasbg.fr>, fatri@turing.u-strasbg.FR (fatri -- licence info. --) writes:
  15.  
  16. |>
  17. |>
  18. |>In a recent message Joe said that when the hp48 isn't in coma mode
  19. |>it wakes up every three days to do some things.
  20. |>Can someone give me some information about that ?
  21. |>
  22. |>-Why ?
  23. |>-How to notice it ?
  24. |>
  25. |>thanks 
  26. |>
  27. |>-Fatri-
  28. |>
  29.  
  30.  
  31. Fatri, 
  32.  
  33. The hardware timer in the HP48 is only 32-bits, and this contains a signed
  34. two's complement number.  Hence ticking backward at 8192 ticks per second, 
  35. the largest positive integer you can load into the hardware timer corresponds
  36. to about 3 days worth of ticks.  
  37.  
  38. Every time you press a key, the interrupt handler resets the contents of this
  39. hardware timer to some large positive value, corresponding to the amount of 
  40. time that should pass before the next timer interrupt.  You see, when the timer
  41. hits zero, an interrupt is generated.  This will wake the calculator from
  42. deep sleep.
  43.  
  44. So, when you shut the calculator off, the code that implements the "OFF"
  45. function writes the hardware timer with it's largest value, corresponding
  46. to 3 days from "now" (unless a user alarm is programmed for a time sooner than
  47. 3 days away, in which case the hardware timer is programmed to hit zero at the
  48. alarm time).
  49.  
  50. So, when the hardware time hits zero, an interrupt is generated which wakes the
  51. calculator from its deep sleep.  The HP48 then reprograms the hardware
  52. time, checks the battery level and several other housekeeping chores, then
  53. goes back to sleep.  The whole operation probably only takes a few milliseconds.
  54.  
  55. When in coma mode, the hardware timer does not run, so the calculator has
  56. no concept of time.  Hence, it never wakes up due to timer interrupts.
  57.  
  58. >>>Joe
  59.