| Author |
Message |
Elits
Joined: 27 Jul 2005 Posts: 82 Location: Indonesia
|
20 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
|
20 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
|
21 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
|
10 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
|
11 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!
|
|
| Back to top |
|
 |
exclusivearj
Joined: 15 Jun 2009 Posts: 1 Location: Mumbai
|
01 Sep 2009 6:42 ds12887 asm |
|
|
|
|
| thanz a ton!!!!!
|
|
| Back to top |
|
 |
Google AdSense

|
01 Sep 2009 6:42 Ads |
|
|
|
|
|
|
| Back to top |
|
 |
sharang
Joined: 02 Jun 2009 Posts: 18
|
07 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
|
07 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
|
21 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
|
21 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 |
|
 |