RGB Potentiometer - non-RPi use case

Hi everyone,

I recently purchased one of these RGB Potentiometers here: https://shop.pimoroni.com/products/rgb-potentiometer-breakout

My intention is to connect it to my home-made Z80 computer via I2C, but the libraries available for it are all for the Raspberry Pi, unsurprisingly. So I set about reverse-engineering the Python libraries - I mean, how hard can it be to set a few pins on the microcontroller under the potentiometer and read the ADC via I2C?

I suspect the libraries are slightly outdated, however. When I query the potentiometer breakout board, I’m getting the right Chip ID (E26A), but the address for that value is slightly different than the ones used in the RPi library here: https://github.com/pimoroni/ioe-python/blob/master/library/ioexpander/init.py

The library is using 0xFA and 0xFB to get the Chip ID, whereas I’m finding the Chip ID at 0xF9 and 0xFA. Also, the reported version (again, its address is one byte lower than that used by the IO Expander library) is 3, not 2. (I found the address discrepancy by reading every register from 0xFF down to 0x40).

Has there been an update to the software running on the MS51 microcontroller on the RGB potentiometer breakout board that hasn’t been reflected in the IO Expander library yet?

Does anyone have (or can I get hold of) an updated register address list for this application?

Or is something odd going on at my end? I’m no I2C expert.

And if anyone has experience of using this breakout board with a Z80-based or other non-RPi system, I’d be pleased to hear from you!

If you’re poking at this stuff you probably know more about i2c than most people here, but I would have thought that if they had updated the MS51 firmware to take different addresses there’d have to be a modified Python library to address it properly.

You’re consistently out-by-one on the address, so my first thought was that something funny might be going on with the read/write bits of the address byte, but that doesn’t explain the version number.

You may have to poke one of the Pimoroni folks to get a solid answer.

1 Like