|
1 |
| -# SH68F90A / BYK916 / NuPhy Air60 Experiments |
| 1 | +# SMK - Small (device) Mechanical Keyboard Firmware |
2 | 2 |
|
3 |
| -A repository to test various features of the Sinowealth SH68F90A 8051-based microcontroller (also labeled as BYK916) on the [NuPhy Air60](https://nuphy.com/products/air60) keyboard. |
| 3 | +This is a keyboard firmware similar to [QMK](https://github.com/qmk/qmk_firmware), but targeting 8051-based devices like the Sinowealth SH68F90A (labeled as BYK916). It's aimed to be at least partially compatible with QMK configurations. |
4 | 4 |
|
5 |
| -## Features |
| 5 | +The S (Small) in SMK comes from this firmware using [SDCC](https://sdcc.sourceforge.net/) to build itself. |
6 | 6 |
|
7 |
| -### MCU |
| 7 | +## ⚠️ WARNING ⚠️ |
8 | 8 |
|
9 |
| -- [x] 3.3V LDO |
10 |
| -- [x] CPU Clock (use 24Mhz as SYSCLK) |
11 |
| -- [x] GPIO |
12 |
| -- [x] UART |
13 |
| - - [x] Transmit |
14 |
| - - [ ] Receive |
15 |
| -- [x] PWM |
16 |
| -- [ ] SPI |
17 |
| -- [ ] USB |
| 9 | +This firmware is still highly experimental, so be cautious when trying to use it or extend it. |
18 | 10 |
|
19 |
| -### Keyboard |
| 11 | +You can very easily end up with a bricked device if the written firmware can't jump back into ISP mode, so before testing or modifying it, it's best to have a full dump of your stock firmware and a tool (like the Sinolink) that can write it back. |
20 | 12 |
|
21 |
| -- [x] ISP (jump) |
22 |
| -- [x] Key Scan |
23 |
| -- [x] RGB Matrix |
24 |
| -- [ ] USB HID |
25 |
| -- [ ] Wireless |
| 13 | +## Supported Devices |
26 | 14 |
|
27 |
| -## Code Options |
| 15 | +| Keyboard | MCU | ISP | USB | Wireless | Details | |
| 16 | +| -------- | --- | --- | --- | -------- | ------- | |
| 17 | +| [NuPhy Air60 v1](https://nuphy.com/products/air60) | SH68F90A / BYK916 | ✅ | ✅ | TBD | [Details](docs/nuphy-air60.md) | |
28 | 18 |
|
29 |
| -All code uses the following code options for SH68F90A |
| 19 | +## Acknowledgements |
30 | 20 |
|
31 |
| -``` |
32 |
| -Code Option String: A4E063C00F000088 |
33 |
| -Code Option Number: 0x8800000fc063e0a4 |
34 |
| -
|
35 |
| -Byte 0 - A4 |
36 |
| -OP_OSCDRIVE 2 - 4MHz crystal or 8~12MHz crystal with external capacitance(C1=C2)<20pF |
37 |
| -OP_RST 1 - P0.2 used as IO pin |
38 |
| -OP_WMT 0 - longest warm up time |
39 |
| -OP_SCMEN 1 - Disable SCM |
40 |
| -OP_OSCRFB 0 - 150K |
41 |
| -
|
42 |
| -Byte 1 - E0 |
43 |
| -OP_LVREN 1 - Enable LVR function |
44 |
| -OP_LVRLEVEL 3 - 2.1V LVR level4 |
45 |
| -OP_SCM 0 - SCM is invalid in warm up period |
46 |
| -OP_OSC2SEL 0 - OSC2 select 12M RC |
47 |
| -OP_IOV1 0 - P7.1/P7.2/P7.3/P7.4 input/output level is VUSB(5V) |
48 |
| -OP_IOV0 0 - P5.5/P5.6 input/output level is VUSB(5V) |
49 |
| -
|
50 |
| -Byte 2 - 63 |
51 |
| -OP_SCMSEL 3 - 8MHz |
52 |
| -OP_OSC 3 - Oscillator1 is internal 128KHz RC, oscillator2 is internal 24MHz RC |
53 |
| -
|
54 |
| -Byte 3 - C0 |
55 |
| -OP_ISP 1 - Disable ISP function |
56 |
| -OP_ISPPIN 1 - Enter ISP mode only when P6.3 and P6.4 are connected to GND, simultaneously |
57 |
| -OP_WDT 0 - Enable WDT function |
58 |
| -OP_WDTPD 0 - Disable WDT function in Power-Down mode |
59 |
| -
|
60 |
| -Byte 4 - 0F |
61 |
| -OP_SINK1 3 - Port6[5:0] sink ability largest mode(380mA) |
62 |
| -OP_SINK0 3 - P4.7/Port7[7:5] sink ability largest mode(50mA) |
63 |
| -
|
64 |
| -Byte 5 - 00 |
65 |
| -OP_BOPTP 0 - (1+21%)tr min |
66 |
| -OP_BOPTN 0 - (1+21%)tf min |
67 |
| -
|
68 |
| -Byte 6 - 00 |
69 |
| -Unused |
70 |
| -
|
71 |
| -Byte 7 - 88 |
72 |
| -OP_ISPSIZE 8 - 0Bytes |
73 |
| -``` |
| 21 | +* [libfx2](https://github.com/whitequark/libfx2) |
| 22 | +* [LUFA](https://github.com/abcminiuser/lufa) |
| 23 | +* [QMK](https://github.com/qmk/qmk_firmware) |
0 commit comments