Closed charkster closed 2 years ago
SPI clock is dead-on. Tried 1MHz, 8MHz, 10MHz looked a bit goofy... I would probably only run with a max of 8MHz.
WIth a 2K Ohm pullup to 3.3V I am measuring 376kHz for a 400kHz setting and 881kHz for a 1MHz setting. My previous measurements were done with a slave attached but only using ones on the slave (4.7k Ohm).
I am thinking this is a hardware inaccuracy rather than software... I'm too lazy to install the arduino libraries for the Pico to check the accuracy there.
Great project, I'm really excited to have i2c access on my Ubuntu desktop. I was trying your scan_i2c.py example and measured the SCL period with a logic analyzer and oscilloscope.
i2c = I2C(i2c_index=0, frequency=400000)
resulted in a frequency of 357kHz (about 11% lower) requesting frequency=450000 measured exactly 400kHzi2c = I2C(i2c_index=0, frequency=1000000)
resulted in a frequency of 791kHz (about 21% lower) requesting frequency=1350000 measured exactly 1MHzI'm fine using these new values for my scripts, but I thought I would pass on the observation.