Thanks for your replies Melanie, one question, do you know how long it takes (in milliseconds) for the DS1307 to be read into a picbasic variable?

Quote Originally Posted by Melanie View Post
Not correct. Some I2C devices require a PAUSE after a WRITE statement, but READs are performed usually at max speed. The DS1307 certainly does NOT require any pauses for READing.

There are many ways of accomplishing this without going into interrupts. Here's two...

Software route: At the end of every row scan simply bump a BYTE Counter. When the Counter rotates through Zero (just over three times a second if you are scanning rows every 1.2ms), then do your I2CREAD of the DS1307. You'll be updating your time about three times a second.

Hardware Assisted Route: The DS1307 has a pin which can give you a pulse every Second. Several pins on PortB have the facility to set a FLAG in a Register when the state of the pin changes. Simply check the Flag at the end of a scan and do a DS1307 READ when the Flag pops up.