[Skip to Content]

Published Saturday 14 July 2012
Categories: Projects | Raspberry Pi |

Post View Counter 510

The code sample below shows how to read the ADC values from the MCP3428 16-Bit, Multi-Channel Analog-to-Digital Converter with I2C™ Interface and On-Board Reference by Microchip via I2C on the Raspberry Pi using Python.

The code on this page has been replaced with updated code on Github.

https://github.com/abelectronicsuk/ABElectronics_Python_Libraries/tree/master/ADCPi/demos

 

ADC Chip Addresses

adc_address1 = 0x68
adc_address2 = 0x69

channel1 = 0x98
channel2 = 0xB8
channel3 = 0xD8
channel4 = 0xF8

Pin assignment on our interface board:

adc_address1 - channel1 - pin 3
adc_address1 - channel2 - pin 4
adc_address1 - channel3 - pin 1
adc_address1 - channel4 - pin 2


adc_address2 - channel1 - pin 7
adc_address2 - channel2 - pin 8
adc_address2 - channel3 - pin 5
adc_address2 - channel4 - pin 6


ADC Address Config:

L & L = 0x68
F & F = 0x68
L & F = 0x69
L & H = 0x6A
F & L = 0x6B
H & L = 0x6C
H & F = 0x6D
H & H = 0x6E
F & H = 0x6F

Screen Shot of the data returned from the converter.

Permalink


0 Comments



Post your comment