overclocking and 1meg i2c

andrewpro

New Member
I have a few 24fc512 i2c eeproms from microchip that are capable of 1mhz communication speed. I was thinkin that if I was running at 8 mhz instead of 4, and dind't use the appropriate i2cslave speed keyword, would it in essence overclock the i2c comms as well?

I.E. using just i2cfast instead of i2cfast8 (or whatever the exact keyword is), will it run at 800khz instead of 400 at 8mhz chip clock?

I hope I'm making sense. I'd like to use the increased speed for an aspect of my project but if it wont work I'll toss the idea out the window and just use the 24AA's or 24LC's instead and save the FC's for another day.

--Andy P
 

hippy

Technical Support
Staff member
I would guess it would work, and your theory seems sound to me; if you look at the constant values assigned to the I2C speed keywords they are as follows ( E&OE - These were scribbled in my notepad ) ...

I2CFAST = 2
I2CFAST8 = 4
I2CFAST16 = 10

I2CSLOW = 9
I2CSLOW8 = 19
I2CSLOW16 = 39

I'm guessing they are 'division values' used to slow the I2C peripheral down as the speed increases, so divide by 2 (I2CFAST) at 4MHz is the same result as divide by 4 (I2CFAST8) at 8MHz. Not sure why the numbers don't double, but I assume they work ! So you could probably put any number in the I2CSLAVE command to select any custom I2C speed. Use "1" and I'll wager you'll get double speed even at 4MHz.

The values may be different on each PICAXE, but I'd suspect not. The values can be found by using "SERTXD(#I2CFAST)" etc.

Edited by - hippy on 8/28/2005 9:14:00 AM
 
Top