Archived
1
0
This repo is archived. You can view files and clone it, but cannot push or open issues or pull requests.
keybrd/tutorials/tutorial_4_split_keyboard_with_IOE.md
2016-05-09 08:05:08 -06:00

3.1 KiB

keybrd Tutorial 4 - split keyboard with I/O Expander

After reading this tutorial you will be able to be able to modify a 2-matrix keybrd sketch to suite your own split keyboard design.

Overview of split keyboard with I/O Expander

The breadboard in this picture models a split keyboard. ![breadboard keyboard with 2 rows and 4 columns of keys] (images/breadboard_keyboard_2x4_labeled.jpg "2x5 breadboard keyboard")

The right matrix is connected to a microcontroller. The left matrix is connected to a I/O expander.

There is a total of 4 matrix rows, each on a dedicated power rail.

The microcontroller and I/O expander communicate by I2C via 4 jumper wires:

  • ground
  • power
  • Serial CLock input (SCL)
  • Serial DAta I/O (SDA)

The two resistors near the microcontroller pull-up voltage on the SCL and SDA pins.

The I/O expander has a small notch on one end, which identifies the end with pin 1. In the picture, pin 1 is on the right end.

Building a split keyboard with I/O Expander

The split keyboard is built on the Basic Breadboard Keyboard described in tutorial_0_keybrd_breadboard.md > Building a Basic Breadboard Keyboard

Follow these instructions to add a second matrix to the Basic Breadboard Keyboard: 4. Insert I2C jumper wires and pull-up resistors connecting to Teensy2.

todo these tables might not match the sketch

Teensy 2.0 pin connections tables

Pin Number Row Column
21 row_R0
20 row_R1
0 col_R0
1 col_R1
Pin Number I2C
GND ground
VCC power
5 SCL
6 SDA
Pin Number 4.7K Ohms Pull-up Resistor
5 VCC
6 VCC
  1. Insert jumper wires to connect MCP23018 I/O expander

MCP23018 I/O expander pin connections tables

Pin Number Row Column
3 row_L0
4 row_L1
20 col_L0
21 col_L1
22 col_L2
Pin Number I2C
1 ground
11 power
12 SCL
13 SDA
Pin Number Jump to Pin
11 16
1 15

todo add capacitor

Sketch for split keyboard with I/O Expander

An annotated sketch for the split keyboard with I/O Expander is on keybrd_4_split_with_IOE_annotated.ino