Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

What is the difference of an I^2C communication bus compared to just a...

Status
Not open for further replies.

Steve311

Member
What is the difference of an I^2C communication bus compared to just a PIC talking to a slave device using something similiar to the standard 8N1 protocol? Is there any significance programming wise?

Or is that just how some devices work?

Thanks all!
 
The main advantage is that you can have multiple devices on an I²C bus. For example, you could have some memory, an RTC, a temperature sensor and a pressure sensor all on the same two wires. Each device has an address and the master (Pic) is in control of selecting the device and communicating with it.

Mike.
 
Thanks Mike. That's useful clarification for me. The slave device I am using mentions a transfer is present when the CLK line is held high...I always thought the CLK was induced by a crystal or thereof? "Held High" is unlikely to be just setting the CLK pin held to Vdc correct?
 
The lines, clock and data, are held high by pullup resistors and are pulled low as required. The clock line is controlled exclusively by the master (pic) and the data line is controlled by the sending device which can be the master or the slave. Your device data sheet should have timing diagrams in it.

Edit, the clock line can also be held low by a slave to allow slower devices to be used.

Mike.
 
Last edited:
Clock is not the 20mhz for the micro.
Clock is to indicate data is ready to be read. (100khz) (could be any frequency)
 
Status
Not open for further replies.
Back
Top