hwKyyc7XEv

Three-button keypad with dial function, CH552 single-chip HID driver-free keyboard

 
Overview

### Introduction

> I previously open-sourced a six-key small keyboard with a knob (https://oshwhub.com/pomin/diy-jian-pan), but I didn't expect that the number of views would be so large. Recently, I got a job and finally had time to update and improve this project. The

previous six-key keyboard had a bug that it would be disconnected after running for a long time. It may be inferred that the interrupt priority of CH552 is fixed:
![image.png]
You can see that the priority of the timer 0 interrupt is greater than that of USB. The code uses the software polling execution method. The timer 0 interrupt provides the clock source. It is inferred that the timer 0 interrupted the USB transmission interrupt and caused the disconnection problem. After repairing it, there is no problem now.

This keyboard uses the dial+3 key design. I only heard about the dial some time ago, and then I checked it out... emmmm99.99$... It's also okay... . . .
![image.png] But what can we do about CH552, this magical USB microcontroller, which can be easily made, hahahaha.

### RGB lighting effect
> The original author used OpenRGB to rewrite the RGB lighting effect. This function is removed here, and the HSV color model is used to drive the RGB lamp for display.

HSV model diagram:
![HSV-color-space-Hue-saturation-value.png]
In the old version of the six-key keyboard, the three RGB color values ​​are gradually reduced to achieve the fade-out effect. The code is relatively bloated. Since it is easier to achieve fade-out or gradient color in the HSV color model, this keyboard uses HSV to express color and HSV to RGB to drive the RGB lamp for display. At present, only multi-color and fade-out effects are implemented in the code.

### The

default function of the three keys is the previous song, pause/play, and next song. The dial function can be searched by itself, which is very nice to use! !
##### The descriptor generation software
can change the manufacturer and device name to your own name! ! , I wrote a generation tool using the imgui interface library and vcpkg (it seems that the support for Chinese is not perfect, and some Chinese characters will be garbled)

![image.png]
Replace the descriptor in the code:

![image.png]
My keyboard, hahaha

![image.png]
### Photos

![1670851192467.jpg] ![1670851210748.jpg] ![IMG_20221212_204250.jpg]
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-23 08:39:19

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号