Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Digital Clock using micro controller & RTC IC

Status
Not open for further replies.

HiteshDR

New Member
Hello All,

i want to make Digital clock using 89S51/52.
i have selected components RTC IC-DS1307, 16x2 LCD, 4X4 Matrix Keyboard and micro-controller.
i am not getting any clue how to do coding for RTC and how to integrate RTC with this all above components of this circuit.

hope so i will get some positive clue.

thanking you in advance...!!
 
Hi Hitesh...

Hi...

Till i am sure... DS1307 requires I2C protocol...

Hence try to learn a bit about that...

Please confirm first- am i right...

Regards,

Simran..:)
 
Thanks..

simrantogether said:
Hi...

Till i am sure... DS1307 requires I2C protocol...

Hence try to learn a bit about that...

Please confirm first- am i right...

Regards,

Simran..:)

thanks for replying..

yes, there are only two lines like EEPROM-24CXX..
one is SCL-Serial Clock and SDA-Serial Data.
so, is it necessary to use I2C protocol..?
and one more thing simranji, i am confused about how to integrate all this interfacing code in a single one...???
 
Well...

HiteshDR said:
thanks for replying..

yes, there are only two lines like EEPROM-24CXX..
one is SCL-Serial Clock and SDA-Serial Data.
so, is it necessary to use I2C protocol..?
and one more thing simranji, i am confused about how to integrate all this interfacing code in a single one...???

Yes, if there are two lines namely SCL and SDA then it means it is meant for I2C communication only...

Simple...

it is easy to interface and there are number of examples available on internet... Though i've also never tried it ...

Regards,

Simran..:)
 
simrantogether said:
Yes, if there are two lines namely SCL and SDA then it means it is meant for I2C communication only...

Simple...

it is easy to interface and there are number of examples available on internet... Though i've also never tried it ...

Regards,

Simran..:)

thanks Simranji...

i am confused how to embedded the code in my code..??
can you help me..??
 
Well...

HiteshDR said:
thanks Simranji...

i am confused how to embedded the code in my code..??
can you help me..??

Well...

I've never tried it earlier... but it is good to refer wikipedia for it i feel...

Regads,

Simran..:)
 
HiteshDR said:
Thank you Very much MVS SARMAji...
i have already reffered it but i am confused about that how can i embed the code of RTC with my LCD interfacing code in the application.

thanking you all agian..

Your application will have to have 2 main subroutines, one to read the time from the RTC and one to display the data to your LCD. You will also need some subroutine to set the time/date initially.
 
When I suggested using the search facility earlier, I wasn't trying to be nasty. If you search this site for DS1307 there is about 40 threads with information.

Mike.
 
hello all...

i am able to get time and display it on LCd...

but now new problem occurse...
i am not able to store the alarm time...


i would be thankful if any one can reply and help....!!!
 
HiteshDR said:
i am able to get time and display it on LCd...

but now new problem occurse...
i am not able to store the alarm time...


i would be thankful if any one can reply and help....!!!

Almost all PIC's have a small area of data EEPROM for non-volatile storage, if your old processor doesn't you may have to add an external EEPROM?.

However, most clock IC's also have EEPROM storage space, doesn't the one you're using? - in fact many clock IC's have internal alarm facilities as well!.
 
HiteshDR said:
i am able to get time and display it on LCd...

but now new problem occurse...
i am not able to store the alarm time...


i would be thankful if any one can reply and help....!!!


What about the NVRAM 56 bytes in the DS1307..?? at address 08 thru 3F
 
Last edited:
Nigel Goodwin said:
Almost all PIC's have a small area of data EEPROM for non-volatile storage, if your old processor doesn't you may have to add an external EEPROM?.

However, most clock IC's also have EEPROM storage space, doesn't the one you're using? - in fact many clock IC's have internal alarm facilities as well!.

sir, for your kind information, i am using 89s52...
 
HiteshDR said:
sir, for your kind information, i am using 89s52...

Check the datasheet, only India seems to use those old chips - but like I said, and Eric confirmed, your clock chip includes EEPROM as most do - store the values in there.
 
Nigel Goodwin said:
Check the datasheet, only India seems to use those old chips - but like I said, and Eric confirmed, your clock chip includes EEPROM as most do - store the values in there.

thank you sir....

i am not using this EEPROM..
but i have to read it and try to use it....

Thanks Again....
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top