temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Mon Jun 18, 2012 5:07 am |
|
|
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. |
|