Newbie with an I2C question


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159

    Default Newbie with an I2C question

    I'm new to PBP (but not to PIC MCU's or BASIC) - so be gentle.

    I have searched the FAQ but have not seen the answers to two questions.

    1) When doing an I2C write to a slave device, there is an ACK sent by the device after every byte, does PBP automatically process this and go to the FAIL label if its not received?

    2) I am using a Dallas DS1307 real time clock for a Numitron clock that I am building. The datasheet for the DS1307 indicates that when the chip is transmitting the data (7 bytes) for the date and time that "The DS1307 must receive a 'not acknowledge' to end a read".
    Does PBP know to do this (as well as sending the STOP) as I assume it knows to send an ACK after each byte sent by the slave?

    Thanks for any help, as I said, I searched the archive and couldn't find this.

    Andy

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Newbie with an I2C question

    Yes, the PBP I2C command takes care of everything for you.
    This might help.
    http://www.picbasic.co.uk/forum/cont...-EEPROM-Part-1
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Jan 2012
    Location
    Grid EN19MV
    Posts
    159


    Did you find this post helpful? Yes | No

    Default Re: Newbie with an I2C question

    Quote Originally Posted by mackrackit View Post
    Yes, the PBP I2C command takes care of everything for you.
    This might help.
    http://www.picbasic.co.uk/forum/cont...-EEPROM-Part-1
    Thank you! VERY helpful.

Members who have read this thread : 1

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

Posting Permissions

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