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