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.

136 lines
4.9 KiB

  1. # XD84
  2. Development docs covering the following:
  3. - Kimera core
  4. - RGB
  5. - Backlight
  6. - Light Through Cat
  7. ## Kimera core
  8. ![Kimera core](https://gd2.alicdn.com/imgextra/i4/159916802/TB2qsIgdrJkpuFjy1zcXXa5FFXa_!!159916802.jpg)
  9. What little available info that was available for the qmk port
  10. - atmega32u4 16Mhz
  11. - board seems to have a 6Mhz crystal
  12. - 2x PCA9555 I2C IO expander
  13. Links:
  14. - [Schematic, BOM, Gerbers](/kairyu/kimera/blob/master/kimera_core)
  15. - [Original firmware](https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard/kimera)
  16. ```c
  17. /*
  18. Kimera_core_v1.0 Components
  19. U1 (atmega32u4)
  20. ,----------------.
  21. TX --| TX0(PD3) RAW |--
  22. RX --| RX1(PD2) GND |--
  23. --| GND RESET |-- RST
  24. --| GND VCC |--
  25. SDA --| 2(PD1) (PF4)A3 |--
  26. SCL --| 3(PD0) (PF5)A2 |--
  27. (INT) --| 4(PD4) (PF6)A1 |--
  28. --| 5(PC6) (PF7)A0 |--
  29. --| 6(PD7) (PB1)15 |-- SCK
  30. LED2 --| 7(PE6) (PB3)14 |-- MISO
  31. LED1 --| 8(PB4) (PB2)16 |-- MOSI
  32. LED3 --| 9(PB5) (PB6)10 |-- LED4
  33. `----------------'
  34. IC1 (PCA9555) IC2 (PCA9555)
  35. ,----------. ,----------.
  36. SDA --| SDA P00 |-- P1 SDA --| SDA P00 |-- P17
  37. SCL --| SCL P01 |-- P2 SCL --| SCL P01 |-- P18
  38. INT --| INT P02 |-- P3 INT --| INT P02 |-- P19
  39. | P03 |-- P4 | P03 |-- P20
  40. GND --| A0 P04 |-- P5 VCC --| A0 P04 |-- P21
  41. SJ1 --| A1 P05 |-- P6 SJ1 --| A1 P05 |-- P22
  42. SJ2 --| A2 P06 |-- P7 SJ2 --| A2 P06 |-- P23
  43. | P07 |-- P8 | P07 |-- P24
  44. | | | |
  45. | P10 |-- P9 | P10 |-- P25
  46. | P11 |-- P10 | P11 |-- P26
  47. | P12 |-- P11 | P12 |-- P27
  48. | P13 |-- P12 | P13 |-- P28
  49. | P14 |-- P13 | P14 |-- P29
  50. | P15 |-- P14 | P15 |-- P30
  51. | P16 |-- P15 | P16 |-- P31
  52. | P17 |-- P16 | P17 |-- P32
  53. `----------' `----------'
  54. */
  55. ```
  56. ### Bootloader
  57. Default bootloader is `atmel-dfu`.
  58. Reboot to bootloader via magnetic switch next to icsp header.
  59. Flash using regular dfu methods.
  60. ### XD84 pin mappings
  61. Taken from [kimera-config.json](https://github.com/kairyu/tkg/blob/master/keyboard/config/kimera-config.json)
  62. "row_mapping": [ 1, 2, 3, 4, 5, 6 ],
  63. "col_mapping": [ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ],
  64. # RGB
  65. - PIN C7
  66. - Number of RGB LED 7
  67. # Backlight
  68. - PIN B6
  69. # Light Through Cat
  70. TODO - PWM C6
  71. ## Assumptions
  72. ### Pin/Port mappings
  73. - All cols are on the same IC
  74. - All rows are on the same IC and port
  75. - Pins mapped sequentially
  76. - Each port only does row or column not a mixture of both
  77. - No need to have complex port config
  78. -
  79. | ROW index | Kimera Pin | PCA9555 |
  80. | ----------|------------|-------------------|
  81. | 0 | 1 | IC1 Port 0 pin 0 |
  82. | 1 | 2 | IC1 Port 0 pin 1 |
  83. | 2 | 3 | IC1 Port 0 pin 2 |
  84. | 3 | 4 | IC1 Port 0 pin 3 |
  85. | 4 | 5 | IC1 Port 0 pin 4 |
  86. | 5 | 6 | IC1 Port 0 pin 5 |
  87. - Safe enough to assume `row_index == pin`
  88. | COL index | Kimera Pin | PCA9555 |
  89. | ----------|------------|-------------------|
  90. | 0 | 17 | IC2 Port 0 pin 0 |
  91. | 1 | 18 | IC2 Port 0 pin 1 |
  92. | 2 | 19 | IC2 Port 0 pin 2 |
  93. | 3 | 20 | IC2 Port 0 pin 3 |
  94. | 4 | 21 | IC2 Port 0 pin 4 |
  95. | 5 | 22 | IC2 Port 0 pin 5 |
  96. | 6 | 23 | IC2 Port 0 pin 6 |
  97. | 7 | 24 | IC2 Port 0 pin 7 |
  98. | 8 | 25 | IC2 Port 1 pin 0 |
  99. | 9 | 26 | IC2 Port 1 pin 1 |
  100. | 10 | 27 | IC2 Port 1 pin 2 |
  101. | 11 | 28 | IC2 Port 1 pin 3 |
  102. | 12 | 29 | IC2 Port 1 pin 4 |
  103. | 13 | 30 | IC2 Port 1 pin 5 |
  104. | 14 | 31 | IC2 Port 1 pin 6 |
  105. - Safe enough to assume here col_index does not need to be converted to pin
  106. - Reading both ports one after the other gives us the same sequential behavior
  107. - maps to the usual practice of reading matrix columns
  108. - while this technically gives 16 column reads, the 16th column can never be set so is safely ignored
  109. ## Notes
  110. [pca9555 datasheet](https://www.ti.com/lit/ds/symlink/pca9555.pdf)
  111. - 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.
  112. ## Return to stock firmware
  113. Not tested but original firmware seems to be available in the [kairyu/tkg-firmware](https://github.com/kairyu/tkg-firmware/blob/master/kimera-core.hex) repo.