Go Down

Topic: ds12887a (rtc) with arduino (Read 1 time) previous topic - next topic

rbz

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!

Merve

#1
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
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" :P

rbz

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

Merve

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

rbz

you sure?

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

AWOL

Quote
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.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Merve

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