当前位置:网站首页>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


边栏推荐
- Boosting unconstrained face recognition with auxiliary unlabeled data to enhance unconstrained face recognition
- word2vec+回归模型实现分类任务
- 基于直方图修改的可逆数字水印方法
- Word2vec+ regression model to achieve classification tasks
- tensorboard可视化
- How much does small program development cost? Analysis of two development methods!
- 《Distilling the Knowledge in a Neural Network》知识蒸馏论文解读
- 强化学习——策略学习
- 搭建集群之后崩溃的解决办法
- 深度学习——Patches Are All You Need
猜你喜欢

Adaface: quality adaptive margin for face recognition image quality adaptive edge loss for face recognition

Distributed cluster architecture scenario optimization solution: distributed scheduling problem

关于gcc :multiple definition of

Deep learning (self supervision: Moco V2) -- improved bases with momentum contractual learning

Using neural network to predict the weather

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

Deep learning - metaformer is actually what you need for vision

强化学习——不完全观测问题、MCTS

Solution to the crash after setting up a cluster

深度学习(自监督:SimSiam)——Exploring Simple Siamese Representation Learning
随机推荐
Reinforcement learning - dqn in value learning
Quick look-up table to MD5
Cluster operation management system, to answer questions about the process
What should we pay attention to when making template application of wechat applet?
UNL-类图
Deep learning (incremental learning) - iccv2022:continuous continuous learning
What are the general wechat applet development languages?
深度学习(自监督:CPC v2)——Data-Efficient Image Recognition with Contrastive Predictive Coding
Paper reading notes of field low resolution face recognition based on selective knowledge extraction
GF(2^8)的加法与乘法计算
一、AMD - OpenVINO环境配置
UNL class diagram
Why is the kotlin language not popular now? What's your opinion?
基于tensorflow搭建神经网络
Never leave its origin - bluecms1.6 vulnerability of the controller's shooting range
How much is wechat applet development cost and production cost?
循环神经网络
《Distilling the Knowledge in a Neural Network》知识蒸馏论文解读
Reinforcement learning - incomplete observation problem, MCTs
用于快速低分辨率人脸识别模型训练的改进知识蒸馏《Improved Knowledge Distillation for Training Fast LR_FR》