logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

dev.md (5063B)


  1. # Southpaw Extended 65%
  2. Development docs covering the following:
  3. - Kimera core
  4. - RGB
  5. - Backlight
  6. ## Kimera core
  7. ![Kimera core](https://gd2.alicdn.com/imgextra/i4/159916802/TB2qsIgdrJkpuFjy1zcXXa5FFXa_!!159916802.jpg)
  8. What little available info that was available for the qmk port
  9. - atmega32u4 16Mhz
  10. - board seems to have a 6Mhz crystal
  11. - 2x PCA9555 I2C IO expander
  12. Links:
  13. - [Schematic, BOM, Gerbers](/kairyu/kimera/blob/master/kimera_core)
  14. - [Original firmware](https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/kimera)
  15. ```c
  16. /*
  17. Kimera_core_v1.0 Components
  18. U1 (atmega32u4)
  19. ,----------------.
  20. TX --| TX0(PD3) RAW |--
  21. RX --| RX1(PD2) GND |--
  22. --| GND RESET |-- RST
  23. --| GND VCC |--
  24. SDA --| 2(PD1) (PF4)A3 |--
  25. SCL --| 3(PD0) (PF5)A2 |--
  26. (INT) --| 4(PD4) (PF6)A1 |--
  27. --| 5(PC6) (PF7)A0 |--
  28. --| 6(PD7) (PB1)15 |-- SCK
  29. LED2 --| 7(PE6) (PB3)14 |-- MISO
  30. LED1 --| 8(PB4) (PB2)16 |-- MOSI
  31. LED3 --| 9(PB5) (PB6)10 |-- LED4
  32. `----------------'
  33. IC1 (PCA9555) IC2 (PCA9555)
  34. ,----------. ,----------.
  35. SDA --| SDA P00 |-- P1 SDA --| SDA P00 |-- P17
  36. SCL --| SCL P01 |-- P2 SCL --| SCL P01 |-- P18
  37. INT --| INT P02 |-- P3 INT --| INT P02 |-- P19
  38. | P03 |-- P4 | P03 |-- P20
  39. GND --| A0 P04 |-- P5 VCC --| A0 P04 |-- P21
  40. SJ1 --| A1 P05 |-- P6 SJ1 --| A1 P05 |-- P22
  41. SJ2 --| A2 P06 |-- P7 SJ2 --| A2 P06 |-- P23
  42. | P07 |-- P8 | P07 |-- P24
  43. | | | |
  44. | P10 |-- P9 | P10 |-- P25
  45. | P11 |-- P10 | P11 |-- P26
  46. | P12 |-- P11 | P12 |-- P27
  47. | P13 |-- P12 | P13 |-- P28
  48. | P14 |-- P13 | P14 |-- P29
  49. | P15 |-- P14 | P15 |-- P30
  50. | P16 |-- P15 | P16 |-- P31
  51. | P17 |-- P16 | P17 |-- P32
  52. `----------' `----------'
  53. */
  54. ```
  55. ### Bootloader
  56. Default bootloader is `atmel-dfu`.
  57. Reboot to bootloader via magnetic switch next to icsp header.
  58. Flash using regular dfu methods.
  59. ### Southpaw Extended 65 pin mappings
  60. Taken from [kimera-config.json](https://github.com/kairyu/tkg/blob/master/keyboard/config/kimera-config.json)
  61. "row_mapping": [ 2, 3, 4, 5, 6 ],
  62. "col_mapping": [ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ],
  63. # RGB
  64. - PIN C7
  65. - Number of RGB LED 7
  66. # Backlight
  67. - PIN B5
  68. # Capslock
  69. - PIN B6
  70. # Numlock
  71. - PIN C6
  72. ## Assumptions
  73. ### Pin/Port mappings
  74. - All cols are on the same IC
  75. - All rows are on the same IC and port
  76. - Pins mapped sequentially
  77. - Each port only does row or column not a mixture of both
  78. - No need to have complex port config
  79. -
  80. | ROW index | Kimera Pin | PCA9555 |
  81. | ----------|------------|-------------------|
  82. | 0 | 2 | IC1 Port 0 pin 1 |
  83. | 1 | 3 | IC1 Port 0 pin 2 |
  84. | 2 | 4 | IC1 Port 0 pin 3 |
  85. | 3 | 5 | IC1 Port 0 pin 4 |
  86. | 4 | 6 | IC1 Port 0 pin 5 |
  87. - Safe enough to assume `row_index == pin`
  88. | COL index | Kimera Pin | PCA9555 |
  89. | ----------|------------|-------------------|
  90. | 0 | 13 | IC1 Port 1 pin 4 |
  91. | 1 | 14 | IC1 Port 1 pin 5 |
  92. | 2 | 15 | IC1 Port 1 pin 6 |
  93. | 3 | 16 | IC1 Port 1 pin 7 |
  94. | 4 | 17 | IC2 Port 0 pin 0 |
  95. | 5 | 18 | IC2 Port 0 pin 1 |
  96. | 6 | 19 | IC2 Port 0 pin 2 |
  97. | 7 | 20 | IC2 Port 0 pin 3 |
  98. | 8 | 21 | IC2 Port 0 pin 4 |
  99. | 9 | 22 | IC2 Port 0 pin 5 |
  100. | 10 | 23 | IC2 Port 0 pin 6 |
  101. | 11 | 24 | IC2 Port 0 pin 7 |
  102. | 12 | 25 | IC2 Port 1 pin 0 |
  103. | 13 | 26 | IC2 Port 1 pin 1 |
  104. | 14 | 27 | IC2 Port 1 pin 2 |
  105. | 15 | 28 | IC2 Port 1 pin 3 |
  106. | 16 | 29 | IC2 Port 1 pin 4 |
  107. | 17 | 30 | IC2 Port 1 pin 5 |
  108. | 18 | 31 | IC2 Port 1 pin 6 |
  109. - Need to read both ICs and corresponding port to compile the correct column data
  110. - All pins are mapped sequentially
  111. - maps to the usual practice of reading matrix columns
  112. - Needs uint32_t to read 19 columns of data
  113. ## Notes
  114. [pca9555 datasheet](https://www.ti.com/lit/ds/symlink/pca9555.pdf)
  115. - Other Kimera based boards with non sequential pin mappings, pins mapped across ICs, or mixed row/col configs will need more complicated `pin -> i2c_addr,port,pin` logic as well as rather more complex pin functions.
  116. ## Return to stock firmware
  117. To return back to stock TMK firmware, use [programming guide provided by Reconsiderit](https://geekhack.org/index.php?topic=92344.msg2625784#msg2625784)