News:

;) This forum is the property of Proton software developers

Main Menu

Microchip MCP3422 addressing confusion

Started by Yves, Apr 04, 2022, 08:48 PM

Previous topic - Next topic

Yves

Hello everyone,
address.JPGaddress.JPG
I'm a little confused with the MCP3422 AD chip. The chip I have is clearly marked MCP3422 A1. I assume A1 is the address which is %10100001. When I look at the device bits is 1101 and we have the address bits A2, A1 and A0 so that should makes %1101001 then the R/W bit followed by an ACK. So which one is right the HEX A1= %10100001. See below Microchip diagram.

Regards,
Yves
Yves

RGV250

Hi,
I would say it is %1101 001 0 for write and %1101 001 0 for read.
1101 is the device, 001 is A1 and then the read/write bit.

Bob

david

Hi,
I've only used the MCP3424 which is the 4ch version with user selectable address pins.
For the equivalent of an A0 address setting I used the following-
Symbol ADC_W= %11010000    'Device address and write
Symbol ADC_R= %11010001    'Device address and read

For a read I used-
BusOut ADC_W,[136]  '136 for Ch1 one shot, 16 bit, gain 1   Bin 10001000
Repeat              'xxxxxxnn nn=gain factor. xxxxnnxx nn=resolution. xxxnxxxx n=conversion mode. xnnxxxxx nn=channel
BusIn ADC_R,[ADC1, Setup]      'returns integer value of ADC as Word
Until Setup.7=0

mV1=ADC1/16        'convert 16 bit ADC count to Float mV (16 bit)

Cheers,
David

Yves

So A0 to A7, are just the setting of 3 less significant bits and the A stand for address.
Many thanks for your help.

Address Options for MCP3422:

Address Options
XX   A2 A1 A0
A0 = 0  0  0
A1 = 0  0  1
A2 = 0  1  0
A3 = 0  1  1
A4 = 1  0  0
A5 = 1  0  1
A6 = 1  1  0
A7 = 1  1  1

Regards,
Yves 
Yves

Stephen Moss

Quote from: Yves on Apr 04, 2022, 08:48 PMThe chip I have is clearly marked MCP3422 A1. I assume A1 is the address which is %10100001.
I have only had a quick glance at the data sheet and it is a little confusing as one part indicates you can set the A2, A1 & A0 address bits, which is normal with I2C devices. Although, I have not seen it performed by setting only to the two external pins either High, Low or floating before.

Whereas, page 55 does appear to give the impression that if the device number is followed by A0 to A7 then the A2, A1 & A0 address bits are fixed, which in this case it would appear that the full address would be 1101 + 001 + R/W bit. At least that is how I would interpret it otherwise, I do not understand what the address options on page 55 are referring to as I could see not find any other reference to the A1 marking in the datasheet.
If that is indeed the case then I would think that you the external connection status of the Adr0 & Adr1 pins is irrelevant as the address is fixed and they only come into play for devices that do not have the additional A0 to A7 markings.

Yves

Stephen, some chip have 2 address pins I think the MCP3423 but the MCP3422 has 8 pins and fixed address.

Regards,

Yves
Yves

trastikata

Quote from: Yves on Apr 05, 2022, 10:02 AMStephen, some chip have 2 address pins I think the MCP3423 but the MCP3422 has 8 pins and fixed address.

Hello Yves,

for MCP3423 and MCP3424 addressing is:

1101 + A2A1A0 + R/W bit

Where A1 and A0 are set based on the pin A1 and A0 state and the A2 is not set, but determined from the state of A1 and A0 by using TABLE 5-3 on page 21.

for MCP342 the addressing is:

1101 + FIXED ADDRESS + R/W bit

FIXED ADDRESS depends on the marking and basically it is the 3-bit binary representation i.e. 1 = 001, 2 = 010, 3 = 011 .... 7 = 111 - full table available on page 55.