Hi It seems my feed is working again.
Here's a question: should variables de declared inside or outside the library? First example: > -- ------------------------ LIBRARIES ------------------------ > > var volatile byte seconds -- variables used in 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 > > var volatile byte bres_hi = hi > var volatile byte bres_mid = mid > var volatile byte bres_lo = lo > > include rtc_isr_tmr0 second example: > var byte minutes > var byte hours > > var byte date > var byte month > var word year > > include now -- sets the time to system time + > two minutes = compile and burn time > -- should be python-generated just > before compiling The first example is where the variables (bres_hi, const hi) should go inside the library: they are not used outside it. The ISR modifies seconds, but an external declaration makes clear is exists and is updated. Your thoughts? BTW: to fine tune the timekeeping, you can adjust const lo. Should this be done inside the lib? Second example: now.jal is nothing more then a way to transfer the system time to your PIC. It consists of: > -- > -- file: now.jal, Python generated > -- author: Eur van Andel, [EMAIL PROTECTED] > -- purpose: to set RTC in JAL, time is set to now + 1 minute > -- > > date = 29 > month = 10 > year = 2008 > hours = 14 > minutes = 33 > seconds = 18 But it could be written as: > var byte date = 29 > var byte month = 10 > var word year = 2008 > var byte hours = 14 > var byte minutes = 33 > seconds = 18 Your thoughts please. --- ir EE van Andel [EMAIL PROTECTED] http://www.fiwihex.nl Fiwihex B.V. Wierdensestraat 74, NL7604BK Almelo, Netherlands tel+31-546-491106 fax+31-546-491107 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
