Let’s take a look at their explanation first:
https://www.bilibili.com/read/cv7465854/
That's right. You just need to know that after upgrading this code, my project will be similar to or even better than the keyboard mentioned in it in some aspects.
According to my understanding, the old code is already the first character first, ("&" logical filtering)
Pictured below:
"&", "|" logical filtering
The red line is the recognition situation after "&" logic filtering.
The specific implementation idea is to perform an AND operation on the current data and the data within the previous 10ms, and zero out if there is any, so that the front edge can be recognized as pressed from the beginning of jitter.
The delay is not recognized as released until 10ms after the end of the jitter.
The blue line is the recognition situation after "|" logical filtering.
In the same way, it's just the opposite. Press the delayed action and release it to start the immediate action from the first jitter.
Can we combine the strengths of both? In fact, it's not difficult. As for whether it can be perceived by writing it, I don't know. Discussions are welcome.
Moreover, the 1000Hz return rate also has certain requirements on computer configuration. Someone reported earlier that the computer cannot be driven, so I will continue to use 500Hz here.
The green line is the goal to be achieved, the code is posted below
uchar code move_code[2][8]={
0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,
0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f
};
void keybord_trembling()
{
uchar i,j,k=0;
static idata uchar temp[64]={0};
for(i=0;i<8;i++)
{
for(j=0;j<8;j++)
{
if(key_temp[i]&move_code[0][j])//如果按下
{
if(temp[k]==0)
temp[k]=30;
else if(temp[k]<40)
temp[k]++;
}
else//如果松开
{
if(temp[k]==40)
temp[k]=10;
else if(temp[k]>0)
temp[k]--;
}
if(temp[k]>20)
key_temp[i]|=move_code[0][j];
else
key_temp[i]&=move_code[1][j];
k++;
}
}
}
The code provided below uses this fast and aggressive algorithm that is easy to double-click. If a double-click occurs, it is recommended to revert to the normal version of the code.
I originally wanted to import comics, but the result was not clear enough and the emoticon package started to work.
Jialichuang's silk screen printing is always defective
Weld the copper nuts, 8 in total (they are a little oxidized and turned red after welding)
Install the keyboard
Positioning plate (this is black oil spray tin, the effect is okay)
PCB photo
Front (the picture with the bottom plate will be added later, the screws are on the way)
side close-up
Open source platform logo close-up
Finished products made by other users:
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet