Go Down

Topic: ds12887a (rtc) with arduino (Read 3048 times) previous topic - next topic



I found an _old_ ds12887a real time clock chip lying around. i had a look at the datasheet:


but i can't figure out how i wire it up to an arduino. i think i'd be alright with the software.

Any help is appriciated!


Oct 15, 2009, 12:33 pm Last Edit: Oct 15, 2009, 12:42 pm by Merve Reason: 1
This data sheet offers a better explanation of protocol

Looks like the AD0-AD7 lines all need to be connected, and provide the data transfer, while AS, R/W and DS are to do with what data should be transferred. Also pull MOT low.

Then it basically functions as extended ram. You set the AD0-AD7 bits, toggle AS to set that as the address. From there you can either set all the pins to input on the arduino and toggle R/W to read the output, or set the pins to a certain byte of data and toggle the DS pin to write the data into the ic.

The address map is in the data sheet, so you'd clock in the initial time into the first 9 bytes of ram, then just let the chip update them every second. To get the time then just read those addresses.

The rest of the chips memory can be used as storage.

This all goes with a big "I think" :P


It's a bigger "i think" than i had!

I'll give it a go i just need a crystal.

will report back!

Thanks alot :D


From the datasheet:

Self-contained subsystem includes lithium,
quartz, and support circuitry

I don't think you need a crystal, or an external battery to save the clock registers


you sure?

i mean it would make sense. i'll hook it up straight away then!


an _old_ ds12887a

Be careful that that lithium cell hasn't run out of spare electrons - unlike the old "top-hat" RTCs, I don't think the cell is replaceable.


Pretty sure, there is an oscillator in the block diagram on the datasheet and there are no xtal pins.

I agree with AWOL, don't trust the lithium ;)

Go Up