I’m building a little glowing cube (6 4x4 addressable LED maxricies) and I’m planning on using a PGA2040. I’ve got a 3 axis accelerometer I’m thinking of attaching, the easiest way is I2C (SPI is also an option)
What’s the best way to connect these up? It looks like there are many pairs of pins I can use for either I2C0 or I2C1. It is just a matter of connecting the approptiate pins on the PGA2040 to the device and then coding it
Do I need a pull up resistor? Some examples have referenced it, or said it’s not needed with the pico, but I wasn’t clear if that was a pico specific thing, or if it was an RP2040 chip thing.
It shouldn’t really matter which pair of SDA/SCL pins you use, as long as they’re both I2C0 or I2C1. I assumed you had to use pins which were next to each other, but the datasheet implies that it actually doesn’t matter, as long as they’re both part of the same I2C bus, bus 0 or bus 1.
The RP2040’s pins have pull-up resistors which should be enabled when they’re put into I2C mode. However, the datasheet says this:
There should also be external pull-ups on the board as the internal pad pull-ups may not be strong enough to pull up external circuits.
So it might work without additional pull-ups. Actually, the schematic for your accelerometer shows on-board pull-up resistors, so you probably won’t need them. There seems to be a bit of a philosophical argument about where pull-ups should go, some people put them on the board, some people put them on the breakout. It shouldn’t matter if you have both.