MCP342x icon indicating copy to clipboard operation
MCP342x copied to clipboard

Addressing more than one IC

Open TheSimonCH opened this issue 10 months ago • 1 comments

Hi Steve

Thanks a lot for this good library, I helped me a lot. But I have an issue: on my board, there are two MCP3423, one has the address 0x68, the other one 0x69. When I try to read the ADC values from those ICs the ADC value from that one which was initialized later:

adc1.begin(0x68); adc2.begin(0x69);

--> reading from adc1 gives the values from adc2

When I change the initialization order:

adc2.begin(0x69); adc1.begin(0x68);

--> reading from adc2 gives the values from adc1

I would be very happy if you can fix this.

Best regards Simon

TheSimonCH avatar Mar 27 '24 13:03 TheSimonCH

That does not look like valid code for the MCP324x library. Are you sure you have the right library? Please take a look at the examples.

This library was written specifically to support multiple devices, typically 3 MCP3424 ADCs. I have successfully used the library with a board I made that contained 8 MCP3424 ADCs, all of which were sampling simultaneously.

stevemarple avatar Mar 27 '24 15:03 stevemarple

No response so closing this on the assumption that the reporter is referring to a different library.

stevemarple avatar May 19 '24 10:05 stevemarple