keybrd library is an open source library for creating custom-keyboard firmware.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Это архивный репозиторий. Вы можете его клонировать или просматривать файлы, но не вносить изменения или открывать задачи/запросы на слияние.

tutorial_4c_split_keyboard_with_IOE.md 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. keybrd Tutorial 4 - split keyboard with I/O Expander
  2. ====================================================
  3. When you finish 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. --------------------------------------------
  6. The breadboard in this picture models a split keyboard.
  7. ![breadboard keyboard with 2 rows and 4 columns of keys](images/breadboard_keyboard_2x5_labeled.jpg "2x5 breadboard keyboard")
  8. The breadboard's four bus strips are used as rows.
  9. Two rows (blue buses) are connected to the microcontroller.
  10. Two rows (red buses) are connected to the I/O expander.
  11. The I/O expander is a MCP23S17.
  12. It has a small notch on one end, which identifies pin 1.
  13. In the picture, pin 1 is on the left end.
  14. The MCP23S17 communicates via SPI protocol, where Teensy LC is the master, and MCP23S17 is slave.
  15. The Teensy LC and MCP23S17 are connected via 6 jumper wires:
  16. |CONNECTION |Teensy LC|MCP23S17|
  17. |:------------------:|---------|--------|
  18. |ground | GND | VSS |
  19. |power | 3.3v | VDD |
  20. |Serial Clock | SCK0 | SCK |
  21. |Master Out, Slave In| MOSI0 | SI |
  22. |Master In, Slave Out| MISO0 | SO |
  23. |Chip Select | CS0 | /CS |
  24. A decoupling capacitor suppresses high-frequency noise from the power supply.
  25. MCP23S17's I/O expander address is configured by hardware pins.
  26. The MCP23S17 with all address pins grounded has an device address of 0x20.
  27. The MCP23S17's /RESET pin is connected to VDD.
  28. The MCP23S17 I/O expander has two ports. Each port has eight pins.
  29. Port B is connected to the matrix's rows.
  30. Port A is connected to the matrix's columns.
  31. Building a split keyboard with I/O Expander
  32. -------------------------------------------
  33. Starting with the basic breadboard keyboard described in [tutorial_1_breadboard_keyboard.md](tutorial_1_breadboard_keyboard.md), add parts as described above.
  34. Refer to the MCP23S17 datasheet to locate its pins.
  35. <!-- todo schematic with IOE power decoupling capacitor
  36. This schematic was written by consulting the I/O expander's datasheet and using the ?? tool. -->
  37. Sketch for split keyboard with I/O Expander
  38. -------------------------------------------
  39. The [keybrd_4c_split_with_IOE.ino](keybrd_4c_split_with_IOE/keybrd_4c_split_with_IOE.ino)
  40. sketch explains how the I/O Expander works on a keyboard.
  41. <a rel="license" href="https://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">keybrd tutorial</span> by <a xmlns:cc="https://creativecommons.org/ns" href="https://github.com/wolfv6/keybrd" property="cc:attributionName" rel="cc:attributionURL">Wolfram Volpi</a> is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.<br />Permissions beyond the scope of this license may be available at <a xmlns:cc="https://creativecommons.org/ns" href="https://github.com/wolfv6/keybrd/issues/new" rel="cc:morePermissions">https://github.com/wolfv6/keybrd/issues/new</a>.