1Gs6lbDFb

Homemade wireless numeric keyboard

 
Overview

Introductory video address: https://www.bilibili.com/video/BV1p3411G7bW
Attached is the shell 3D printing file
 
 
 
K375S button matrix diagram
and part of the component shopping list:
 
Code part:

#include #include "intrins.h" //One pin of the rotary encoder is connected to the interrupt 1 pin, and the other pin is connected to the ordinary IO port //The interrupt 1 pin is P3^3sbit PIN1=P3^4;sbit F11=P1^2;sbit F12=P1 ^3;void Delay10ms() //@11.0592MHz{ unsigned char i, j; i = 108; j = 145; do { while (--j); } while (--i);} void inte_start (void) { EA=1; //Turn on the total interrupt EX1=1; //Turn on the external interrupt 1 trigger switch IT1=1; //External interrupt 1 is a falling edge trigger F11=0; F12=0; } void exint0() interrupt 2 //INT1 interrupt entry { if(PIN1==0) { F12=1; //Assume that the encoder rotates forward Delay10ms(); F12=0; } else if(PIN1==1) { F11=1; //Assume Encoder reverse Delay10ms(); F11=0; } } int main (void) { inte_start ();//Interrupt initialization, only need to run once while(1); }

 
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-06-27 19:53:49
  • Sampling problem of serial communication!
  • Do you think I have it easy?
  • STM32 driving method of WS2812 lamp beads (Part 3)——DMA+SPI
  • MOSFET溫升的計算工具
  • Pin-regulated 8mA output amplifier
  • Capacitor charging and discharging formula

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号