-
Pinouts and connections
11/17/2025 at 20:19 • 0 commentsThe USB module just has power, ground and the two I2C signals connecting.
![]()
I used just one MCP23017 chip, with GPB7 connected to D0, D1, D2 and D3 in turn. This needs that pin direction set to input instead of output. For a more general purpose device, use two of these chip and set their slave addresses to be different (using pins 15, 16 17).
![]()
Here are the connections to simple programmable logic chips with all their possible output pins (pale blue cells) set to outputs. Some cells are always inputs (green cells).
In practice, some of the possible output cells may be inputs. You may not know their signal directions at first, so current-limiting resistors to those lines are a wise precaution to prevent damage.
![]()
The pin ordering on the right may seem a bit irregular, but it allows the addresses to be cycled from 0 to 2^n where n is the number of address pins minus 1.
You can also use the two-chip version to read EPROM chips. The /CS and /OE pins can be tied down for reading. Where pins become VPP or /PGM, simply hold A11, A14, and A15 high as required. Pin 28 can be permanently connected to VCC, but pin 26 will need switching to VCC, or buffered to be able to supply enough current to drive a 24-pin EPROM.
![]()
Keith


