It should be, is with other microcontrollers, but needs handshaking if Multi-Master I2C isn't supported - I haven't checked if it is on RP2 chips.Is it possible to connect two Pico-s (via i2c) to one Lcd 16x2 display?
Basically I2C can only be enabled on one Pico at a time, the other needs its I2C bus tristating so it doesn't interfere with the control of the bus by the other.
This is usually achieved by having a Primary and Secondary Pico. The Primary will take control of the bus and initialise the display, then check a 'Can I have the bus?' signal line from the Secondary and set a 'Yes you can' back to it or not. The Primary has to tristate its bus and not output via I2C until the Secondary releases the bus, clears its request. The Secondary will wait until its request is acknowledged, enable I2C, send data, tristate when done and drop its request signal.
It may not be necessary for either side to actually tristate as that will often be the default idle state, but not always; the SCL clock from a Master may sometimes be driven hard high and low.
It's common to have two digital signals between the Primary and Secondary, one each way, but it can be be done using a single signal line between the two though more complicated to implement, and potentially uses more GPIO pins each side.
It can also be done by implementing Multi-Master mode in software but that's even trickier.
The other method is, as suggested, for the Secondary to pass its data to the Primary and only have that interact with the display.
Statistics: Posted by hippy — Wed Feb 19, 2025 12:12 pm