Yes, you can overclock i2c =D


New Member
Sorry for the little ascii emoticon in the title, but I coudln't help myself.

Two things first:

My O-scope is out of calibration, but for this instance it doens't matter as I dont technically need it for anything other than a relative reference.

I dont know if my picaxe is actually running at an accurate 16mhz (probably not) because my scope is out of cal.

Initial trials are proving successful for my little experiment. The subjects are 24FC512 EEPROM's and MCP23017 IO expanders. The memory can run at up to 1mhz, and the IO chip at up to 1.7mhz.

At 16mhz, using the keyword i2cfast8, the memory runs anywhere from ~1.5-1.8 times the speed (technically 800khz). The reason it's not exactly twice as fast could be from a number of factors beyond my control, but it seems that theoretically it's possible to double the speed with a good design.

As for the IO chips, using the keyword i2cfast at 16 mhz should give a theoretical 1.6mhz. Well..pardon my french, but holy hell. Compared to using proper keywords and an MCP23016, the speed is seemingly increased from ~3 to over (tha'ts right I said OVER) 4x. Again, dont take that as a truly accurate assessment because of what I said above, but I'm impressed, and it would seem our beloved picaxes jsut got a whole lot faster =D.

--Andy P


Technical Support
Staff member
Thanks for keeping us informed.

I had a look in the PICmicro datasheets to try and work out where the I2CSLAVE command could be poking its 'speed value' to set the bus speed ( SPADD it appears to be ) but the example values given don't seem to fit any obvious patterns versus speed, which could be why the speeds may not be entirely what would be expected. I found the 16F87xA datasheet to be a lot more detailed than the 16F88 on I2C operation.

One thought you caused me, was not so much clocking up, but clocking down. That might provide a mechanism for using PICmicro's, even PICAXE's, as bit-banged I2C slave devices. That could have some interesting possibilities.


Technical Support
Staff member
The values used by i2cslave are 'nearest integer' to theoretical calculations (e.g. if the mathematics required a value of 14.5 the value 14 would actually be used).

Therefore increasing the clock frequency will not exactly double the speed as some extra error will be introduced (e.g. two lots of the original 14.5 would be 29, but actually 28 would be used (2x14) )