|
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 | +## ⚠️ WARNING ⚠️ |
6 | 6 |
|
7 |
| -### MCU |
| 7 | +This firmware is still highly experimental, so be cautious when trying to use it or extend it. |
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 |
| -- [x] USB |
17 |
| -- [ ] SPI |
| 9 | +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. |
18 | 10 |
|
19 |
| -### Keyboard |
| 11 | +## Supported Devices |
20 | 12 |
|
21 |
| -- [x] ISP (jump) |
22 |
| -- [x] Key Scan |
23 |
| -- [x] RGB Matrix |
24 |
| - - [ ] Debouncing |
25 |
| -- [x] USB HID |
26 |
| - - [x] USB Keyboard |
27 |
| - - [ ] Status LEDs |
28 |
| - - [ ] Extra Keys (System / Consumer) |
29 |
| - - [ ] NKRO |
30 |
| -- [ ] QMK Compatibility |
31 |
| - - [ ] Layouts |
32 |
| -- [ ] Wireless |
| 13 | +| Keyboard | MCU | ISP | USB | Wireless | Details | |
| 14 | +| -------- | --- | --- | --- | -------- | ------- | |
| 15 | +| [NuPhy Air60 v1](https://nuphy.com/products/air60) | SH68F90A / BYK916 | ✅ | ✅ | TBD | [Details](docs/nuphy-air60.md) | |
33 | 16 |
|
34 |
| -## Code Options |
| 17 | +## Acknowledgements |
35 | 18 |
|
36 |
| -All code uses the following code options for SH68F90A |
37 |
| - |
38 |
| -``` |
39 |
| -Code Option String: A4E063C00F000088 |
40 |
| -Code Option Number: 0x8800000fc063e0a4 |
41 |
| -
|
42 |
| -Byte 0 - A4 |
43 |
| -OP_OSCDRIVE 2 - 4MHz crystal or 8~12MHz crystal with external capacitance(C1=C2)<20pF |
44 |
| -OP_RST 1 - P0.2 used as IO pin |
45 |
| -OP_WMT 0 - longest warm up time |
46 |
| -OP_SCMEN 1 - Disable SCM |
47 |
| -OP_OSCRFB 0 - 150K |
48 |
| -
|
49 |
| -Byte 1 - E0 |
50 |
| -OP_LVREN 1 - Enable LVR function |
51 |
| -OP_LVRLEVEL 3 - 2.1V LVR level4 |
52 |
| -OP_SCM 0 - SCM is invalid in warm up period |
53 |
| -OP_OSC2SEL 0 - OSC2 select 12M RC |
54 |
| -OP_IOV1 0 - P7.1/P7.2/P7.3/P7.4 input/output level is VUSB(5V) |
55 |
| -OP_IOV0 0 - P5.5/P5.6 input/output level is VUSB(5V) |
56 |
| -
|
57 |
| -Byte 2 - 63 |
58 |
| -OP_SCMSEL 3 - 8MHz |
59 |
| -OP_OSC 3 - Oscillator1 is internal 128KHz RC, oscillator2 is internal 24MHz RC |
60 |
| -
|
61 |
| -Byte 3 - C0 |
62 |
| -OP_ISP 1 - Disable ISP function |
63 |
| -OP_ISPPIN 1 - Enter ISP mode only when P6.3 and P6.4 are connected to GND, simultaneously |
64 |
| -OP_WDT 0 - Enable WDT function |
65 |
| -OP_WDTPD 0 - Disable WDT function in Power-Down mode |
66 |
| -
|
67 |
| -Byte 4 - 0F |
68 |
| -OP_SINK1 3 - Port6[5:0] sink ability largest mode(380mA) |
69 |
| -OP_SINK0 3 - P4.7/Port7[7:5] sink ability largest mode(50mA) |
70 |
| -
|
71 |
| -Byte 5 - 00 |
72 |
| -OP_BOPTP 0 - (1+21%)tr min |
73 |
| -OP_BOPTN 0 - (1+21%)tf min |
74 |
| -
|
75 |
| -Byte 6 - 00 |
76 |
| -Unused |
77 |
| -
|
78 |
| -Byte 7 - 88 |
79 |
| -OP_ISPSIZE 8 - 0Bytes |
80 |
| -``` |
| 19 | +* [libfx2](https://github.com/whitequark/libfx2) |
| 20 | +* [LUFA](https://github.com/abcminiuser/lufa) |
| 21 | +* [QMK](https://github.com/qmk/qmk_firmware) |
0 commit comments