SMBus, SBS, I2CWrite, I2CRead


Closed Thread
Results 1 to 22 of 22

Hybrid View

  1. #1
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: SMBus, SBS, I2CWrite, I2CRead

    After you write to the SSPBUF if you wait for SSPIF instead of BF then ACKSTAT will be valid.

  2. #2
    Join Date
    Nov 2003
    Posts
    98


    Did you find this post helpful? Yes | No

    Default Re: SMBus, SBS, I2CWrite, I2CRead

    great stuff H & T thanks for the info
    i need to learn more about handling the MSSP hardware directly as you are showing

  3. #3
    Join Date
    Jun 2015
    Posts
    10


    Did you find this post helpful? Yes | No

    Default Re: SMBus, SBS, I2CWrite, I2CRead

    T- I tried waiting for the SSP1IF interrupt, but it never happened! The pic spec indicates that you clear it after the start condition is complete (SEN = 1) and you have written to SSP1BUF (PIC18F87K90 Family figure 21-23), but maybe I have to clear it before writing to the buffer.

    D - I prefer to talk directly to the MSSP module because I2CWRITE wouldn't let me send just an address and look for a NACK.

  4. #4
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: SMBus, SBS, I2CWrite, I2CRead

    I tried waiting for the SSP1IF interrupt, but it never happened!
    Hmm. After you initiate the START (SEN=1) and then wait for SEN to go low (SEN=0) you should be able to clear SSPIF before you write to the SSPBUF.

    If you look at that figure once you write to the SSPBUF you'll see BF being asserted on the 8th clock, but SSPIF isn't asserted until the 9th after the ACK.

Similar Threads

  1. i2cRead i2cwrite very frustrating
    By bradb in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 7th September 2011, 20:48
  2. I2cwrite - I2cread
    By savnik in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 5th July 2006, 01:12
  3. I2Cwrite and I2CRead speed!
    By Najim in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 2nd November 2005, 10:54
  4. I2Cwrite and I2CRead speed!
    By Najim in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 2nd November 2005, 10:50
  5. I2CWRITE and I2CREAD
    By Tomas in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd April 2004, 02:30

Members who have read this thread : 0

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