Pages: [1]   Go Down
Author Topic: ds12887a (rtc) with arduino  (Read 1264 times)
0 Members and 1 Guest are viewing this topic.
Wigan
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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" smiley-razz
« Last Edit: October 15, 2009, 05:42:08 am by Merve » Logged

Wigan
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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-grin
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Wigan
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you sure?

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

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 302
Posts: 26248
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

"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.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley-wink
Logged

Pages: [1]   Go Up
Jump to: