CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

DS1307 RTC to 4x20display interface

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
balaji



Joined: 30 Mar 2010
Posts: 21

View user's profile Send private message Send e-mail

DS1307 RTC to 4x20display interface
PostPosted: Mon Jun 18, 2012 3:52 am     Reply with quote

Hi all,

I am using DS1307 RTC (i2c) and 4x20 display. both are working fine individually. How to display the RTC time in lcd with refresh rate of 1 second.

Thanks
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Jun 18, 2012 5:07 am     Reply with quote

There are several ways to do this.
One is to program the DS1307 to send an interrupt every second to the PIC. The PIC then reads the DS1307 data (time information) and then displays it on the LCD, in whatever format you choose.
This would give the best overall performance as it allows the PIC to do 'other things'...

A second way is to just have a simple 'main' program with a delay_ms(1000) in it. Simply read the DS1307, display the data, delay_ms(1000).
This would also work but the PIC can ONLY do this as it's 'busy' during the 1000 ms to create the delay.

I use #1 all the time, no pun intended.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group