Siglent SDS1202X-E I2C (400 kHz) and SPI (2 MHz) Decode
Вставка
- Опубліковано 26 сер 2024
- Github Link for those looking to recreate this project:
github.com/mat...
I'll also mention that after making this video I was curious about what I2C Baud rate I was using. Notice in the video the SPI messages are much faster, hence the inability to zoom out as far on the timescale while still maintaining resolution. This is because the scope just takes fewer samples when zoomed in that far on the time scale to capture 2MHz communication. I found the following after Googling Arduino I2C Speed:
"Data on the I2C-bus can be transferred at rates of up to 100 kbit/s in the Standard-mode, up to 400 kbit/s in the Fast-mode, up to 1 Mbit/s in Fast-mode Plus, or up to 3.4 Mbit/s in the High-speed mode."
Note the Arduino I2C Serial Library only supports Standard and Fast modes.
I went back into my code and added:
Wire.setClock(400000);
The I2C packets decoded just fine at the increased transmission rate. The code on github has been updated to reflect this change. I also tried setting the clock speed to 1,000,000Hz for Fast-mode Plus but this caused the Arduino to freeze up. Programming it back to 400,000 made everything work again.
Hope this info is helpful!
i am not understand the spi. make it clear!