update md
114
HW/README.md
@ -1,21 +1,117 @@
|
||||
# Taiko Input 硬件
|
||||
|
||||
Taiko Input 硬件
|
||||
|
||||
分为双鼓与单鼓硬件,双鼓设计用于街机
|
||||
分为双鼓与单鼓硬件,双鼓设计用于街机,单鼓的硬件则是双鼓硬件简单地切去一半输入前端设计的,在硬件上两者并无很大的差异。
|
||||
|
||||
[ENG](./README_EN.md)
|
||||
|
||||
[主页](../)
|
||||
|
||||
<br/>
|
||||
|
||||
## 硬件结构
|
||||
|
||||
整体系统分为传感器(鼓)、前端、采样、USB、PC,其中前端、采样、USB三部分位于input硬件上。
|
||||
除此之外还,有电源、滤波电路等未在结构图中体现。
|
||||
|
||||
![硬件结构图](./img/hardware.png "硬件结构图")
|
||||
|
||||
<center>硬件结构</center>
|
||||
|
||||
<br/>
|
||||
|
||||
## 前端电路
|
||||
|
||||
前端电路采用了与SIF Board近似的设计,先进行信号的放大与积分,再限制输出。
|
||||
|
||||
|
||||
![前端电路](./img/frontend.png "前端电路")
|
||||
<center>其中一路前端电路</center>
|
||||
|
||||
<br/>
|
||||
|
||||
![前端电路测试信号](./img/soc.png "前端电路测试信号")
|
||||
|
||||
<br/>
|
||||
|
||||
由于来自压电传感器的信号带宽高且信号幅值小,不宜直接进行采样。前端电路将输入信号处理成便于采样的信号。
|
||||
在示波器截图中,C1(黄色)为传感器输出,C3(红色)为经过前端电路处理后的信号,C2(蓝色)为程序识别后的输出。
|
||||
|
||||
<br/>
|
||||
|
||||
## 硬件
|
||||
|
||||
|
||||
硬件分为双鼓硬件和单鼓硬件,双鼓硬件为完整版的硬件,
|
||||
单鼓硬件为双鼓硬件删去一半输入电路的硬件,软件上兼容了更多的单人应用场景。
|
||||
|
||||
### 双鼓硬件
|
||||
[硬件工程](./taiko-io/)
|
||||
[原理图]
|
||||
|
||||
[硬件工程](./taiko-io/)
|
||||
[原理图](./taiko-io/new_io.pdf)
|
||||
|
||||
![双鼓的硬件3d图](./img/new_io_3d.png "双鼓的硬件3d图")
|
||||
<center>双鼓的硬件3d图</center>
|
||||
|
||||
<br/>
|
||||
|
||||
#### 接口
|
||||
|
||||
- ① 两个单鼓输入的接口,接口定义借鉴了大力鼓(Taiko Force)。
|
||||
- ② 一个双鼓的输入接口,可以焊接IDC-16P牛角连接器,或者焊接XAD连接器(B16B-XADSS-N)以兼容不同接口的双太鼓。
|
||||
- ③ 配置USB接口,用于配置采样单片机。
|
||||
- ④ 太鼓usb接口,插入电脑会枚举成一个USB-HID键盘设备,用于接收太鼓的数据。
|
||||
- ⑤ service按键输入,焊接XAD连接器或IDC连接器,以连接不同的按键面板。其中16P接口用于自定义的连接,36P用于12亚的IO板接口,40P用于更新框体的IO板接口。
|
||||
- ⑥ stm32烧录接口和配置串口。
|
||||
- ⑦ CH552/CH554的boot控制位。
|
||||
|
||||
<br/>
|
||||
|
||||
### 单鼓硬件
|
||||
[硬件工程](./taiko-io-mini/)
|
||||
[原理图](./taiko-io-mini/Taiko_input_x4.pdf)
|
||||
|
||||
![单鼓的硬件3d图](./img/taiko_input_x4_3d.png "单鼓的硬件3d图")
|
||||
<center>单鼓的硬件3d图</center>
|
||||
|
||||
<br/>
|
||||
|
||||
#### 接口
|
||||
|
||||
- 只能连接一个鼓的4路传感器,接口定义借鉴了大力鼓(Taiko Force)的接口。
|
||||
- 四个按键用于启动的模式选择和其他按键。
|
||||
|
||||
<br/> <br/>
|
||||
|
||||
|
||||
## 装配
|
||||
|
||||
### 双鼓硬件
|
||||
|
||||
双鼓硬件不设计外盒,借鉴街机的装配方式为使用螺柱直接装配。
|
||||
|
||||
![装配尺寸图](./img/instructions.png "装配尺寸图")
|
||||
<center>装配尺寸图</center>
|
||||
|
||||
<br/>
|
||||
|
||||
### 单鼓硬件
|
||||
[硬件工程](./taiko-io-mini/)
|
||||
[原理图]
|
||||
|
||||
单鼓的硬件使用了一款较通用的胶盒,可以较为方便的携带和连接。
|
||||
|
||||
|
||||
![装配示意图1](./img/img1.png "装配示意图1")
|
||||
<center>装配示意图1</center>
|
||||
|
||||
<br/>
|
||||
|
||||
![装配示意图2](./img/img2.png "装配示意图2")
|
||||
<center>装配示意图2</center>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 前端原理
|
||||
采用了与SIF Board相同的设计
|
||||
|
||||
<center>图注</center>
|
||||
模拟前端主要是将鼓传感器的脉冲信号放大后积分,使信号明显可采样,然后进行了半波整流。处理后的信号直接输入给了采样单片机。
|
||||
|
||||
|
BIN
HW/img/frontend.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
HW/img/hardware.png
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
HW/img/img1.png
Normal file
After Width: | Height: | Size: 956 KiB |
BIN
HW/img/img2.png
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
HW/img/instructions.png
Normal file
After Width: | Height: | Size: 220 KiB |
BIN
HW/img/new_io_3d.png
Normal file
After Width: | Height: | Size: 876 KiB |
BIN
HW/img/soc.png
Normal file
After Width: | Height: | Size: 466 KiB |
BIN
HW/img/taiko_input_x4_3d.png
Normal file
After Width: | Height: | Size: 210 KiB |
611
HW/taiko-io-mini/JIC_project/PCB_Taiko_input_x4_2023-06-22.json
Normal file
433
HW/taiko-io-mini/JIC_project/SCH_Taiko_input_x4_2023-06-22.json
Normal file
14270
HW/taiko-io-mini/Taiko_input_x4.pdf
Normal file
@ -9153,14 +9153,10 @@
|
||||
(effects (font (size 1 1) (thickness 0.15)))
|
||||
(tstamp 71e632f0-c31b-4925-b09b-7fd980a035d5)
|
||||
)
|
||||
(fp_line (start -3.97 -3.61) (end -3.97 21.39)
|
||||
(stroke (width 0.3) (type solid)) (layer "F.SilkS") (tstamp 99bf2662-4c79-4ad5-93ce-fbcce68d3841))
|
||||
(fp_line (start -3.97 -3.61) (end 6.13 -3.61)
|
||||
(stroke (width 0.3) (type solid)) (layer "F.SilkS") (tstamp 4072f5c9-aae2-4a41-ab52-fb491c03e529))
|
||||
(fp_line (start -3.92 -0.11) (end -2.92 -0.11)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp b7f20538-f816-44e0-bfd6-329ff129a551))
|
||||
(fp_line (start -3.92 16.39) (end -2.92 16.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 18b39eca-7b83-452a-a6e0-8f1d42235466))
|
||||
(fp_line (start -3.95 -3.61) (end -3.95 21.39)
|
||||
(stroke (width 0.3) (type solid)) (layer "F.SilkS") (tstamp b2700423-8843-41a7-8162-b6193c0975f9))
|
||||
(fp_line (start -3.95 -3.61) (end 6.15 -3.61)
|
||||
(stroke (width 0.3) (type solid)) (layer "F.SilkS") (tstamp a3282669-21c6-4b86-b6d6-ab2dacc2f667))
|
||||
(fp_line (start -3.24 -11.08) (end -3.24 -4.064)
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp f762c882-a04e-48b6-9187-4dd8fe5c13d7))
|
||||
(fp_line (start -3.24 -11.08) (end 5.78 -11.08)
|
||||
@ -9169,18 +9165,10 @@
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp c88aa45e-eb09-4bf4-8c97-8df28509a584))
|
||||
(fp_line (start -3.24 28.86) (end 5.78 28.86)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 7226ec8e-5df7-4f39-8da1-5d320383b6a2))
|
||||
(fp_line (start -2.92 -2.61) (end 2.08 -2.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp ad6adb9a-0b94-4d48-910f-85c450a2a1fa))
|
||||
(fp_line (start -2.92 -0.11) (end -2.92 -2.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 09a379cc-2f03-4bae-bcd3-94e106334979))
|
||||
(fp_line (start -2.92 0.89) (end -3.92 0.89)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 692ac1de-65fc-4100-8f98-dc8ac410fe4a))
|
||||
(fp_line (start -2.92 16.39) (end -2.92 0.89)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp f4be9776-0860-4ee9-a35f-d398bc8e7cd0))
|
||||
(fp_line (start -2.92 17.39) (end -3.92 17.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp b25879f2-95af-4183-a090-2953958e1a80))
|
||||
(fp_line (start -2.92 20.39) (end -2.92 17.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp f982a66a-50c3-4e8c-8560-1a54fc548e43))
|
||||
(fp_line (start -2.9 -2.61) (end -0.9 -2.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp d8ac3fee-1dd3-40e1-8b76-04eb34e141eb))
|
||||
(fp_line (start -2.9 20.39) (end -2.9 -2.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 68686253-3ab6-4c31-89ba-970abfabe2ec))
|
||||
(fp_line (start -2.794 6.84) (end -1.93 6.84)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 85b9d8a9-1032-4852-ba41-d2d859282a50))
|
||||
(fp_line (start -1.93 -3.92) (end 4.47 -3.92)
|
||||
@ -9193,35 +9181,47 @@
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp de0af0dc-06b0-4186-a579-3c5cced2354a))
|
||||
(fp_line (start -1.93 20.066) (end -1.93 10.94)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 97324d2d-0f47-4f9d-b070-c33657cf4ecd))
|
||||
(fp_line (start 2.08 -2.61) (end 2.08 -3.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 327451f8-5d70-41ac-9100-13de9cf9539d))
|
||||
(fp_line (start 2.08 20.39) (end -2.92 20.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 75cc1e05-952e-4915-8257-a22aa7b64833))
|
||||
(fp_line (start 2.08 21.39) (end 2.08 20.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 61e64ccf-14ab-466d-aa41-0f7277d5ece8))
|
||||
(fp_line (start 3.08 -3.61) (end 3.08 -2.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp a88b23f6-dafa-40a6-a0f3-04875e8d6041))
|
||||
(fp_line (start 3.08 -2.61) (end 5.08 -2.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp ae047b2e-fff4-4235-ae3a-e9fb674749aa))
|
||||
(fp_line (start 3.08 20.39) (end 3.08 21.39)
|
||||
(fp_line (start -0.9 -2.61) (end -0.9 -3.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 359cab89-b689-42fb-b471-c5aaa06bb6bd))
|
||||
(fp_line (start -0.9 20.39) (end -2.9 20.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp ae047b2e-fff4-4235-ae3a-e9fb674749aa))
|
||||
(fp_line (start -0.9 21.39) (end -0.9 20.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp a88b23f6-dafa-40a6-a0f3-04875e8d6041))
|
||||
(fp_line (start 0.1 -3.61) (end 0.1 -2.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 61e64ccf-14ab-466d-aa41-0f7277d5ece8))
|
||||
(fp_line (start 0.1 -2.61) (end 5.1 -2.61)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 75cc1e05-952e-4915-8257-a22aa7b64833))
|
||||
(fp_line (start 0.1 20.39) (end 0.1 21.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 327451f8-5d70-41ac-9100-13de9cf9539d))
|
||||
(fp_line (start 4.47 -2.286) (end 4.47 20.066)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp c6d236a4-3a98-4135-85c4-3b45a54bb384))
|
||||
(fp_line (start 4.47 21.7) (end -1.93 21.7)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 4dbf4200-103c-4f21-a2e2-1862039eb9f4))
|
||||
(fp_line (start 5.08 -2.61) (end 5.08 20.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 68686253-3ab6-4c31-89ba-970abfabe2ec))
|
||||
(fp_line (start 5.08 20.39) (end 3.08 20.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp d8ac3fee-1dd3-40e1-8b76-04eb34e141eb))
|
||||
(fp_line (start 5.1 -2.61) (end 5.1 0.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp f982a66a-50c3-4e8c-8560-1a54fc548e43))
|
||||
(fp_line (start 5.1 0.39) (end 6.1 0.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp b25879f2-95af-4183-a090-2953958e1a80))
|
||||
(fp_line (start 5.1 1.39) (end 5.1 16.89)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp f4be9776-0860-4ee9-a35f-d398bc8e7cd0))
|
||||
(fp_line (start 5.1 16.89) (end 6.1 16.89)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 692ac1de-65fc-4100-8f98-dc8ac410fe4a))
|
||||
(fp_line (start 5.1 17.89) (end 5.1 20.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 09a379cc-2f03-4bae-bcd3-94e106334979))
|
||||
(fp_line (start 5.1 20.39) (end 0.1 20.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp ad6adb9a-0b94-4d48-910f-85c450a2a1fa))
|
||||
(fp_line (start 5.78 -11.08) (end 5.78 -4.064)
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp 1f325096-e737-4144-8814-d2913446e875))
|
||||
(fp_line (start 5.78 28.86) (end 5.78 21.844)
|
||||
(stroke (width 0.12) (type default)) (layer "F.SilkS") (tstamp a08e4fbb-9b9b-4707-85f3-ca5c32def4bd))
|
||||
(fp_line (start 6.13 21.39) (end -3.97 21.39)
|
||||
(stroke (width 0.3) (type solid)) (layer "F.SilkS") (tstamp a3282669-21c6-4b86-b6d6-ab2dacc2f667))
|
||||
(fp_line (start 6.13 21.39) (end 6.13 -3.61)
|
||||
(stroke (width 0.3) (type solid)) (layer "F.SilkS") (tstamp b2700423-8843-41a7-8162-b6193c0975f9))
|
||||
(fp_rect (start -3.208 12.7) (end -3.97 5.08)
|
||||
(fp_line (start 6.1 1.39) (end 5.1 1.39)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp 18b39eca-7b83-452a-a6e0-8f1d42235466))
|
||||
(fp_line (start 6.1 17.89) (end 5.1 17.89)
|
||||
(stroke (width 0.12) (type solid)) (layer "F.SilkS") (tstamp b7f20538-f816-44e0-bfd6-329ff129a551))
|
||||
(fp_line (start 6.15 21.39) (end -3.95 21.39)
|
||||
(stroke (width 0.3) (type solid)) (layer "F.SilkS") (tstamp 4072f5c9-aae2-4a41-ab52-fb491c03e529))
|
||||
(fp_line (start 6.15 21.39) (end 6.15 -3.61)
|
||||
(stroke (width 0.3) (type solid)) (layer "F.SilkS") (tstamp 99bf2662-4c79-4ad5-93ce-fbcce68d3841))
|
||||
(fp_rect (start 5.388 5.08) (end 6.15 12.7)
|
||||
(stroke (width 0.12) (type solid)) (fill none) (layer "F.SilkS") (tstamp cbddaf1f-0cdb-4be8-81e1-787ec6e00c6f))
|
||||
(fp_rect (start -3.556 -11.43) (end 6.096 29.21)
|
||||
(stroke (width 0.12) (type solid)) (fill none) (layer "F.CrtYd") (tstamp 489eaca4-5006-4313-b6c3-a25874c53cec))
|
||||
@ -16360,7 +16360,7 @@
|
||||
(gr_text "FND" (at 99.441 43.434) (layer "F.SilkS") (tstamp 3da0372b-6b0a-4eab-999b-34913110776b)
|
||||
(effects (font (size 1.016 0.889) (thickness 0.2032) bold))
|
||||
)
|
||||
(gr_text "SENSOR INPUT" (at 25.019 47.625 270) (layer "F.SilkS") (tstamp 3f3ae4e6-819f-4c6f-9018-8542d57c6abe)
|
||||
(gr_text "SENSOR INPUT" (at 24.9 47.65 270) (layer "F.SilkS") (tstamp 3f3ae4e6-819f-4c6f-9018-8542d57c6abe)
|
||||
(effects (font (size 1.016 1.016) (thickness 0.2032) bold) (justify left bottom))
|
||||
)
|
||||
(gr_text "USB" (at 99.441 45.085) (layer "F.SilkS") (tstamp 53f7dd9d-652f-4ad9-b6ca-a9592b7a55da)
|
||||
@ -16396,13 +16396,13 @@
|
||||
(gr_text "FRONT-END" (at 38.1 33.782) (layer "F.SilkS") (tstamp 97781c3a-cc15-43c4-8178-e10e95ed3e8c)
|
||||
(effects (font (size 1 1) (thickness 0.2032) bold) (justify left bottom))
|
||||
)
|
||||
(gr_text "1" (at 24.638 60.452 270) (layer "F.SilkS") (tstamp a08926e6-86f9-45d9-b160-a91eb8e8e0ad)
|
||||
(gr_text "1" (at 24.55 60.466 270) (layer "F.SilkS") (tstamp a08926e6-86f9-45d9-b160-a91eb8e8e0ad)
|
||||
(effects (font (size 1.27 1.27) (thickness 0.254) bold) (justify left bottom))
|
||||
)
|
||||
(gr_text "8" (at 24.638 105.41 270) (layer "F.SilkS") (tstamp a3b75dde-5f87-458e-bdbe-ab6c419b46de)
|
||||
(effects (font (size 1.27 1.27) (thickness 0.254) bold) (justify left bottom))
|
||||
)
|
||||
(gr_text "8" (at 24.638 78.486 270) (layer "F.SilkS") (tstamp a8f498ad-8b4f-4b97-b09b-1f87e069b598)
|
||||
(gr_text "8" (at 24.55 78.5 270) (layer "F.SilkS") (tstamp a8f498ad-8b4f-4b97-b09b-1f87e069b598)
|
||||
(effects (font (size 1.27 1.27) (thickness 0.254) bold) (justify left bottom))
|
||||
)
|
||||
(gr_text "1" (at 24.638 33.274 270) (layer "F.SilkS") (tstamp bc0080fa-d7d2-4c42-a48f-9f24b03b544e)
|
||||
|
@ -459,7 +459,7 @@
|
||||
"idf": "",
|
||||
"netlist": "",
|
||||
"specctra_dsn": "",
|
||||
"step": "",
|
||||
"step": "new_io.step",
|
||||
"vrml": ""
|
||||
},
|
||||
"page_layout_descr_file": ""
|
||||
|
@ -2556,7 +2556,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>下载大力鼓 默认配置</string>
|
||||
<string>Force DEF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -2587,7 +2587,7 @@
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>下载街机鼓 默认配置</string>
|
||||
<string>12Aisa DEF</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -1,53 +1,48 @@
|
||||
# 上位机
|
||||
QT,WIN64
|
||||
QT,WIN64
|
||||
上位机软件用于配置采样单片机的参数。
|
||||
|
||||
使用串口配置采样单片机的参数
|
||||
[EN](./README_EN.md)
|
||||
|
||||
[主页](../)
|
||||
|
||||
<br/>
|
||||
|
||||
[采样单片机软件](../Sampling-MCU/)
|
||||
<br/><br/>
|
||||
## 使用说明
|
||||
|
||||
![软件截图](./img/img.png "软件截图")
|
||||
<center>软件截图</center>
|
||||
|
||||
### 软件界面
|
||||
|
||||
A-鼓传感器通道顺序配置
|
||||
|
||||
B-输入配置-触发阈值(硬件上做了触发,软件配置这里没有很明显的效果)
|
||||
|
||||
C-输入配置-倍率(当某一路传感器异常灵敏或不灵敏时配置这里,C为复位)
|
||||
|
||||
D-输出时间配置,H为按下保持时间,L为松开保持时间,保持时间内不响应其他输入
|
||||
|
||||
E-屏蔽配置(用于计算鼓的物理结构带来的串音影响)
|
||||
|
||||
F-屏蔽配置-单次响应(选择后每次只会触发一个传感器)
|
||||
|
||||
G-屏蔽配置-计算回合数
|
||||
|
||||
H-一些默认参数
|
||||
|
||||
I-串口选择
|
||||
|
||||
J-选择上载板上的参数组
|
||||
|
||||
K-上载按键
|
||||
|
||||
L-下载按键(这一步不会存储)
|
||||
|
||||
M-保存按键
|
||||
|
||||
N-软件状态
|
||||
- A-鼓传感器通道顺序配置
|
||||
- B-输入配置-触发阈值(硬件上做了触发,软件配置这里没有很明显的效果)
|
||||
- C-输入配置-倍率(当某一路传感器异常灵敏或不灵敏时配置这里,C为复位)
|
||||
- D-输出时间配置,H为按下保持时间,L为松开保持时间,保持时间内不响应其他输入
|
||||
- E-屏蔽配置(用于计算鼓的物理结构带来的串音影响)
|
||||
- F-屏蔽配置-单次响应(选择后每次只会触发一个传感器)
|
||||
- G-屏蔽配置-计算回合数
|
||||
- H-一些默认参数
|
||||
- I-串口选择
|
||||
- J-选择上载板上的参数组
|
||||
- K-上载参数键
|
||||
- L-下载参数键(这一步不会存储,复位单片机会丢失数据)
|
||||
- M-保存参数键
|
||||
- N-软件状态
|
||||
|
||||
### 配置流程
|
||||
|
||||
1 选择串口,点击上载后,软件状态为Success
|
||||
- 1 选择串口,点击上载后,显示状态为Success(用于判断是否连接成功)
|
||||
- 2 根据需求重置预设参数,或上载旧的参数
|
||||
- 需要在旧参数的基础上修改的,选择Load Saved,再按上载参数键
|
||||
- 需要在默认配置基础上修改的,直接点按需要的默认配置按钮(两种默认配置只有鼓的映射不同)
|
||||
- 修改后,点击下载参数键后,在鼓上确认参数是否合理
|
||||
- 点击保存参数键
|
||||
|
||||
2 根据需求重置预设参数,
|
||||
<br/>
|
||||
|
||||
需要在板上存储的基础上修改的,选择Load Saved再按上载按键
|
||||
|
||||
需要在默认配置基础上修改的,直接点按默认配置按钮
|
||||
|
||||
3 修改后,点击下载按键后,在鼓上确认参数是否合理
|
||||
|
||||
4 点击保存按键
|
||||
## 其他说明
|
||||
- 使用单鼓硬件时,第二套鼓的参数无意义
|
||||
- 默认配置可能会存在问题,可以在默认参数的基础上进行微调以适应你的鼓
|
||||
- 鼓的传感器线顺序可以通过本上位机进行重映射
|
||||
|
||||
|
BIN
QT-APP/img/img.png
Normal file
After Width: | Height: | Size: 169 KiB |
87
README.md
@ -1,8 +1,87 @@
|
||||
# Taiko Input
|
||||
太鼓输入接口,usb为HID设备,可以连接2个鼓和8通道的数字量输入。
|
||||
## [硬件](./HW/)
|
||||
## [USB-MCU](./USB-MCU/)
|
||||
## [采样MCU](./Sampling-MCU/)
|
||||
|
||||
太鼓输入硬件,usb为HID设备,可以连接2个鼓和8通道的数字量输入。
|
||||
|
||||
[ENG](./README_EN.md)
|
||||
|
||||
<br/>
|
||||
|
||||
## [硬件工程](./HW/)
|
||||
## [USB 单片机](./USB-MCU/)
|
||||
## [采样单片机](./Sampling-MCU/)
|
||||
## [上位机](./QT-APP/)
|
||||
## [文档](./TEXT/)
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## 工程结构:
|
||||
```
|
||||
|—— HW
|
||||
|—— taiko-io
|
||||
|—— taiko-io-mini
|
||||
|—— USB-MCU
|
||||
|—— TK_usb_CH552
|
||||
|—— TK_usb_CH552_mini
|
||||
|—— Sampling-MCU
|
||||
|—— 8chV3_WithCH552
|
||||
|—— QT-APP
|
||||
|—— APP1_Taiko_IO_Setting
|
||||
|—— TEXT
|
||||
```
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## HW 硬件工程
|
||||
|
||||
硬件工程位于此目录下。
|
||||
|
||||
taiko-io/内放置的是双鼓的工程,可用于两个鼓的使用环境,工程使用KICAD设计。
|
||||
此项目硬件包含8路模拟输入和8路数字量输入,板载配置接口,单usb供电。
|
||||
|
||||
taiko-io-mini/内放置的是单鼓的工程,一般用于一个鼓的使用环境,工程使用LCEDA设计。
|
||||
此项目硬件包含4路模拟输入和4个按键,需要测试点配置,单usb供电。
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## USB-MCU USB单片机
|
||||
|
||||
USB单片机的软件工程位于此目录下。包含两个软件,根据硬件不同,适配的软件工程也不同。
|
||||
使用的单片机为 CH552/CH554,是一款USB 8位单片机。
|
||||
|
||||
TK_usb_CH552/软件适配双鼓硬件,只能枚举成为一个USB-HID键盘。
|
||||
|
||||
TK_usb_CH552_mini/软件适配单鼓硬件,可以枚举成USB-HID键盘或n******o switch适用的手柄设备。
|
||||
|
||||
软件使用keil 4编译,编译前根据宏可以关闭/打开相关的软件功能。
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## Sampling-MCU 采样单片机
|
||||
|
||||
采样单片机的软件工程位于此目录下。软件使用宏区分两款硬件。
|
||||
使用的单片机为 STM32G030。
|
||||
|
||||
软件使用keil 5编译,编译前根据宏可以关闭/打开相关的软件功能,切换硬件版本。
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## QT-APP 上位机
|
||||
|
||||
上位机的软件工程位于此目录下。上位机可以用于配置硬件的相关参数。
|
||||
|
||||
使用的UI框架为QT 5
|
||||
|
||||
<br/><br/>
|
||||
|
||||
## TEXT 文档
|
||||
|
||||
一些中间文档和输出文档位于此目录下。
|
||||
|
||||
<br/><br/>
|
||||
|
||||
# 系统框图
|
||||
详见[硬件工程](./HW/)
|
||||
|
||||
![系统框图](./HW/img/hardware.png "系统框图")
|
||||
<center>系统框图</center>
|
||||
|
||||
|
@ -1,18 +1,25 @@
|
||||
# Sampling MCU工程
|
||||
采样单片机软件
|
||||
采样单片机软件
|
||||
MCU:stm32g030,IDE:KEIL 5
|
||||
|
||||
[EN](./README_EN.md)
|
||||
|
||||
[主页](../)
|
||||
|
||||
<br/>
|
||||
|
||||
MCU:stm32g030,IDE:KEIL 4
|
||||
<br/><br/>
|
||||
## 双鼓版本与单鼓版本
|
||||
|
||||
根据/main.h/内的宏区分软件双鼓与单鼓
|
||||
<br/><br/>
|
||||
根据/main.h/内的宏区分软件双鼓与单鼓硬件。
|
||||
值得注意的是编译为单鼓的软件放在双鼓的硬件上是不能使用的,原因是初始化不相同。
|
||||
|
||||
单鼓版本:
|
||||
```
|
||||
…
|
||||
#define IS_4CH_MODE
|
||||
…
|
||||
```
|
||||
|
||||
双鼓版本:
|
||||
```
|
||||
…
|
||||
@ -20,16 +27,44 @@ MCU:stm32g030,IDE:KEIL 4
|
||||
…
|
||||
```
|
||||
<br/>
|
||||
|
||||
## 数字信号处理
|
||||
|
||||
数字信号处理主要需要处理触发、消抖和判断是否信号串扰。
|
||||
由于鼓是包含物理结构的,震动的串扰可以导致信号被误触发。所以需要对同一时间收到的信号进行判断再输出。
|
||||
|
||||
### 软件处理框图
|
||||
|
||||
![数据流向](./img/block1.png "数据流向")
|
||||
<center>数据流向图</center>
|
||||
|
||||
信号被采样后,记录成一个波形数组,通过触发函数来判断是否有符合预期强度的信号。
|
||||
通过延时输出来确保信号到来时,不会漏掉其他传感器的触发。当有其他通道在延时期间被触发,则也会记录被触发的值。
|
||||
仲裁函数用来判断延时这段时间内,被触发的几个通道中强度最大的值。同时用于复位其他函数的状态。
|
||||
输出的信号由输出器输出给USB单片机。
|
||||
|
||||
<br/>
|
||||
|
||||
## 软件流程图
|
||||
|
||||
![数据流向](./img/block2.png "数据流向")
|
||||
<center>数据流向图</center>
|
||||
|
||||
软件可以配置为速度优先触发或峰值最大触发。
|
||||
回合数越大,则计算的周期越长,当回合数设置为0时,则以速度优先的方式进行触发。
|
||||
|
||||
<br/>
|
||||
|
||||
## 配置采样参数
|
||||
采样参数通过上位机配置
|
||||
|
||||
[上位机软件](../QT-APP/)
|
||||
采样参数通过上位机配置
|
||||
|
||||
## 信号采样与处理方法
|
||||
信号进入ADC后,首先成一个表,通过触发阈值判断每个表是否被触发。
|
||||
<br/><br/>
|
||||
当确定有触发,会有一个短暂的等待时间,来判断来自其他传感器的信号强度是否高于触发的通道。经验来看串音通常触发会快一些但是强度不如真正的信号高。
|
||||
<br/><br/>
|
||||
最后根据配置的输出参数,以数字开关量信号的形式输出结果。这些信号将送去USB MCU并经过一些处理后发送给USB HOST。
|
||||
[上位机软件](../QT-APP/)
|
||||
|
||||
[USB MCU软件](../USB-MCU/)
|
||||
<br/>
|
||||
|
||||
## 数据输出
|
||||
|
||||
数据通过USB单片机发送给电脑
|
||||
|
||||
[USB MCU软件](../USB-MCU/)
|
||||
|
BIN
Sampling-MCU/img/block1.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
Sampling-MCU/img/block2.png
Normal file
After Width: | Height: | Size: 135 KiB |
@ -1,16 +1,72 @@
|
||||
# USB-MCU工程
|
||||
MCU:CH552,IDE:KEIL 4
|
||||
|
||||
[沁恒CH552](https://www.wch.cn/products/CH552.html)
|
||||
[EN](./README_EN.md)
|
||||
|
||||
硬件分为双鼓硬件与单鼓硬件,软件需要对应硬件才能使用。
|
||||
[主页](../)
|
||||
|
||||
双鼓软件pc使用,左鼓输入为DFJK,右鼓输入为ZXCV,8路数字量输入为1~8
|
||||
MCU:CH552,IDE:KEIL 4
|
||||
单片机官网:[沁恒CH552](https://www.wch.cn/products/CH552.html)
|
||||
|
||||
单鼓软件可用于pc与ns,用于pc时可以切换左右鼓的输入。
|
||||
</br>
|
||||
|
||||
[硬件](../HW/)
|
||||
## 软件流程
|
||||
软件按照如下运行
|
||||
|
||||
[双鼓软件](./TK_usb_CH552/)
|
||||
```
|
||||
采样输入 -> 输出频率限制 -> 分配输出 -> 键值映射 -> USB
|
||||
```
|
||||
|
||||
</br>
|
||||
|
||||
### 输出频率限制
|
||||
对输出进行频率限制主要是因为接收数据的硬件或程序,收到了超过其处理能力的数据时,会产生丢包的现象。
|
||||
经过多次测试,虹的软件输入限制为所有通道输入频率最高为60Hz,相同颜色的信号最高为30Hz。
|
||||
n******o switch限制输入信号的时间为20ms(按下与抬起都为20ms左右,小于这个值可能会导致输入与上一个输入粘连)
|
||||
其他电脑上运行的自治软件,通常无这方便的限制,但是在选择页面会有10ms左右的滤波。
|
||||
|
||||
</br>
|
||||
|
||||
### 分配输出
|
||||
分配输出主要用于使输入频率能达到这台设备的上限,不同的设备采取的方案不相同。
|
||||
- 虹:由于有着所有通道最高60Hz,同颜色最高30Hz的频率限制,所以在这里会缓存每个通道3次输入,并将多出来的“咚”分配到另一个鼓面,使输入带宽占满。
|
||||
- ns:ns的键位通常为左右手各4个按键,在输入频率高的时候,需要将其分配到不同的按键上(比如说Y与B都为“咚”,则输入频率高的时候的时候,Y与B交替键入,频率低的时候只键入B)
|
||||
|
||||
</br>
|
||||
|
||||
### 键值映射
|
||||
- 双鼓硬件,鼓的输入映射为键盘输入的DFJK ZXCV,服务按键映射为键盘输入的12345678。
|
||||
- 单鼓硬件,分为ns和键盘输入,其中ns输入键位见下图,键盘输入可以通过按键设置为DFJK或ZXCV,默认为DFJK。
|
||||
|
||||
![标签](./img/tag.png "标签")
|
||||
|
||||
单鼓硬件的标签
|
||||
|
||||
</br>
|
||||
|
||||
## 程序的修改
|
||||
|
||||
</br>
|
||||
|
||||
### 双鼓软件
|
||||
|
||||
- 关闭分配输出功能,则需修改将位于`CompatibilityHID.C`内的宏`WITHOUT_OUTPUT_ASSIGN`取消注释。
|
||||
- 修改输出频率限制相关的参数,修改位于`CompatibilityHID.C`内的宏`EXCHANGE_DATA`。
|
||||
- 修改键值,则修改位于`CompatibilityHID.C`内的`Enp2BlukIn`函数的数组。
|
||||
|
||||
</br>
|
||||
|
||||
### 单鼓软件
|
||||
单鼓软件内,集成了三种模式,分别是ns模式(盗用了HORI的PID/VID),适配虹的键盘模式(锁60Hz输入),适配其他太鼓软件的键盘模式(解锁限制并关闭分配输出)三种。
|
||||
|
||||
- 修改`CompatibilityHID.C`内的宏`MODE_STARTUP`,则可以修改启动时候默认的模式。
|
||||
- 启动前1s内按如下按键,则可以切换模式
|
||||
```
|
||||
...
|
||||
if(!KEY1)start_up_mode = MODE_NS_GP;
|
||||
if(!KEY2)start_up_mode = MODE_KEYBOARD;
|
||||
if(!KEY3)start_up_mode = MODE_KB_LMT;
|
||||
if(!KEY4)start_up_mode = MODE_STARTUP;
|
||||
...
|
||||
```
|
||||
- 运行时,按住1~4所有的按键,则可以进行复位,以重新切换模式。
|
||||
|
||||
[单鼓软件](./TK_usb_CH552_NS/)
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_proj.xsd">
|
||||
|
||||
<SchemaVersion>1.0</SchemaVersion>
|
||||
<SchemaVersion>1.1</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
<SLE66CMisc></SLE66CMisc>
|
||||
<SLE66AMisc></SLE66AMisc>
|
||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||
<SFDFile></SFDFile>
|
||||
<bCustSvd>0</bCustSvd>
|
||||
<UseEnv>0</UseEnv>
|
||||
<BinPath></BinPath>
|
||||
<IncludePath></IncludePath>
|
||||
@ -60,6 +62,8 @@
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopU1X>0</nStopU1X>
|
||||
<nStopU2X>0</nStopU2X>
|
||||
</BeforeCompile>
|
||||
<BeforeMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
@ -68,6 +72,8 @@
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopB1X>0</nStopB1X>
|
||||
<nStopB2X>0</nStopB2X>
|
||||
</BeforeMake>
|
||||
<AfterMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
@ -76,6 +82,8 @@
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopA1X>0</nStopA1X>
|
||||
<nStopA2X>0</nStopA2X>
|
||||
</AfterMake>
|
||||
<SelectedForBatchBuild>0</SelectedForBatchBuild>
|
||||
<SVCSIdString></SVCSIdString>
|
||||
@ -94,6 +102,7 @@
|
||||
<StopOnExitCode>3</StopOnExitCode>
|
||||
<CustomArgument></CustomArgument>
|
||||
<IncludeLibraryModules></IncludeLibraryModules>
|
||||
<ComprImg>1</ComprImg>
|
||||
<BankNo>65535</BankNo>
|
||||
</CommonProperty>
|
||||
<DllOption>
|
||||
@ -124,6 +133,7 @@
|
||||
<RestoreFunctions>1</RestoreFunctions>
|
||||
<RestoreToolbox>1</RestoreToolbox>
|
||||
<LimitSpeedToRealTime>0</LimitSpeedToRealTime>
|
||||
<RestoreSysVw>1</RestoreSysVw>
|
||||
</Simulator>
|
||||
<Target>
|
||||
<UseTarget>0</UseTarget>
|
||||
@ -134,6 +144,8 @@
|
||||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
|
||||
<RestoreFunctions>0</RestoreFunctions>
|
||||
<RestoreToolbox>1</RestoreToolbox>
|
||||
<RestoreTracepoints>0</RestoreTracepoints>
|
||||
<RestoreSysVw>1</RestoreSysVw>
|
||||
</Target>
|
||||
<RunDebugAfterBuild>0</RunDebugAfterBuild>
|
||||
<TargetSelection>-1</TargetSelection>
|
||||
@ -162,9 +174,14 @@
|
||||
<Capability>0</Capability>
|
||||
<DriverSelection>-1</DriverSelection>
|
||||
</Flash1>
|
||||
<bUseTDR>0</bUseTDR>
|
||||
<Flash2></Flash2>
|
||||
<Flash3></Flash3>
|
||||
<Flash4></Flash4>
|
||||
<pFcarmOut></pFcarmOut>
|
||||
<pFcarmGrp></pFcarmGrp>
|
||||
<pFcArmRoot></pFcArmRoot>
|
||||
<FcArmLst>0</FcArmLst>
|
||||
</Utilities>
|
||||
<Target51>
|
||||
<Target51Misc>
|
||||
|
@ -10,6 +10,7 @@ v1.0
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
//#define WITHOUT_OUTPUT_ASSIGN
|
||||
|
||||
#define VID 0xAABB
|
||||
#define PID 0xCCDD
|
||||
@ -360,8 +361,14 @@ void USBDeviceInit()
|
||||
}
|
||||
|
||||
/*----------------------*/
|
||||
#ifdef WITHOUT_OUTPUT_ASSIGN
|
||||
#define COUNT_NUM_D 2
|
||||
#define COUNT_NUM_K 2
|
||||
#else
|
||||
#define COUNT_NUM_D 4
|
||||
#define COUNT_NUM_K 2
|
||||
#endif
|
||||
|
||||
|
||||
UINT8 input_count[8] = {0};
|
||||
|
||||
@ -433,6 +440,10 @@ void Taiko_task(UINT16 DATA_){
|
||||
exchange_count[6] = EXCHANGE_DATA;
|
||||
if(exchange_count[5] == 0)exchange_count[5] = EXCHANGE_DATA / 2;
|
||||
}
|
||||
|
||||
#ifdef WITHOUT_OUTPUT_ASSIGN
|
||||
//
|
||||
#else
|
||||
//咚允许交叉加入
|
||||
if(input_count[1] && exchange_count[2] == 0){
|
||||
input_count[1]--;
|
||||
@ -455,6 +466,7 @@ void Taiko_task(UINT16 DATA_){
|
||||
if(exchange_count[6] == 0)exchange_count[6] = EXCHANGE_DATA / 2;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//获取输出
|
||||
KEY_OUT = DATA_ & 0xFF00;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
|
||||
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_proj.xsd">
|
||||
|
||||
<SchemaVersion>1.0</SchemaVersion>
|
||||
<SchemaVersion>1.1</SchemaVersion>
|
||||
|
||||
<Header>### uVision Project, (C) Keil Software</Header>
|
||||
|
||||
@ -29,6 +29,8 @@
|
||||
<SLE66CMisc></SLE66CMisc>
|
||||
<SLE66AMisc></SLE66AMisc>
|
||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||
<SFDFile></SFDFile>
|
||||
<bCustSvd>0</bCustSvd>
|
||||
<UseEnv>0</UseEnv>
|
||||
<BinPath></BinPath>
|
||||
<IncludePath></IncludePath>
|
||||
@ -60,6 +62,8 @@
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopU1X>0</nStopU1X>
|
||||
<nStopU2X>0</nStopU2X>
|
||||
</BeforeCompile>
|
||||
<BeforeMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
@ -68,6 +72,8 @@
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopB1X>0</nStopB1X>
|
||||
<nStopB2X>0</nStopB2X>
|
||||
</BeforeMake>
|
||||
<AfterMake>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
@ -76,6 +82,8 @@
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopA1X>0</nStopA1X>
|
||||
<nStopA2X>0</nStopA2X>
|
||||
</AfterMake>
|
||||
<SelectedForBatchBuild>0</SelectedForBatchBuild>
|
||||
<SVCSIdString></SVCSIdString>
|
||||
@ -94,6 +102,7 @@
|
||||
<StopOnExitCode>3</StopOnExitCode>
|
||||
<CustomArgument></CustomArgument>
|
||||
<IncludeLibraryModules></IncludeLibraryModules>
|
||||
<ComprImg>1</ComprImg>
|
||||
<BankNo>65535</BankNo>
|
||||
</CommonProperty>
|
||||
<DllOption>
|
||||
@ -124,6 +133,7 @@
|
||||
<RestoreFunctions>1</RestoreFunctions>
|
||||
<RestoreToolbox>1</RestoreToolbox>
|
||||
<LimitSpeedToRealTime>0</LimitSpeedToRealTime>
|
||||
<RestoreSysVw>1</RestoreSysVw>
|
||||
</Simulator>
|
||||
<Target>
|
||||
<UseTarget>0</UseTarget>
|
||||
@ -134,6 +144,8 @@
|
||||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
|
||||
<RestoreFunctions>0</RestoreFunctions>
|
||||
<RestoreToolbox>1</RestoreToolbox>
|
||||
<RestoreTracepoints>0</RestoreTracepoints>
|
||||
<RestoreSysVw>1</RestoreSysVw>
|
||||
</Target>
|
||||
<RunDebugAfterBuild>0</RunDebugAfterBuild>
|
||||
<TargetSelection>-1</TargetSelection>
|
||||
@ -162,9 +174,14 @@
|
||||
<Capability>0</Capability>
|
||||
<DriverSelection>-1</DriverSelection>
|
||||
</Flash1>
|
||||
<bUseTDR>0</bUseTDR>
|
||||
<Flash2></Flash2>
|
||||
<Flash3></Flash3>
|
||||
<Flash4></Flash4>
|
||||
<pFcarmOut></pFcarmOut>
|
||||
<pFcarmGrp></pFcarmGrp>
|
||||
<pFcArmRoot></pFcArmRoot>
|
||||
<FcArmLst>0</FcArmLst>
|
||||
</Utilities>
|
||||
<Target51>
|
||||
<Target51Misc>
|
@ -137,8 +137,9 @@ volatile UINT8 KeyCountTime_B[4] = {0};
|
||||
#define MODE_NS_GP 0
|
||||
#define MODE_KEYBOARD 1
|
||||
#define MODE_KB_LMT 2
|
||||
#define MODE_STARTUP MODE_KEYBOARD
|
||||
|
||||
UINT8 start_up_mode = MODE_KB_LMT;
|
||||
UINT8 start_up_mode = MODE_STARTUP;
|
||||
|
||||
volatile UINT16 KEY_OUT = 0;
|
||||
|
||||
@ -1424,11 +1425,13 @@ void main(void)
|
||||
CfgFsys(); //CH559时钟选择配置
|
||||
mDelaymS(5); //修改主频等待内部晶振稳定,必加
|
||||
|
||||
//wait 1s
|
||||
start_up_mode = MODE_KB_LMT;
|
||||
//start up delay1 wait 1s
|
||||
start_up_mode = MODE_STARTUP;
|
||||
while (1){
|
||||
if(!KEY1 || !KEY2)start_up_mode = MODE_NS_GP;
|
||||
if(!KEY3 || !KEY4)start_up_mode = MODE_KEYBOARD;
|
||||
if(!KEY1)start_up_mode = MODE_NS_GP;
|
||||
if(!KEY2)start_up_mode = MODE_KEYBOARD;
|
||||
if(!KEY3)start_up_mode = MODE_KB_LMT;
|
||||
if(!KEY4)start_up_mode = MODE_STARTUP;
|
||||
WDOG_COUNT = 0;
|
||||
WAIT_COUNT++;
|
||||
mDelaymS(10);
|
@ -239,8 +239,7 @@ UINT8 ReadIOSlow(void){
|
||||
}
|
||||
|
||||
IODATA_bak = IODATA;
|
||||
|
||||
return KeyOut;
|
||||
return KeyOut;
|
||||
}
|
||||
|
||||
|
BIN
USB-MCU/img/tag.png
Normal file
After Width: | Height: | Size: 15 KiB |