PDA

View Full Version : How critical is type of oscillator for I2C?



andywpg
- 23rd February 2013, 22:13
I'm building a clock using Numitron tubes for the display.

The display hardware works fine - using PBP 3 and a 16F886

I don't however, seem to be able to read any of the registers of the DS1307-based RTC clock module I'm using. I'm using the bit-bang I2CREAD and I2CWRITE commands, I don't have a scope, but my logic probe shows pulses on both SDA and SCL

My thought was, "since the master clocks the communications, using the internal oscillator should be fine. It shouldn't matter is its off by a couple percent".

Was I wrong? Should I be using a crystal?

I'm just trying to get it running, and this thought occurred to me.

Thanks for any help

prstein
- 24th February 2013, 00:18
Hiya,

Within reason, I2C should be indifferent to the clock speed. What matters is the state of the SDA when the the SCL transitions. As far as I know the only speed related issue is exceeding the maximum frequency for the I2C device, highly unlikely with the PBP functions.

Best Regards,
Paul

rsocor01
- 24th February 2013, 01:38
Hi,

No you shouldn't have any problems using the internal oscillator. It is not as precise as a crystal oscillator, but it is pretty accurate.

Robert