Skip to content

Commit b327ec4

Browse files
committed
new docs
1 parent 2f480e9 commit b327ec4

File tree

2 files changed

+89
-72
lines changed

2 files changed

+89
-72
lines changed

README.md

Lines changed: 13 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,21 @@
1-
# SH68F90A / BYK916 / NuPhy Air60 Experiments
1+
# SMK - Small (device) Mechanical Keyboard Firmware
22

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.
44

5-
## Features
5+
## ⚠️ WARNING ⚠️
66

7-
### MCU
7+
This firmware is still highly experimental, so be cautious when trying to use it or extend it.
88

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.
1810

19-
### Keyboard
11+
## Supported Devices
2012

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) |
3316

34-
## Code Options
17+
## Acknowledgements
3518

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)

docs/nuphy-air60.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# NuPhy Air60 Support
2+
3+
## MCU
4+
5+
- [x] 3.3V LDO
6+
- [x] CPU Clock (use 24Mhz as SYSCLK)
7+
- [x] GPIO
8+
- [x] UART
9+
- [x] Transmit
10+
- [ ] Receive
11+
- [x] PWM
12+
- [x] USB
13+
- [ ] SPI
14+
15+
## Keyboard
16+
17+
- [x] ISP (jump)
18+
- [x] Key Scan
19+
- [x] RGB Matrix
20+
- [ ] Debouncing
21+
- [x] USB HID
22+
- [x] USB Keyboard
23+
- [ ] Status LEDs
24+
- [ ] Extra Keys (System / Consumer)
25+
- [ ] NKRO
26+
- [ ] QMK Compatibility
27+
- [ ] Layouts
28+
- [ ] Wireless
29+
30+
## Code Options
31+
32+
This firmware requires the following (stock) code options for SH68F90A
33+
34+
```
35+
Code Option String: A4E063C00F000088
36+
Code Option Number: 0x8800000fc063e0a4
37+
38+
Byte 0 - A4
39+
OP_OSCDRIVE 2 - 4MHz crystal or 8~12MHz crystal with external capacitance(C1=C2)<20pF
40+
OP_RST 1 - P0.2 used as IO pin
41+
OP_WMT 0 - longest warm up time
42+
OP_SCMEN 1 - Disable SCM
43+
OP_OSCRFB 0 - 150K
44+
45+
Byte 1 - E0
46+
OP_LVREN 1 - Enable LVR function
47+
OP_LVRLEVEL 3 - 2.1V LVR level4
48+
OP_SCM 0 - SCM is invalid in warm up period
49+
OP_OSC2SEL 0 - OSC2 select 12M RC
50+
OP_IOV1 0 - P7.1/P7.2/P7.3/P7.4 input/output level is VUSB(5V)
51+
OP_IOV0 0 - P5.5/P5.6 input/output level is VUSB(5V)
52+
53+
Byte 2 - 63
54+
OP_SCMSEL 3 - 8MHz
55+
OP_OSC 3 - Oscillator1 is internal 128KHz RC, oscillator2 is internal 24MHz RC
56+
57+
Byte 3 - C0
58+
OP_ISP 1 - Disable ISP function
59+
OP_ISPPIN 1 - Enter ISP mode only when P6.3 and P6.4 are connected to GND, simultaneously
60+
OP_WDT 0 - Enable WDT function
61+
OP_WDTPD 0 - Disable WDT function in Power-Down mode
62+
63+
Byte 4 - 0F
64+
OP_SINK1 3 - Port6[5:0] sink ability largest mode(380mA)
65+
OP_SINK0 3 - P4.7/Port7[7:5] sink ability largest mode(50mA)
66+
67+
Byte 5 - 00
68+
OP_BOPTP 0 - (1+21%)tr min
69+
OP_BOPTN 0 - (1+21%)tf min
70+
71+
Byte 6 - 00
72+
Unused
73+
74+
Byte 7 - 88
75+
OP_ISPSIZE 8 - 0Bytes
76+
```

0 commit comments

Comments
 (0)