Shop OBEX P1 Docs P2 Docs Learn Events
i2c min clk frequency — Parallax Forums

i2c min clk frequency

mctriviamctrivia Posts: 3,772
edited 2009-12-30 22:48 in Propeller 1
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.
135 x 246 - 3K

Comments

  • TubularTubular Posts: 4,717
    edited 2009-12-30 19:40
    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 GreenMike Green Posts: 23,101
    edited 2009-12-30 19:41
    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.
  • mctriviamctrivia Posts: 3,772
    edited 2009-12-30 22:48
    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.
Sign In or Register to comment.