Qacer, That is correct. And if you have a slower I2C device you can have the I2C bus operate at 100Khz by using the defive stastatement "DEFINE I2C_SLOW 1".
Dave Purola,
N8NTA
Qacer, That is correct. And if you have a slower I2C device you can have the I2C bus operate at 100Khz by using the defive stastatement "DEFINE I2C_SLOW 1".
Dave Purola,
N8NTA
Thanks, Dave! Have you had some experience dealing with I2C devices? I was curious because I wanted to ask for some design tips as far as interfacing the I2C device and the PIC physically.
Qacer,Yes I have had experence in interfacing different devices via I2C. I have used in the past 24LC64/24LC128/24LC256/24LC515/LM95071/LM95231 and various other I/O I2C interfaces. I have found that all you need to do is make sure the address pins of the devices are set correctly, use no more than 4.7k pullup resistors on the SCL/SDA lines and make sure that the VCC is clean going to the I2C device especially if is doing any analog conversion ie.temperature or voltage. Make sure the control variable "if used for passing address information" has the least significant bit unused, Also make sure the variable used for addressing ie.memory is of the correct size, meaning byte or word. Other than that I have had no problems in the last 6 years using I2C devices with PIC processors. Just connect em up and have a ball...
Dave Purola,
N8NTA
Thanks again, Dave!
What PICs have you used for 400kHz I2C devices?
Right now, I'm trying my hand at the PIC12F675. I'm looking through the manuals to determine whether I can set the PIC oscillator at 4MHz and still be able to communicate with 400KHz I2C devices.
Using PICs is starting to be fun, I'm just at the beginning stage so I haven't really had any applications built. I already have a couple in mind that I want to try, but I need to familiarize myself with the PIC family to figure out how to implement it.![]()
Qacer, I have used 16F84,16F88,16F876,16F877,18F252,18F452,18F1320,18 F2620 and 18F8722's
with out any problems running atleast 20 Mhz oscillator.
Dave Purola,
N8NTA
Bookmarks