I²C Project Update

I'm still working on the project to develop a Mecrisp Stellaris driver for the I²C module on the Raspberry Pi Pico. (To be more precise, the microcontroller has two I²C modules.) Here is a picture of the test hardware, using the Adafruit Trellis:

hardware for I²C driver testing

You can see an SCL bus, an SDA bus, and a bus for 5V, coming off the Pico VSYS pin. You can see some resistors to pull each bus up to +5V.

An issue I had to address was that the Pico is a 3.3V device, whereas the Trellis is a 5V device, and I didn't want to deal with voltage translation on the I²C bus if I could get away with it. Since all the devices on an I²C bus just pull the bus down to ground, I decided to just treat it like a 5V bus, using the 5V available through Pico's VSYS (from the USB power). This makes the critical assumptions that (1) the Pico I²C module will see a +5V input the same as a +3.3V input, and (2) the Pico's I²C mechanism is strong enough to pull the +5V bus to GND; I haven't verified either assumption.

Another implication of this is that I cannot enable the Pico's built-in pull-up resistors on the I²C pads, because then the internal resistor is trying to pull toward +3.3V, and the external resistor is trying to pull toward +5V, and you end up with something in-between.

When I say I'm developing a driver, that is not really accurate. Really I'm just putting the relevant register and bit mappings in a file, and writing some demo code to show how they are used. I am planning, God willing, to write a Trellis driver later, assuming I get I²C figured out.

Proxied content from gemini://gem.librehacker.com/gemlog/tech/20220829-0.gmi

Gemini request details:

Original URL
gemini://gem.librehacker.com/gemlog/tech/20220829-0.gmi
Status code
Success
Meta
text/gemini
Proxied by
kineto

Be advised that no attempt was made to verify the remote SSL certificate.