I2C speed


Closed Thread
Results 1 to 2 of 2

Thread: I2C speed

  1. #1
    Join Date
    Nov 2005
    Location
    Zamora, Spain
    Posts
    11

    Default I2C speed

    Is there any way to set the I2C bus speed to 400KHz?
    I am using a 18F252 with a 20MHz clock. The I2C device is a ADS7828 a to d conversor able to run at 100Khz, 400Khz and several Mhz in HS mode.

    It makes no difference to define I2C_SLOW 1 or not, the timming is always the same (about 10µS per bit).
    The manual states that slow devices (100Khz) can be used with XTALs higher than 4Mhz defining I2C_SLOW 1 ans so it is, but, can a fast device be used at 400Khz with I2CWRITE/I2CREAD? Must I implement my own fast routines with shiftin/shiftout?

    thanks

  2. #2
    Qacer's Avatar
    Qacer Guest

    Talking

    Quote Originally Posted by MaxG
    Is there any way to set the I2C bus speed to 400KHz?
    I am using a 18F252 with a 20MHz clock. The I2C device is a ADS7828 a to d conversor able to run at 100Khz, 400Khz and several Mhz in HS mode.

    It makes no difference to define I2C_SLOW 1 or not, the timming is always the same (about 10µS per bit).
    The manual states that slow devices (100Khz) can be used with XTALs higher than 4Mhz defining I2C_SLOW 1 ans so it is, but, can a fast device be used at 400Khz with I2CWRITE/I2CREAD? Must I implement my own fast routines with shiftin/shiftout?

    thanks
    Hi MaxG,

    Try looking through Microchip's Getting Started: I2C Master Mode document. There is one page that shows the following suggested I2C pull-up resistor setting:

    4.7k (less than 100kbps), 2.2k (100 kbps), and 1k (400 kbps)

    I don't know how true they are. I am still starting with I2C. Hopefully, some of the more experience users can comment on this.

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  4. Replies: 14
    Last Post: - 26th September 2007, 05:41
  5. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 13:55

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