Menu

I2C frequency

2022-02-20
2022-02-22
  • Bertrand BAROTH

    Bertrand BAROTH - 2022-02-20

    I hope that I will get my touch control display in less than 2 weeks. It is controlled via I2C and I saw in the datasheet that the maximum frequency for the clock is 100 kHz. So, what is the default frequency of the clock used by the I2C GCBasic routines and, if necessary, what must I do to "slow down" this clock ?

     
    • Anobium

      Anobium - 2022-02-20

      Depends on the chip, hardware or software I2C and pullups.

      More info needed

       
  • Bertrand BAROTH

    Bertrand BAROTH - 2022-02-20

    Software I2C on ATMega8515 with 6 MHz clock.

     
    • Anobium

      Anobium - 2022-02-20

      As you are using software it wont be that fast. You need not worry but you have control over the timing. Got anyway of measuring the clock speed?

       
  • Bertrand BAROTH

    Bertrand BAROTH - 2022-02-20

    I have a frequency meter ... Unfortunately I am afraid that the processor will send "bursts" and so the frequency meter cannot be used. Maybe sampling one burst with my digital scope ? i think it would be safe to increase I2C_BIT_DELAY, I2C_CLOCK_DELAY and I2C_END_DELAY respectively to 12, 6 and 6 (us), to have a margin ? Question : are there AVR's with a hardware I2C circuit ?

     

    Last edit: Bertrand BAROTH 2022-02-20
    • Anobium

      Anobium - 2022-02-20

      Maybe, but, I do not think you will exceed 100kHz.

       
  • Bertrand BAROTH

    Bertrand BAROTH - 2022-02-22

    I saw that they connect directly to Arduino's, WITHOUT pullups ; maybe the resistors are already built in ?

     
    • Anobium

      Anobium - 2022-02-22

      Measure the pullup before using. :-)

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.