Questions about the BASICtools and MakeItC
Post Reply
Posts: 394
Joined: Sat May 17, 2014 4:22 pm
Location: South Carolina


Post by olzeke51 »

I was updating my RTC_fake.bas file to use the printf/sprintf BASIC words instead of characters (for the 0).
.it got me to thinking....
?1) are the hooks for HOUR/DAY/MINUTE etc in all of the firmwares or just those with RTC-ability?
?2) is there some way, [perhaps via an ISR] to utilize those functions if available in the firmware?
. perhaps pointers to the Variables themselves?
again, Just kind of thinking out loud.
Thanks, Olzeke

Posts: 1034
Joined: Fri Oct 19, 2012 2:39 am
Location: Lake Tahoe, CA

Re: RTC_hooks

Post by basicchip »

Way back when the LPC21xx devices and many other RTCs, actually had hardware to count seconds to minutes to hours to days to months to years including leap years. That is actually a lot of hardware.

These days most RTCs, are just done by counting milliseconds or seconds and then letting the software figure out when it is. A much smaller solution as Flash space for code is smaller than hardware counters. This includes PCs which just count raw milliseconds based on a start time.

The trend is to go to just counting seconds in micro-CPUs, as that is less power, the counter increments just once a second rather than 1000 times a second, And battery life and low power are the desired traits these days.

Post Reply