├── Log.md ├── img ├── 1.png ├── a.png ├── b.png └── layout.png ├── Note.md ├── README.md └── LICENSE /Log.md: -------------------------------------------------------------------------------- 1 | # 主控驱动验证计划 2023-3-21 2 | 1. AT32 XMC驱动屏幕 -------------------------------------------------------------------------------- /img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThinkCodeStudio/ThisNotKeyboard/main/img/1.png -------------------------------------------------------------------------------- /img/a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThinkCodeStudio/ThisNotKeyboard/main/img/a.png -------------------------------------------------------------------------------- /img/b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThinkCodeStudio/ThisNotKeyboard/main/img/b.png -------------------------------------------------------------------------------- /img/layout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ThinkCodeStudio/ThisNotKeyboard/main/img/layout.png -------------------------------------------------------------------------------- /Note.md: -------------------------------------------------------------------------------- 1 | # DIYkeyboard 2 | 3 | ## 产品定位 4 | 5 | cpu选型: 6 | 7 | 满血版: 8 | 全功能 9 | * AT32F435(QSPI flash) + esp32-c3 10 | 11 | 残血版: 12 | 砍去 蓝牙 和 智慧旋钮底座 13 | * AT32F435 14 | 15 | # MCU 16 | 17 | ## esp32 18 | 19 | * 集成蓝牙 20 | 21 | 22 | 23 | * 性能溢出 24 | 25 | * 贵 26 | 27 | * 功耗高 28 | 29 | * 没有USB 30 | 31 | * 有没用的功能 32 | 33 | * GPIO少 34 | ## atmega32u4 35 | * 生态完善 36 | 37 | * 有USB 38 | 39 | 40 | 41 | * 性能太低 42 | 43 | * 贵 44 | 45 | * GPIO少 46 | ## STM32L433 47 | * 低功耗 48 | 49 | * 有USB 50 | 51 | * 性能优 52 | 53 | 54 | 55 | * 贵 56 | 57 | * GPIO少 58 | 59 | 60 | ## CH583 risc-v 61 | * 低功耗 62 | 63 | * 集成蓝牙 64 | 65 | * 可编程 66 | 67 | * 有USB 68 | 69 | * 性能优 70 | 71 | 72 | 73 | * 新芯片,生态差 74 | 75 | * QFN封装 焊接困难 76 | 77 | * 40 GPIO 78 | 79 | ## CH32V208WBU6 ON 80 | * QFN68封装 81 | * 53 GPIO 82 | 83 | 84 | 85 | * 功能过于强大 86 | * 没有低功耗 87 | 88 | ## STM32F407ZGxx 89 | 90 | * LQFP 144 91 | * 资料全 92 | * 生态好 93 | * 适配microPython 94 | * 方便开发 95 | * 功能强大 96 | 97 | 98 | 99 | * 功耗30~40mA 100 | * 贵 101 | * 可能GPIO过多 102 | * 不集成蓝牙 103 | 104 | **注意功耗计算** 105 | 106 | 带蓝牙的单片机引脚都少 107 | 108 | # 外观 109 | 透明亚克力板铜螺柱支撑 110 | 四层: 111 | 亚克力上板 112 | 亚克力保护板 113 | PCB 114 | 亚克力底板 115 | 116 | 117 | # 硬件 118 | * AT32F435 288Mhz DSP FPU 119 | * ~[smartknob](https://github.com/scottbez1/smartknob)旋钮~ 120 | * tft-lcd屏 *1 121 | * 编码器 *6 122 | * 拨码器 *2 123 | * 0.45oled 键帽 124 | * 蓝牙模块 esp系列 125 | * 手势触摸条? 126 | 127 | # 软件 128 | * RT-Thread 129 | * ~openHarmony 有js可编程框架~ 130 | * ~lua~ 131 | * microPython RTT内有移植 132 | * ~[pikascript](https://github.com/pikastech/pikascript/)~ 133 | * ~集成鼠标控制~ 134 | * ~光标控制~ 135 | * 自定义组合键 136 | * 键位录制 137 | * 对应软件功能切换 138 | * 快速切换蓝牙连接设备 139 | * ~参考使用稚晖的固件~ 140 | 141 | # 问题 142 | * ~钱~ 143 | * ~先开发smartknob项目~ 144 | * ~3D打印机~ 145 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DIYkeyboard 2 | **进度** 3 | * 立项构想选型 2022-7-25 4 | * 项目开发启动 2023-1-2 5 | * 电路板绘制 2023-1-8 6 | * LCD电路测试失败 2023-2-18 7 | * 电路板绘制完成 2023-3-5 8 | * 有序猜测所有电路 2023-3-6 9 | * LCD电路测试(SMT)失败 2023-3-20 10 | * 8bit并口ST7789 LCD显示屏成功显示(原因:8bit数据引脚顺序接反) 2023-3-21 11 | * 推翻30%的电路设计, 进一步模块化电路 2023-4-6 12 | * AT32 XMC驱动并口LCD成功 2023-4-7 13 | * AT32F435 核心板验证成功 2023-5-18 14 | * bootloader 开发完成 2023-5-23 15 | * 底板设计完成 2023-5-28 16 | 17 | 18 | ## 设计初衷 19 | * 在我喜欢使用键盘上下左右键移动光标来编辑代码, 但是目前HOME和END键离上下左右键太远, 所以我把HOME和END键放在了上下左右键的旁边, 并且把翻页键也移动了. 20 | * 有因为光标远距离移动要经常按同一方向的键, 所以我添加了编码器来解决大量按同一方向键的问题. 21 | * 然后我添加了屏幕, 是为为了设置显示状态, 快速设置键盘参数, 快速切换模式, 这个屏幕我会按智能手表的思路设计 22 | * 拓展接口是为连接其他模块, 键盘分别有上下左右四个方向的接口, 因为我先要非常多的功能, 多到我自己也乱了, 所以我选择了模块化设计, 然后后期我再开放编程接口让可玩性更高, 但是有一个问题, 开放接口必定会影响硬件系统的稳定性, 后期慢慢优化吧 23 | * 模块化硬件, 键盘采用两个M.2接口插座和核心板连接, 可以方便的升级替换核心板. 24 | 25 | 26 | 在键盘能使用的情况下使用串口终端? 27 | 85 key rgb lde 2ms delay 10ms 28 | 29 | 键盘下侧添加接口外接? 30 | 31 | 可二次开发, 内部编程的键盘 32 | 33 | 键盘PCB基本完成, 目前考虑再加入一个usb2.0 hub芯片用来连接内部键盘输出和串口, 34 | 这样就是USB3.0 hub挂一个USB2.0hub连接到主控 35 | 36 | ## 键盘布局 37 | 38 | ![layout](img/layout.png) 39 | 40 | ## 键盘拓扑模块 41 | 42 | ![module](img/a.png) 43 | 44 | 45 | 46 | ## 键盘拓扑模块走线 47 | 48 | ![port](img/b.png) 49 | 50 | ## 第一版本大致外形 51 | ![v1](img/1.png) 52 | 53 | ### 上侧模块 54 | 55 | 接口: 56 | * USB 3.0 USB HUB 57 | * GPIO 58 | * SPI 59 | * UART 60 | 61 | 硬件: 62 | * USB 3.0接口 63 | * 弹簧针触点 64 | 65 | 模块: 66 | * GOIO开发拓扑 67 | * USB HUB 68 | 69 | ### 左侧模块 70 | 71 | 接口: 72 | * USB 3.0 USB HUB 73 | * SPI 74 | * UART 75 | 76 | 硬件: 77 | * 弹簧针触点 78 | 79 | 模块: 80 | * 智能旋钮 81 | * USB HUB 82 | 83 | ### 下侧模块 84 | 85 | 接口: 86 | * USB 3.0 USB HUB 87 | * SPI 88 | * UART 89 | 90 | 硬件: 91 | * 弹簧针触点 92 | 93 | 模块: 94 | * 触摸板 95 | * USB HUB 96 | * 外接电池 97 | 98 | ### 右侧模块 99 | 100 | 接口: 101 | * USB 2.0 连接单片机 102 | * SPI 103 | * UART 104 | 105 | 硬件: 106 | * 弹簧针触点 107 | 108 | 模块: 109 | * 十六进制小键盘 110 | 111 | 112 | ## 硬件 113 | * [x] AT32F435ZMT7 (单片机问题,外设功耗大) 114 | * RTC电路 115 | * 时钟电路 116 | * debug电路 117 | * 复位电路 118 | * BOOT电路 119 | * [x] Flash EN25QH128A 120 | * [x] SD卡 121 | * [x] ~~拨码管 12pin*2 74HC165~~ 122 | * [x] ST7789 8080 设计底板 [LCD](https://item.taobao.com/item.htm?spm=a1z10.5-c-s.w4002-23991449502.11.6928400cWlnPG5&id=636496300109) 123 | * [x] USB 3.0 HUB GL3520 124 | * [x] 编码器 125 | * [x] 磁连接触点 (SPI&uart, 四个方向, FFC 30cm 24P, 设计转接板) 126 | * [x] 电池管理电路 [电池](https://item.taobao.com/item.htm?spm=a230r.1.14.48.32493d7ehBpi5Y&id=640378174518&ns=1&abbucket=18#detail) 127 | * [x] RGB灯 WS2812 128 | * [x] usb type-c (偏右侧靠近芯片) 129 | * [x] 蓝牙模块 (暂时没有选型) 130 | 邪道用法, 由于从设备不能主动选择连接主设备,所以考虑使用两颗蓝牙芯片,让两颗芯片分别连接不同设备,当切换设备时, 设置一个芯片待机, 一个工作,加上有线模式,可快速切换三个设备控制。问题:两个芯片会不会有干扰,蓝牙依然无法使用拓展模块 131 | * [x] 旋钮开关 132 | * [x] 键盘 采用稚晖君的解决方案 使用标准元件库 133 | * [ ] 定位板和外壳 134 | 135 | ## 驱动 136 | * [x] lcd 8080 137 | * [ ] 编码器 138 | * [ ] ~拨码管,使用IO拓展芯片扫描~ 139 | * [ ] 按键 140 | * [x] USB HID 141 | * [ ] 蓝牙 142 | * [ ] SD 143 | * [ ] rgb led 144 | 145 | ## 使用库 146 | * rtthread 147 | * ulog 148 | * C++ 149 | * ymodem 150 | * fs 151 | * pikaScript 152 | * lvgl 153 | * cherry usb 154 | * ws2812b 155 | 156 | ## 功能 157 | 158 | * [x] bootloader 159 | * [ ] HID协议 160 | * 鼠标和键盘通用? 161 | * USB HID 162 | * BLE HID 163 | * HID 媒体 164 | * [ ] NKRO(全键无冲) 165 | * [ ] Fn自定义快捷键 166 | * 读取文件自定义映射 167 | * 适配vim功能 168 | * 密码管理 169 | * [ ] ~~轻量级运行时~~ 170 | * 内存分配 171 | * 指令读取 172 | * 系统接口调用 173 | * [ ] 内置计算器 174 | * [ ] 文件配置读取 175 | * 键盘映射文件(编译过) 176 | * [ ] 键盘一键启软件 * 177 | * [ ] 电源管理 178 | * [ ] 侧边拓扑模块接口 179 | * 扩展连接通信协议(四相通用) 180 | * [ ] 按键录制 181 | * [ ] 全键位重映射配置 182 | * [ ] vim按键功能 183 | * [ ] 原神延时按键 184 | * [ ] 一键密码 185 | * [ ] 按键指引 186 | 187 | ## 工具软件 188 | * [ ] ~~脚本编译器~~ 189 | * 前期终端编译 190 | * 后期QT图形界面 191 | * JSON结构 192 | * 编译运行脚本 193 | * 编译映射文件 194 | * 输出特定格式二进制文件 195 | 196 | 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. --------------------------------------------------------------------------------