Source: https://mokxi.com/learn/path/more-pins-expanders
Updated: 2026-11-20

All paths

# More pins: expanders, muxes and drivers

Run out of pins no more: 74HC595 outputs and 74HC165 inputs, PCF8574 and MCP23017 I2C expanders, a CD74HC4067 analog mux, a TCA9548A for twin addresses, PCA9685 PWM for LEDs, and a 64-button spaceship control deck.

Arduino Uno R3 Free 7 lessons 6 h 4 chapters 1,750 XP Embedded engineering · Intermediate +150 XP

0 of 7 done

Start the course free 74HC595: eight outputs on three pins Lesson plan for teachers

What you will build

## 2 projects, built step by step

7 lessons in 4 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 1 project

### 74HC165: eight inputs on three pins

The 595 the other way around: load eight switches at once, clock them out on one pin, and the shiftIn() bug that loses the top bit on this chip.
Open it in the simulator

Chapter 2 project

### TCA9548A: same address, one bus

Two sensors and two screens with the same I2C addresses kept apart by a TCA9548A: scans that see different chips on each channel, and what happens if two channels are on at once.
Open it in the simulator

The map

## Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

## Shift registers

Eight outputs and eight inputs on three pins each.

Open 187 XP

### 74HC595: eight outputs on three pins

A shift register drives eight LEDs from three pins: bits clocked in one at a time, a latch that changes all eight at once, bit order, and chaining for more.

0 of 5 steps

Start What is in it

Project Locked 374 XP

### 74HC165: eight inputs on three pins

The 595 the other way around: load eight switches at once, clock them out on one pin, and the shiftIn() bug that loses the top bit on this chip.

0 of 5 steps

3 questions, graded as you go.

Chapter 2

## On the I2C bus

Expanders, an analog mux and an I2C mux.

Locked 187 XP

### I2C expanders: PCF8574 and MCP23017

Extra pins on two wires: the PCF8574, where a byte written is its eight pins, and the MCP23017, with direction and pull-up registers like a real port.

0 of 5 steps

Locked 205 XP

### CD74HC4067: sixteen analog channels

An analog multiplexer: four address lines pick one of sixteen channels and join it to one analog pin, so three knobs, or sixteen, share A0, and an empty channel floats.

0 of 5 steps

Project Locked 374 XP

### TCA9548A: same address, one bus

Two sensors and two screens with the same I2C addresses kept apart by a TCA9548A: scans that see different chips on each channel, and what happens if two channels are on at once.

0 of 5 steps

4 questions, graded as you go.

Chapter 3

## Drivers

Sixteen PWM channels that run themselves.

Locked 205 XP

### PCA9685: sixteen PWM channels for LEDs

Sixteen 12-bit PWM outputs on I2C: a prescaler for the frequency, on and off counts out of 4096, LEDs at four brightness levels, and a breathing wave that runs on its own.

0 of 5 steps

3 questions, graded as you go.

Chapter 4

## Boss project

A spaceship control deck with sixty-four buttons on two wires.

Locked 218 XP

### Boss: a 64-button control deck

A spaceship control deck with sixty-four buttons on two wires: four keypads, each scanned row by row through its own PCF8574, and every key a ship system that toggles.

0 of 6 steps

3 questions, graded as you go.

Syllabus

## Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

### Shift registers

- 74HC595: eight outputs on three pins A shift register drives eight LEDs from three pins: bits clocked in one at a time, a latch that changes all eight at once, bit order, and chaining for more.
- 74HC165: eight inputs on three pins The 595 the other way around: load eight switches at once, clock them out on one pin, and the shiftIn() bug that loses the top bit on this chip.

Chapter 2

### On the I2C bus

- I2C expanders: PCF8574 and MCP23017 Extra pins on two wires: the PCF8574, where a byte written is its eight pins, and the MCP23017, with direction and pull-up registers like a real port.
- CD74HC4067: sixteen analog channels An analog multiplexer: four address lines pick one of sixteen channels and join it to one analog pin, so three knobs, or sixteen, share A0, and an empty channel floats.
- TCA9548A: same address, one bus Two sensors and two screens with the same I2C addresses kept apart by a TCA9548A: scans that see different chips on each channel, and what happens if two channels are on at once.

Chapter 3

### Drivers

- PCA9685: sixteen PWM channels for LEDs Sixteen 12-bit PWM outputs on I2C: a prescaler for the frequency, on and off counts out of 4096, LEDs at four brightness levels, and a breathing wave that runs on its own.

Chapter 4

### Boss project

- Boss: a 64-button control deck A spaceship control deck with sixty-four buttons on two wires: four keypads, each scanned row by row through its own PCF8574, and every key a ship system that toggles.

Kits

## Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

### Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.
See every kit

Questions

## About More pins: expanders, muxes and drivers

Is More pins: expanders, muxes and drivers free?

Yes. All 7 lessons of More pins: expanders, muxes and drivers are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does More pins: expanders, muxes and drivers take?

About 6 hours: 7 lessons in 4 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: 74HC165: eight inputs on three pins and TCA9548A: same address, one bus.

Where do I start?

With "74HC595: eight outputs on three pins", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.
