Can any of you recommend a Real Time Clock that is easy to use with
the PIC16C57? I have considered the DS1603 (a 32 bit elapsed time
module -- with crystal and battery built in). I have also heard of
the TIC (Time In a Can) -- which is a self contained lithium battery
with a one line serial access to a RTC. Unfortunately I can't figure
out who makes the TIC, or where to get the DS1603 (or even how much
one would cost.)
So could anyone tell me:
1) A good RTC to use with the PIC (<4 I/O lines please).
2) Who makes / where to get the TIC.
3) Where to get the DS1603.
Philips/Signetics makes two I2C RTCs. The PCF8573 & the PCF8583
both 8 pin dips. The '83 also has 256 X 8 static ram on board.
Don't know where you can get these mail order, same problem for
the Dallas part, but check with the distributors in your area,
>Philips/Signetics makes two I2C RTCs. The PCF8573 & the
>PCF8583 both 8 pin dips. The '83 also has 256 X 8
>static ram on board. Don't know where you can get
>these mail order, same problem for the Dallas part,
>but check with the distributors in your area, which
I'll also recommend the Signetics parts. You'll have the
added overhead of the I2C code but that should not be too bad.
Plus if you use the 8583 you get those 240 bytes of ram to play
with. I have spare PCF8583 (surface mount) on the shelf if you
need samples and have problems with the distributors.
Dallas parts can be ordered direct from Dallas Semiconductor.
(214) 450-0448. Double check that part # though. In my slightly
out of date data book the part number for the "Time-in-a-can"
DS1495L-XX. Call and get a data book anyway, they have a large
selection of RTCs and other neat stuff.
I've had good success with an LP PIC and a 32khz Xtal as an RTC !
I feed the OscOut signal thru an op-amp buffer to the RTCC input with the
divider set to 128. ( I use an TL27L1 .. can just barely buffer 32Khz, but
draws only 10-15 ua while doing so. This MAY be overkill, but some LP Xtals
are sensitive to load, and run at multiples of their resonant if loaded too
I then poll the RTCC register, and when bit 7 is set, 128 x 256 32Khz clocks
DO NOT test bit7 of the RTCC. Move it into a temporary register, and test
that. That way, the lesser significant bits of the RTCC are unaffected.
( Testing the RTCC clears it as well. ) If you're a little late polling the
RTCC, little is lost, as the RTCC just wraps around and maintains those
bits for the next count. Yes an individual "seconds" rollover may occur a
little late, but the error is NOT cumulative, merely a small offset.
( Here follows a mix of Microchip and Parallax code )
mov OPTION,#100111b ; assign to pin
; trigger on 0->1
; assign prescaler to RTCC
; set prescalar to 1:128
The above option and example was used for a 2 PIC board, in which the 32Khz
PIC was not doing duty as the RTC. ( He was a UART ! ) If a single
"programmable RTC" is desired, then the opamp is not necessary, and the
option assignments change, but idea remains the same.
Alan Rothenbush | There must be an ideal world, a sort of
Academic Computing Services | mathematicians's paradise, where everything
Simon Fraser University | happens as it does in textbooks.
Burnaby, B.C., Canada | Bertrand Russell