Author Topic: I2C Bus Interface Speed  (Read 13971 times)

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
I2C Bus Interface Speed
« on: April 11, 2013, 02:04:02 PM »
Hi,

I'm thinking about using the I2C interface to communicate to a ITG-3200 Gyro IC for a small project.

Now this may seam like a silly question but I have zero experience with I2C devices.......

The Fram I2C documentation says the master operates at 100KHz....  the IC documentation says the IC operates at" bust mode" 400kHz.

Working with what I know about serial communications, Baud rates etc, I'm amusing they will not communicate due to the different communication bus frequencies and the slave device doesn't auto detect bus timing as such.....

Any advice???

Cheers

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:I2C Bus Interface Speed
« Reply #1 on: April 11, 2013, 05:18:10 PM »
The default I2C communication that the PLC use is 100KHz. That is the safest speed and can work with I2C signal over longer distance than higher frequency. It is possible to change the frequency to 400KHz if you find that the system can take the higher speed and you REALLY need that higher speed.

I2C is a completely different communication interface and protocol from that of a serial UART based communication and there is literally zero similarity between the two except that they both communicate one bit at a time....
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

garysdickinson

  • Hero Member
  • Posts: 502
  • Old PLC Coder
    • View Profile
Re:I2C Bus Interface Speed
« Reply #2 on: April 11, 2013, 05:49:58 PM »
I2C is a synchronous serial protocol.  The Master (the PLC) device drives the Clock signal.  There is a single bidirectional data line.  

Most devices have a maximum clock rate, but the  minimum clock rate is usually DC.  If your external device can work at 400 KHz clock rate, then it will be fine at 100 KHz.

I2C dates back to late 1970s and my first I2C project used an 8051 microprocessor that had NO hardware support for I2C!  I just flipped i/o bits in firmware.

I did have a hallucination about using the PLC INPUT and OUTPUT pins to implement an I2C interface directly (it would be very slow).  I did some research on how to handle shifting the 24VDC PLC levels to 3.3V for the I2C device.  I found that there is a very simple circuit that uses a MOSFET transistor and 2 resistors.  This circuit is described in detail in an APP note from Philips Semiconductors.  I have seen it used with a lot of I2C devices that run on a different voltage the the microprocessor (5V <--> 3.3).

Good Luck,

Gary D

BC SYSTEMS

  • Full Member
  • Posts: 146
    • View Profile
Re:I2C Bus Interface Speed
« Reply #3 on: April 12, 2013, 02:51:53 AM »
Thanks Gents.

At least I now know a little more! :-)