After reset, the MCP23017-E/SP configures bidirectional pins such as GPA0 as inputs. Writing GPIO updates the output latch but does not enable the output driver. Check bus access and the register map first. Then compare IODIR, OLAT and measured pin voltage. An I²C acknowledgment or successful write return code alone does not verify the output.

1. Establish bus access and a known register map

Pause other tasks that write to the port during the test. Check the device supply, ground reference and active-low RESET signal against the data sheet. A0, A1, A2 and RESET need defined external levels. Without an acknowledgment, resolve the address, bus path, wiring and logic levels before changing direction registers.

Once the device acknowledges, log each transaction’s return status and register readback. A later write can still fail or address the wrong register. If you change hosts using the MCU catalog, check the new driver’s address convention. Its API may expect a seven-bit address or another representation. Keep the device address separate from the value required by the API.

Confirm IOCON.BANK before using the addresses below. If earlier software activity is unknown, establish a valid reset baseline only when the board can safely tolerate it. Then trace subsequent IOCON writes. Do not blindly write a familiar address to select a presumed layout. The other bank can assign that address to a different register.

RegisterAddress with BANK=0Evidence it provides
IODIRA / IODIRB00h / 01hDirection: 1 input, 0 output
GPIOA / GPIOB12h / 13hReads pin logic; writes update OLAT
OLATA / OLATB14h / 15hStored output command
IOCON0Ah / 0BhBANK and SEQOP configuration

The Microchip MCP23017 data sheet, DS20001952E, gives IODIR a reset value of FFh and OLAT a value of 00h. GPA7 and GPB7 are output-only on the MCP23017. Clear IO7 in both direction registers through I²C as required by the data sheet. Do not configure those pins as inputs based on an older tutorial.

2. Run a controlled low/high test on GPA0

Use GPA0 only if the network is spare or can be safely isolated. Do not toggle a connected actuator for this test. In the 28-lead SPDIP package identified by /SP, GPA0 is device pin 21. Follow the software channel through port A, bit 0, the package pin and the schematic net. Module connector numbering may differ.

With BANK confirmed as 0, preload the required GPA0 low state into OLATA. Then clear IO0 in IODIRA to enable the driver. Preserve the other bits’ required states and apply the IO7 restriction on both ports. Preloading establishes the latch value before the driver starts. It does not guarantee a glitch-free startup waveform.

Change only OL0 to request high, then return it low. After each command, read IODIRA and OLATA separately. Measure GPA0 relative to VSS with the same firmware, supply and load. Compare the command, direction setting and pin response.

Start with individual register transactions to separate output faults from multi-byte addressing errors. Check SEQOP and address-pointer behavior before using longer transfers. Update outputs through OLAT or a synchronized software shadow, with shared access coordinated. A GPIO read-modify-write can copy other sampled pin states into the output latch.

3. Branch on readback and voltage evidence

ObservationNext check and limit of the conclusion
IO0 remains 1Direction write, active bank, or a subsequent reset
IO0 is 0; OL0 ignores the commandRegister target, failed transaction, or another writer
OL0 changes; chip-pin voltage is unsuitableLoad, supply, probe location, or driver contention
Chip pin works; receiving input does notConnection path and receiver thresholds
Registers later return to reset valuesRESET activity, supply behavior, or software reinitialization

Investigate the first failing stage in the table. If IO0 remains 1, check its write and immediate readback before investigating the load. If direction is correct but OL0 does not follow the command, inspect the transaction trace and other writers. These observations do not establish a defective chip.

Compare immediate readback with a later reading. If a correct value subsequently changes, inspect intervening writes, RESET and the supply. Align their timing with the voltage capture. A configuration applied successfully and then lost requires a different investigation from a failed initialization write.

If OL0 changes but voltage is unsuitable, measure at the chip before checking the receiving input. Look for driver contention, unexpected loading and connection errors. Where safe isolation is possible, repeat the same test without the external load. Use the difference to investigate loading and connections. It does not identify a failed component.

OLAT reports a stored command, while GPIO reports a digital pin state. Neither measures voltage margin or switching behavior. A multimeter can check steady levels. Use waveform capture for startup pulses, slow transitions or intermittent resets. A correct reading after startup cannot prove that earlier transitions met the receiver’s requirements.

4. Repeat the reset cases and retain acceptance evidence

Test cold power-up separately from a host-only reset. The host can restart while the expander retains its registers. The expander can also reset after initialization through its own RESET or supply conditions. Verify which reset events reach the expander. After an expander reset, restore direction settings and synchronize the output shadow before resuming partial updates.

Keep one test record containing the firmware revision, operation sequence, bank, readbacks, RESET observations and load conditions. Record the failing stage and the result after correction. Compare specified VOH and VOL at their stated loads with the receiver’s VIH and VIL requirements. Absolute maximum ratings are stress limits, not normal drive targets.

Use the Microchip part catalog to check the exact MCP23017-E/SP device and package. Keep board-specific connector mapping, wiring and initialization details with the actual board documentation. The IC ordering code does not define a finished module’s connections.

For an MCP23017 output-expansion BOM, record the assigned port bits, startup levels, connected loads and quantity. Check candidate parts against the complete ordering code, package and the same output acceptance conditions. Send SUNTEC the MCP23017-E/SP requirement, quantity and requested delivery schedule when you need a quotation.

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