Am i right in saying the bx-24 rtc has to be reset each time it is
powered on an if so what would be an option for keeping the clock
powered. A small battery perhaps?
The BasicX OS RTC is a software device that resets to Midnight,
1999-01-01, I believe, at each processor reset event. If you need to
keep useful time of day, you'll need an external clock.
Search the message archive here for "RTC" or "DS1302". There is lots to
read on this subject. Tom
> What would be the best way to keep the real time clock synchronized?
If you have the BX-24 always connected to another system's clock that
regularly verifies the time and corrects it, that would be ideal. I
have my PC connected to the Atomic Clock via the Internet and it
regularly adjusts the computer. So I don't have to worry about the
wrong time [or date]. If I had it always wired to the BX-24, it could
up-date once a day or more often as require.
Obviously, you may not want to have all that equipment working together
just to keep the clock going. See below.
> Am i right in saying the bx-24 rtc has to be reset each time it is
> powered on an if so what would be an option for keeping the clock
> powered. A small battery perhaps?
An outboard clock could also intialize the clock on start up. But why
have two clocks when technology for one good outboard clock exists?
Another alternative is to provide a digital clock chip with battery
that is separate from the BX-24. I believe they have I2C interface. The
data can be shared, it is quite small, and can run for months or years
even when the BX-24 is sleeping or completely off. This is not a bad
idea as  the BX-24's clock program is interfered with by several of
the functions inside the BX-24, so you may find limitations in your
programing calls that you don't want, and  the outboard clock chips
run on extremely little power and can even have two power sources -
your +5 when on and a rechargible clock battery [at a lower voltage, I
In sum, accessortize.
I understand that many of us thought that the RTC would be a great
feature [and sometimes it is], but it does tend to hog the use of the
timer and if you interupt it, the time becomes inaccurate. It also
requires more power. So two independent devices serving different
purposes often become the best solution if you want something that will
be most accurate, recharge a clock battery, and run on very little power
No, the BX-24 RTC is a software count of a 512Hz interrupt tick. It
consumes no more power than the BX-24 does counting anything else. Tom
then periodically updading bx. Simpler maybe, cheaper definiitely.
time "synchronized". Yes, something like the DS1307 is a good
answer. But if you need it synchronized with actual correct _real_
time, then you will need to have the BX (with its external RTC)
periodically interract with the real world. Probably it is
sufficient to have a method to set the real time manually. More
complex ways exist (atomic time to PC to BX, GPS to BX, etc).
Then you have the issue of maintaining _correct_ real time between
manual settings. The usual 32767hz tuning forks are not all that
accurate. 20 or 30 parts per million (i.e. 20-30 minutes per
year)! Dallas makes a precision 32767 oscillator which is good for
2 minutes a year. This will drive any of their RTC chips (which are
really just counters). This is available in a DIP package. I am
using one right now and it is great. It seems to lose about half a
second in about a week compared to GPS time.
Dallas makes a combined precision oscillator and RTC the DS3231
which is in a single package (SMT only?) and it is good for about 1
minute per year at consumer temperatures.
These precision clocks will need only occasional manual resetting to
keep good accurate time.
> > the [BX-24] RTC  also requires more power.
> No, the BX-24 RTC is a software count of a 512Hz interrupt tick. It
> consumes no more power than the BX-24 does counting anything else.
I meant that the clock chip,[a DS1308 or similar] which consumes about
2ma/hour of power is likely to consume much less power than the BX-24
maintaining a perpetual on status.
I assume that the BX-24 is using at least 10ma, maybe more, because of
its size, running at a higher voltage, and running at a higher
The clock chip is specifically designed to run on minimal power and can
even wake the Bx-24 periodically.
> I meant that the clock chip,[a DS1308 or similar] which consumes
> about 2ma/hour of power
Actually, when on the backup power, it uses microamps. How many
depends on the silicon technology of the chip itself. Put in other
terms, a 12mm diameter coin cell will give about 7 years of power.
Remember, not all the RTC packages offer battery backup, nor do they
all have alarm interrupts. The DS3231 has all the above with the
precision oscillator combined in the one package.