当前位置:网站首页>51 single chip microcomputer independent key linkage nixie tube LED buzzer
51 single chip microcomputer independent key linkage nixie tube LED buzzer
2022-07-28 06:15:00 【Zhaoyang】
Catalog :
LED working principle 、 Circuit and source code
Working principle of buzzer 、 Circuit and source code
Working principle of nixie tube 、 Circuit and source code
Working principle of independent keys 、 Circuit and source code
summary
LED principle , Circuit and source code
LED principle
LED Light emitting diodes , There is single guide electricity , The greater the current, the greater the brightness , But if the current is too large, it will be burned ., In order to prevent excessive current, a resistor is usually connected in series .
LED circuit
stay 51 Single chip microcomputer A2 The circuit in the series is shown below , You can see LED It's a common anode , Lighten up LED Wait, just make P2 Port low level is enough .

Source code
Control individual LED The light is on

control LED The light flashes

Working principle of buzzer 、 Circuit and source code
Working principle of buzzer
51 The single chip microcomputer adopts a piezoelectric buzzer , That is, output a pulse signal of a certain frequency ( High and low level ) Then you can make a sound .
Buzzer circuit
51 Single chip microcomputer A2 The circuit of series buzzer is shown in the figure , take P2^5 Pin No. 1 outputs a certain high and low level of frequency .

Source code

Working principle of nixie tube 、 Circuit and source code
Working principle of nixie tube
Inside it is a light-emitting diode .51 The eight digital tubes in the single chip microcomputer are all common cathode . That is to say, the common cathode of eight light-emitting diodes of a nixie tube , The common female port of the eight nixie tubes consists of 74HC138(38 Decoder ) control . The anodes of eight nixie tubes should be matched one by one 74HC245 Chip control .
Nixie tube circuit
The following figure shows the nixie tube circuit in turn ,38 Decoder circuit , as well as 38 The truth table of the decoder . The truth table shows 38 How does the decoder control the common cathode effectively .( Binary system 7<111> From left to right corresponds to 38 Of the decoder C,B,A, This helps us to control the common cathode )



Source code

Working principle of independent keys 、 Circuit and source code
Working principle of independent keys
51 Single chip microcomputer A2 Series independent keys have pull-up resistors , High level detected without pressing the corresponding port , Press to switch on GND The corresponding port detects a low level . There is jitter when the key is pressed , Jitter will cause press, which is a misjudgment caused by jitter , So we need to shake . Deblocking includes software deblocking and hardware deblocking , The common hardware anti jitter is to connect capacitors , Capacitor charging can eliminate jitter by skipping the jitter time . We often use software to eliminate jitter .
Independent key circuit

Source code

summary
The following figure shows some pin definitions and main functions


边栏推荐
- Digital collections become a new hot spot in tourism industry
- 使用神经网络实现对天气的预测
- Tornado first met
- 三、OpenVINO实战:图像分类
- Neural network learning
- Matplotlib data visualization
- What should we pay attention to when making template application of wechat applet?
- Byte Android post 4 rounds of interviews, received 50k*18 offers, and successfully broke the situation under the layoff
- SQLAlchemy使用相关
- Distributed cluster architecture scenario optimization solution: distributed scheduling problem
猜你喜欢

Deep learning - patches are all you need

51单片机独立按键联动数码管LED蜂鸣器

基于tensorflow搭建神经网络

CVE_ 2017_ 11882 vulnerability recurrence (Metasploit opens NT remote desktop to add an account)

《AdaFace: Quality Adaptive Margin for Face Recognition》用于人脸识别的图像质量自适应边缘损失

Applet development

深度学习——Patches Are All You Need

The difference and connection between cookies, sessions and tokens

搭建集群之后崩溃的解决办法

EIGamal 密码体制描述
随机推荐
Small program development solves the anxiety of retail industry
五、视频处理与GStreamer
Self attention learning notes
How to use Bert
无约束低分辨率人脸识别综述二:异构低分辨率人脸识别方法
Notes on the thinking of software analysis and library acquisition of a Taobao customer
C语言EOF的理解
vSphere ESXi 7.0 Update 3 发行说明
Boosting unconstrained face recognition with auxiliary unlabeled data to enhance unconstrained face recognition
Reinforcement learning - Basic Concepts
How much does it cost to make a small program mall? What are the general expenses?
Automatic scheduled backup of remote MySQL scripts
Deep learning - metaformer is actually what you need for vision
Interpreting the knowledge in a neural network
Solution to the crash after setting up a cluster
深度学习(自监督:SimSiam)——Exploring Simple Siamese Representation Learning
What are the general wechat applet development languages?
强化学习——策略学习
Basic usage of word2vec and Bert
The number of password errors during login is too many, and the user is blocked,