SUNTEC Technical Team · Suzhou Shengyatai Electronics Co., Ltd.

MCP23017-E-SP-A2-A0-low-7-bit-address-0x20-Arduino-AVR-Wire-1.8.6-input-0x20-bus-write-0x40-read-0x41
Figure 2 Device address API argument and bus bytes

Find the address definition for the exact device

Start with the full ordering code, package, and applicable datasheet revision. Check the schematic and the actual address-pin connections. A module label or an example for a similar part is not enough. Some devices have fixed addresses. Others use pins or documented software settings.

For the MCP23017-E/SP, Microchip's DS20001952D datasheet defines the seven address bits as 0100 A2 A1 A0. The three address pins require external biasing. With all three low, the seven-bit address is 0x20. This is a conditional example, not a universal module default.

Record the pin states and the address source. The target address selects a device; a register address selects a function inside it. Then map the documented candidate to the controller API.

Match the address format to the controller API

A seven-bit target address and an eight-bit address byte are different representations. The transmitted byte contains the seven address bits followed by the read or write bit. For address 0x20, those bytes are 0x40 for writing and 0x41 for reading. Hexadecimal 0x20 and decimal 32 are the same value.

We use the Arduino AVR core 1.8.6 as a specific API example. Its official Wire implementation forms the transmitted byte internally. Pass the seven-bit value to beginTransmission and requestFrom. For target 0x20, passing 0x40 makes this implementation transmit 0x80 for a write. Check the actual core and any wrapper library before applying this example elsewhere.

Device address and API format checklist
Device and pin conditionAddress bitsSeven-bit valueAVR Wire argumentWrite and read bytes
MCP23017-E/SP A2:A0 = 00001000000x200x200x40 and 0x41
24LC256-I/P A2:A0 = 00010100000x500x500xA0 and 0xA1

For the 24LC256-I/P, the memory offset is separate again. Its two word-address bytes select a storage location after the device address byte. Keep these fields separate when preparing the expected transaction.

Compare the expected address with the actual transaction

First check power, reset, ground, and SDA/SCL connections. Pause other accesses. Choose a documented operation the application permits. A blind full-address scan may issue unwanted reads or writes.

For the 24LC256, confirm any preceding write cycle has finished. The device does not acknowledge while writing internally.

Follow the 24LC256 datasheet random-read sequence for offset 0x0010 with A2:A0 low:

Send START and 0xA0; check ACK.

Send 0x00 and 0x10; check ACK after each byte.

Send repeated START and 0xA1; check ACK.

Read one byte and finish with the controller's NACK and STOP.

The final controller NACK normally ends the read. It is not an address failure. The preceding write-direction phase sets the address pointer without programming an EEPROM data byte. This is a protocol illustration, not a measured trace.

Compare expected and captured bytes using the same decoder format. If the stored value is known, compare the returned data too. Unknown data confirms neither correct contents nor device identity. Do not write a test pattern without application permission.

Resolve the mismatch and record the verified address

Correct the layer identified by the evidence. A wrong address byte points to the caller or API convention. A correct decoded byte does not establish valid voltage or timing. If the device NACKs, check electrical conditions and readiness before changing the address.

Observed mismatch and next check
ObservationNext checkResult to retain
Only displayed values differDecoder format and number baseOne consistent address representation
Address byte differsAPI argument and wrapper behaviorCorrected call and repeat capture
Expected address receives NACKElectrical limits, address pins, bus path, and device readinessFor known EEPROM write busy, use documented ACK polling with a timeout
Address ACK but data is wrongRegister or offset sequence and possible shared addressTransaction evidence before changing hardware

After one correction, repeat the same permitted operation. Record the part, pin settings, seven-bit address, API argument, transmitted bytes, and result. Mark untested conditions as unresolved; a response is not full functional acceptance.

If the MCP23017 address is verified but its GPIO still does not drive, continue with the MCP23017 GPIO output checks. That is a register-configuration task. It should not restart the address search.

Keep the complete part code, address-pin settings, and controller API version with the project requirement. Check candidate parts against the same pinout, address behavior, and transaction requirements before changing the BOM. Provide SUNTEC with the required model, quantity, and integration conditions when requesting a quotation.

Prepared by the SUNTEC Technical Team at Suzhou Shengyatai Electronics Co., Ltd.