ds12887a (rtc) with arduino

Hey.

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

http://www.datasheetcatalog.org/datasheet/maxim/DS12887A.pdf

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!

This data sheet offers a better explanation of protocol
www.gaw.ru/pdf/Dallas_Sem/12887.pdf

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" :stuck_out_tongue:

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 :smiley:

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 :wink: