DS1307 and a LED array, need ideas


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    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.

  2. #2
    Join Date
    Feb 2005
    Posts
    130


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by peu View Post
    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?
    how impolite on my part, I wanted to say thanks to ALL who replied

  3. #3
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Ohhh... that's not an easy question to answer without actually timing it on a scope... it will depend on the number of bytes you're reading at a time, etc etc.

    But as a guesstimate, reading back say 8 bytes in one block (sequentially grab Registers 00-07), you might need as many as 150 bits at 100kHz... so I guess it could be as short as 1.5mS, and under 1mS if you're just grabbing the first three Resisters for the TIME only.

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts