![a5ad796d9abdb22d88982cf0f9d95f6.jpg]
![4db5b7c94cde2772f8cc13f2686a3d4.jpg]
![2b5d04a83093072452b072691576878.jpg]
![4de0420b81 942c2e58bf82800e679d9.jpg]
There are a few keys without keycaps. Please forgive me.
If you install the positioning plate, it will probably cost 50 yuan. Please use acrylic
shape from < https://oshwhub.com/hirykun/megupad_v2-0-yuan-li-tu>, so the screw can check his, make modifications, and the most important thing is to align the origin! OCD feels much better.
The stickers are basically Genshin Impact pictures. If you don’t like it, please replace it
# 1. System description
uses AIR32F103CBT6 chip, RGB is SPI driver WS2812, with 0.96-inch OLED, AT24C128 for storage, hot-swappable buttons, and uses diodes to achieve full The key has no rollover design, and the knob can currently only adjust the volume.
Note 1: OLED cannot directly weld pin headers. It needs to be welded against the upper board, otherwise the upper board cannot be installed. Note 2: The OLED module automatically With pull-up resistors, r9 and r8 do not need to be soldered. If there is no oled, they need to be soldered. # 2. Software description
## 2.1 QMK firmware description.
I have tried QMK firmware. I will also send out the configuration plan later. qmk can To achieve without external eeprom storage, you can use via, but it is not recommended. There are the following problems:
1. ws2812 cannot use spi or pwm driver, it should be a problem with air32
. 2. OLED mounts the i2C bus of PB8 PB9, compile the qmk firmware and download it It will get stuck and cannot run. It can run without i2c. It should also be a problem with air32.
## 2.2 Self-made firmware
is used to solve the shortcomings of qmk, including I think qmk's
1. The degree of customization is not high and many of them are invisible
. 2. Each compilation consumes Shi Chaojiu
3. The VIA software is really difficult to use
and other reasons.
I wrote the software myself. The overall framework of the software can be viewed in the source code. The basic idea is the same as the previous keyboard, but that keyboard was my first complex design. There were many problems, including the crystal oscillator. , USB is placed randomly, resistors and capacitors are randomly placed, etc. Currently, the following functions are mainly implemented:
1. Key input (up to 14 keys at a time, in fact, it can theoretically support 62 keys at the same time, but too many are useless)
2. Mouse function simulation
3. Offline setting, you can switch the keyboard layer, RGB, OLED sleep time, brightness, mouse, wheel movement distance on the keyboard
4. Volume control
5. UF2 firmware update, no downloader is needed after one download
6. Use RTX5 embedded OS programming, strong scalability, air32 frequency is 144Mhz, theoretically faster than 32
# 3. Instructions for use
## 3.1 Download instructions
1. For the first download, please use the downloader to download the uf2boot.bin file, and then press Hold down the knob button and insert USB to enter uf2 mode. A USB flash drive will appear on the computer. Drag the uf2 format file into it to complete the download. The starting address of the uf2 file is 0x8004000
2. The flashing light indicates uf download mode
## 3.2 Instructions for Use
# ## 3.2.1 Use the host computer
! [Snipaste_2022-10-09_16-53-02.png]
There will be multiple ones after refreshing. Please try to connect the VID and PID devices as shown in the picture. The connection will be successful. Connect If it doesn't, it will prompt that the connection failed. If it doesn't work, please try to unplug and plug again. If you connect to Guo once, it will be recorded and you can connect directly next time.
![Snipaste_2022-10-09_16-56-46.png]
After the connection is successful, you need to read the layer number first, and then read the button configuration. After that, click the button to display the current button status, and click Change Configuration to change it
![ image.png]
It is recommended to enter the key in the input capture box, and the key will be added automatically. However, please note that deletion must be done in the key value box. In fact, "+" is used as the separator, so you can also enter it yourself. The key name is on the right. , must be correct, otherwise an error will be prompted
! [image.png]
After confirming the key, you can read it without clicking re-read. Re-read is only applicable to clicking a single key to read.
The lighting control of this key will be clear at a glance. I won’t say more.
Note: The button layer is switched on the slave computer. If the host computer does not read it, the switching layer will not be displayed. If you change the button on the 1st floor of the host computer, if the slave computer is on the 2nd floor, The modification buttons are also 2-layered ### 3.2.2 Description of the lower computer
The key layout of the lower computer is the same as that of the upper computer. Here we say that the corresponding positions of the keys are the same as those of the upper computer
#### 3.2.2.1 Layer switching
of the lower computer There are 5 layers in total, which are the button 123 layer, RGB and OLED setting layer. For the mouse layer,
press and hold the knob button, and then click 4 or 6 to switch back and forth. Release after switching
#### 3.2.2.2 RGB and OLED settings
release Knobs
1. 8 and 9 control R size
2. 9 and 12 control G size
3. 10 and 11 control B size
4. 7 and 14 control RGB mode (of which mode 8 is not available yet)
5. 4 and 5 control oled brightness
6. 1 and 2 control the OLED sleep time
#### 3.2.2.3 Mouse settings
release the button
1. 5 12 8 10 are the mouse up, down, left and right
2. 4 and 6 left and right mouse buttons
3. 9 is the middle
4. 7 and 14 bits Scroll wheel
5. 11 and 13 are the mouse movement distance. Xiuhai
6. 1 and 2 are the scroll wheel distance. Modification
# 4. Secondary development instructions
Note: Secondary development requires experience. Because the program xjb is written randomly and has many differences compared to stm32, it can be used universally in theory, but some writing needs to be revised # # 4.1 Replace other 32 instructions
1. The whole generation is using stm32cubemx, but many magical changes have been made. Directly using ioc to generate will replace many modified files. Please back up the USB library and main.c file reasonably 2. ``
in mian.c
`
USB_Port_Set(0);
HAL_Delay(100);
USB_Port_Set(1);
```
This is a dedicated implementation of USB re-enumeration for air32
3. SystemClock_Config(); has been completely modified to make the system frequency 144mhz
4. Although mdk is used Programming, but using vscode's eide, you cannot use mdk directly. If you want to use it, you need to add relevant files. After installing eide with vscode, you should be able to import it directly
## 4.2 Other instructions
1. The host computer is written in vs2022 c# .net4.6 and called hidsharp library
2. When viewing the code, it is recommended to start with rtx5.c. Because rtos is used, here are the threads created. Try to use one function and one file for the file
! [image.png]
3. The following settings in eide need to be noted, the installation directory is different , need to add a reference
![image.png]
4. The starting address is as follows
![image.png]
The interrupt vector table needs to be added at the beginning of main.c to remap to 0x8004000
5. Converting the uf2 format requires cooperation with the script and adding post-generation tasks
![ image.png]
6. The uf2.bin firmware compilation environment is ubuntu 16.04
# The work that has not yet been completed
1. The host computer is picking up leaks
2. There is no animation in OLED
3. The typec lacks two cc 5.1k resistors, and there may be a problem with the c to c line