PDA

View Full Version : i2c min clk frequency



mctrivia
12-31-2009, 03:23 AM
I am looking to use the SCL line to charge a cap to monitor the prop. My question is when the I2C interface is being used what is the shortest time the line will be high and the longest time it will be low. When the i2c is not being used scl can be set high.

I need to know so i can compute best values for R9 and C12. I want the voltage to drop below 2V as quick as possible but want it not to drop below 2V as long as the i2c interface may be in use. Initially the cap is charged to 6-12V to start.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder. (http://forums.parallax.com/showthread.php?p=848975)

Tubular
12-31-2009, 03:40 AM
During boot SCL toggles along at 300kHz, so I'm guessing the shortest time is 1/300000 or 1/400000 to maintain compatability with medium speed i2c objects. Not sure about the longest low time though.

edit: Just realised your initial 6-12v charge is possibly to get past the initial bootup period

Post Edited (Tubular) : 12/30/2009 7:47:07 PM GMT

Mike Green
12-31-2009, 03:41 AM
It all depends on what I/O driver is being used. You could look at Chip's EEPROM read/write routines for the timings for booting from EEPROM and for copying RAM to EEPROM when downloading a program. The other routines that are used commonly are the Basic I2C Driver and the assembly driver in FemtoBasic. I've never calculated the clock on/off times for the Basic I2C Driver, partly because the Spin execution time is not documented. Best thing there is to measure it. For the assembly driver, I tried to stick as close as possible to the typical EEPROM timings. The values used are given in an initialization routine "ComputeTimings" in the sdspiFemto.spin object. I don't have a copy handy.

mctrivia
12-31-2009, 06:48 AM
i decided better to play safe.

10uF and 50k will give me 0.2s from the last pulse on SCL. very short to human perception but an eternity to the prop.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
24 bit LCD Breakout Board now in. $21.99 has backlight driver and touch sensitive decoder. (http://forums.parallax.com/showthread.php?p=848975)