keybrd library is an open source library for creating custom-keyboard firmware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

tutorial_4_split_keyboard_with_IOE.md 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. keybrd Tutorial 4 - split keyboard with I/O Expander
  2. ====================================================
  3. 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.
  4. ## Overview of split keyboard with I/O Expander
  5. The breadboard in this picture models a split keyboard.
  6. ![breadboard keyboard with 2 rows and 4 columns of keys]
  7. (images/breadboard_keyboard_2x4_labeled.jpg "2x5 breadboard keyboard")
  8. The right matrix is connected to a microcontroller.
  9. The left matrix is connected to a I/O expander.
  10. There is a total of 4 matrix rows, each on a dedicated power rail.
  11. The microcontroller and I/O expander communicate by [I2C](http://en.wikipedia.org/wiki/I%C2%B2C) via 4 jumper wires:
  12. * ground
  13. * power
  14. * Serial CLock input (SCL)
  15. * Serial DAta I/O (SDA)
  16. The two resistors near the microcontroller pull-up voltage on the SCL and SDA pins.
  17. The I/O expander has a small notch on one end, which identifies the end with pin 1.
  18. In the picture, pin 1 is on the right end.
  19. ## Building a split keyboard with I/O Expander
  20. The split keyboard is built on the Basic Breadboard Keyboard described in
  21. tutorial_0_keybrd_breadboard.md > Building a Basic Breadboard Keyboard
  22. Follow these instructions to add a second matrix to the Basic Breadboard Keyboard:
  23. 4. Insert I2C jumper wires and pull-up resistors connecting to Teensy2.
  24. * follow the I2C and pull-up resistors tables (below) and consult Teensy pinout diagram in
  25. [Connecting Teensy 2.0 to a Keyboard](connecting_teensy2_to_keyboard.md)
  26. todo these tables might not match the sketch
  27. **Teensy 2.0 pin connections tables**
  28. | Pin Number | Row Column |
  29. |------------|-------------|
  30. | 21 | row_R0 |
  31. | 20 | row_R1 |
  32. | 0 | col_R0 |
  33. | 1 | col_R1 |
  34. | Pin Number | I2C |
  35. |------------|-------------|
  36. | GND | ground |
  37. | VCC | power |
  38. | 5 | SCL |
  39. | 6 | SDA |
  40. | Pin Number | 4.7K Ohms Pull-up Resistor |
  41. |------------|-------------|
  42. | 5 | VCC |
  43. | 6 | VCC |
  44. 5. Insert jumper wires to connect MCP23018 I/O expander
  45. * follow pin connections tables (below) and consult pinout diagram in
  46. [Connecting MCP23018 I/O Expander to a Keyboard](connecting_MCP23018_to_keyboard.md)
  47. **MCP23018 I/O expander pin connections tables**
  48. | Pin Number | Row Column |
  49. |------------|-------------|
  50. | 3 | row_L0 |
  51. | 4 | row_L1 |
  52. | 20 | col_L0 |
  53. | 21 | col_L1 |
  54. | 22 | col_L2 |
  55. | Pin Number | I2C |
  56. |------------|-------------|
  57. | 1 | ground |
  58. | 11 | power |
  59. | 12 | SCL |
  60. | 13 | SDA |
  61. | Pin Number | Jump to Pin |
  62. |------------|-------------|
  63. | 11 | 16 |
  64. | 1 | 15 |
  65. todo add capacitor
  66. ## Sketch for split keyboard with I/O Expander
  67. An annotated sketch for the split keyboard with I/O Expander is on
  68. [keybrd_4_split_with_IOE_annotated.ino](keybrd_4_split_with_IOE_annotated/keybrd_4_split_with_IOE_annotated.ino)