Author: eur.van.andel
Date: Fri Oct 31 06:10:53 2008
New Revision: 507

Modified:
    trunk/unvalidated/include/jal/rtc_isr_tmr0.jal

Log:
moved variables back to isr lib to simplify sample prog


Modified: trunk/unvalidated/include/jal/rtc_isr_tmr0.jal
==============================================================================
--- trunk/unvalidated/include/jal/rtc_isr_tmr0.jal      (original)
+++ trunk/unvalidated/include/jal/rtc_isr_tmr0.jal      Fri Oct 31 06:10:53 2008
@@ -26,6 +26,22 @@
  -- the ISR subtracts 1 from the mid byte. It first checks
  -- the mid byte for zero and borrows a bit from bres_hi if needed

+
+var volatile byte seconds                 -- updated by ISR
+
+-- RTC ISR constants:
+--                      0x4C 0x4B 0x40  5 000 000  20 MZz xtal
+--                      0x0F 0x42 0x40  1 000 000   4 MHz int osc
+--                      0x12 0x13 0xD0  1 250 000   20 MHz, prescaler = 4
+
+const hi  = 0x4C  -- 2 000 000 for 20 MHz xtal and prescaler = 4
+const mid = 0x4B
+const lo  = 0x40  -- ideally modified in timeset too, to adjust clock
+
+var volatile byte bres_hi  = hi
+var volatile byte bres_mid = mid
+var volatile byte bres_lo  = lo
+
  procedure RTC() is
  pragma interrupt
  assembler         -- ISR should be as small as possible, so assembler

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to