electronics forum

Rules | Recent posts | topic RSS | Search | Register  | Log in

HOw to interface RTC DS12887 to AT89S51..??


Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> HOw to interface RTC DS12887 to AT89S51..??
Author Message
Elits



Joined: 27 Jul 2005
Posts: 82
Location: Indonesia


Post20 Nov 2005 0:59   

ds12887 rtc


I want to make simple Digital Clock using RTC and uC, but i don't know how to start?If there anyone know How to interface AT89S51 with RTC DS12887 please help me? If there a schematic and *.asm its better for me, because i'm newbie in uC....
Thanks

Elits
Back to top
IanP



Joined: 05 Oct 2004
Posts: 6492
Helped: 1542
Location: West Coast


Post20 Nov 2005 1:56   

ds12887 example code


Connection between this microcontroller and DS12887 is pretty straightforward:
AD0-AD7 --> P0.0-P0.7
R/W --> WR
DS --> RD
AS --> ALE
IRQ --> if required, to External Interrupt 0 or 1

CS --> 0V
MOT --> 0V
Reset --> 10kΩ (to +5V), 100nF (to 0V)

As far as code is concerned, try this link:
http://www.edaboard.com/viewtopic.php?p=515768&highlight=#515768
and download --> t.zip <--
In it you will find an example code on Time and Date generator based on 6818 (older version of DS12887) ..
This code doesn't use interrupts so leave IRQ pin not connected ..
If go through this code you will find a lot of MOVX instructions ..
It is how one reads or writes data from/to this RTC and its internal RAM ..

Regards,
IanP
Back to top
khongai



Joined: 20 May 2005
Posts: 245
Helped: 5


Post21 Nov 2005 2:46   

ds12887


try this:
http://www.maxim-ic.com/quick_view2.cfm/qv_pk/2680
Back to top
sharang



Joined: 02 Jun 2009
Posts: 18


Post10 Aug 2009 12:32   

code ds12887


Dear sir,
Need a code in c for interfacing 1288 with 8051.Looking for a simple code,easy to understand.Any changes inn the code given in mazdi book.Please help if possible.Thankyou
Back to top
ctownsend



Joined: 27 Nov 2004
Posts: 301
Helped: 21
Location: Canada


Post11 Aug 2009 13:04   

ds12887.zip


I did this a while back for an 89C2051. It will work for any 8051. Using a RS232 interface to test the DS12887, set time, display time, etc. No C code, only asm.

Good Luck

PS Remember "helped me" button!



Sorry, but you need login in to view this attachment

Back to top
exclusivearj



Joined: 15 Jun 2009
Posts: 1
Location: Mumbai


Post01 Sep 2009 6:42   

ds12887 asm


thanz a ton!!!!!
Back to top
Google
AdSense
Google Adsense




Post01 Sep 2009 6:42   

Ads




Back to top
sharang



Joined: 02 Jun 2009
Posts: 18


Post07 Sep 2009 6:26   

ds12887 connections with 8051


hey i ussed ur code all i get on the screen of hyperterminal is the menu but not able to input my choice.What can be done?
Back to top
ctownsend



Joined: 27 Nov 2004
Posts: 301
Helped: 21
Location: Canada


Post07 Sep 2009 11:40   

how to interface rtc


did you verify that your max232 connections are correct?
What about the terminal settings in hypertermnal?
Back to top
sharang



Joined: 02 Jun 2009
Posts: 18


Post21 Sep 2009 6:29   

interfaz para rtc ds12887


both are perfect.....even tried to change the rtc but same thing comes..
Back to top
ctownsend



Joined: 27 Nov 2004
Posts: 301
Helped: 21
Location: Canada


Post21 Sep 2009 22:34   

code c for ds12887


troubleshoot your rs232 circuit.

1. disconnect the rs232 circuit from the micro controller.
2. connect the OUT to the IN on the max232
3. in your terminal program type some text, it should be echoed back to the screen.

If this is ok, perhaps the connection from the max232 to the microcontroller is broken.

You can also try bypassing the max232 and just connect TX and RX on your serial port. Then try the terminal program again, You should see the text you are typing.

Good Luck
Back to top
Arabic versionBulgarian versionCatalan versionCzech versionDanish versionGerman versionGreek versionEnglish versionSpanish versionFinnish versionFrench versionHindi versionCroatian versionIndonesian versionItalian versionHebrew versionJapanese versionKorean versionLithuanian versionLatvian versionDutch versionNorwegian versionPolish versionPortuguese versionRomanian versionRussian versionSlovak versionSlovenian versionSerbian versionSwedish versionTagalog versionUkrainian versionVietnamese versionChinese version
Post new topic  Reply to topic    EDAboard.com Forum Index -> Microcontrollers -> HOw to interface RTC DS12887 to AT89S51..??
Page 1 of 1 All times are GMT + 1 Hour
Similar topics:
Wierd problem with DS12887 RTC (2)
Time loss in DS12887 RTC...any solutions?? (2)
rtc project using 89c52 and ds12887 (1)
How to Interface LCD module to the AT89s51 Microcontroller. (4)
how to interface rtc with 8051 (6)
interface ds12887 to microcontroller 89s52 (1)
How to interface the RTC HT1380 with µ Controller 89C51 (9)
Interface Between MMC and AT89s51 (2)
rtc interface (2)
ATMEGA128 interface with DS1307 RTC (2)


Abuse || Administrator || Moderators || Support us || sitemap
topic RSS