当前位置:网站首页>[MCU project training] eight way answering machine
[MCU project training] eight way answering machine
2022-07-03 00:24:00 【Assassin ari】
The single-chip project training ——8 Share it with the road responder , If there is any deficiency , Please point out .
【 Experimental picture 】
【 Experiment video 】
【 project training 】8 Road responder
Catalog
3、 ... and 、 Hardware circuit design
One 、 The design requirements
Design a total 8 Contestants participated 8 Road responder . Each contestant has a scrambler button , For participants . The circuit has the identification and storage functions of the first response signal . After the host sends out the rush to answer instructions , If the contestant presses the answer button at the first time , Then the nixie tube immediately displays the corresponding contestant number , At the same time, the circuit should have self-locking function , Make other contestants' answer keys ineffective .
Functions and requirements : Each contestant has an answer button , The number of the button corresponds to the number of the contestant , The responder has the functions of signal identification and data storage and display . If there is a contestant rushing to answer after the rush to answer , The corresponding number is displayed on the nixie tube , At the same time, the circuit should have self-locking function , No other contestants are allowed to rush to answer , Give priority to the number of the contestant , Keep it until the background administrator clears the system , The answering machine has the function of timely answering , After the host sends out the command of rushing to answer, the timer will reduce the time immediately , And display on the display , At the same time, the buzzer makes a short sound . The contestants will rush to answer within the set time , Answer effectively . The timer stops working , The display shows the contestant number , And keep it until the background administrator clears the system .
Two 、 Options
programme 1: Use hardware electronic components to realize , But the circuit structure is complicated , Debugging difficulty , There are many peripheral components involved , Inconvenient to install , Experiments bring great trouble to experimental operation .
programme 2: use STC89C52RC Single chip microcomputer , It has 8KB Flash ROM、512KB RAM, The instruction code is completely compatible with the traditional 8051, No need for a dedicated simulator , User program can be downloaded directly through serial port , The program download can be completed in a few seconds .STC89C52RC It contains almost all the unit modules required for data acquisition and control , Its internal structure block diagram is as follows :
Analyze the above two schemes , From scheme 1 It can be seen that , This answering machine has a answering circuit 、 Timing circuit 、 Alarm circuit 、 Timing control circuit 4 Composed of circuits . The expansion circuit is a second pulse signal generation circuit 、 Decoding circuit 、 Display circuit, etc , It has a full range of functions , The designed circuit is also very stable . But its cost is very high , It uses only eight integrated circuits , Therefore, the single-chip microcomputer scheme is selected .
The block diagram of the implementation scheme of the eight way responder is shown in the figure :
3、 ... and 、 Hardware circuit design
The schematic diagram of the system hardware circuit is shown in the figure below . It mainly includes system administrator buttons ( Reset button )、3 Host buttons (K1、K2、K3)、8 Players press buttons (S1、S2、S3、S4、S5、S6、S7、S8、S9)、4 Bit common anode nixie tube display circuit 、 Buzzer alarm circuit , And power interface and power indicator circuit .
Four 、 software design
The main function is as follows :
void main(void)
{
timer0_init();
while(1)
{
time_set();
display_time(time);
if(user_flag)// When a user key is pressed (user_flag Modified in external interrupt function )
{
if(user != ERROR)// When the user key is pressed normally
display_user(user);// Displays the number of the user
else// If an error is displayed ( When multiple keys are pressed at the same time )
display_error();// Display error
}
if(stop_flag)// When the countdown stops (stop_flag In the timer zero interrupt function equipment modification ), Still no user pressed the button
display_error();// Display error
}
}
5、 ... and 、 Other pictures
(1)PCB-3D picture
(2) Physical pictures
6、 ... and 、 The data link
(1) Demo video link :
link ①: Bili, Bili -------- Click play
link ②:
link ③: Iqiyi -------- Click play
(2) Schematic diagram download :
(3) Source program download :
7、 ... and 、 Design points
(1) How to integrate 8 User answer keys ,“ comprehensive ” To external interrupt 0 port , Once the user's answer key is pressed , Then the corresponding action will take place immediately through the interrupt response ?
Make full use of the unidirectional conductivity of the diode , Once a key is pressed , Then the external interrupt 0 The port is pulled down , There will be a transition from high level to low level , At this time, enter the external interrupt 0 Respond to , Then by reading the status of the user port , You can achieve the desired effect . Here are diodes “ And ” door , General “ And ” Gate chip , such as 74LS/HC series , A chip costs at least a few cents , And the volume is relatively large , Diode is used here instead “ And ” Gate chip , No matter in terms of price or volume, it is superior to special chips .( Be careful : The pull-up resistor here is essential )
8、 ... and 、 About author
Micro invasive electronic studio , Assassin ari
Nine 、 Postscript
( Constantly improving )
边栏推荐
- NC24840 [USACO 2009 Mar S]Look Up
- Bypass AV with golang
- 95 pages of smart education solutions 2022
- 【单片机项目实训】八路抢答器
- 洛谷_P1149 [NOIP2008 提高组] 火柴棒等式_枚举打表
- Xcode real machine debugging
- Create an interactive experience of popular games, and learn about the real-time voice of paileyun unity
- maya渔屋建模
- QT 如何将数据导出成PDF文件(QPdfWriter 使用指南)
- form表单实例化
猜你喜欢
Digital collection trading website domestic digital collection trading platform
MySQL advanced learning notes (III)
Cmake basic use
setInterval定时器在ie不生效原因之一:回调的是箭头函数
接口差异测试——Diffy工具
Additional: token; (don't read until you finish writing...)
Open source | Wenxin big model Ernie tiny lightweight technology, which is accurate and fast, and the effect is fully open
130 pages of PPT from the brick boss introduces the new features of Apache spark 3.2 & 3.3 in depth
Install docker and use docker to install MySQL
洛谷_P1149 [NOIP2008 提高组] 火柴棒等式_枚举打表
随机推荐
Bypass AV with golang
写论文可以去哪些网站搜索参考文献?
Create an interactive experience of popular games, and learn about the real-time voice of paileyun unity
Matlab 信号处理【问答笔记-1】
The privatization deployment of SaaS services is the most efficient | cloud efficiency engineer points north
详解用OpenCV的轮廓检测函数findContours()得到的轮廓拓扑结构(hiararchy)矩阵的意义、以及怎样用轮廓拓扑结构矩阵绘制轮廓拓扑结构图
Interface automation coverage statistics - used by Jacobo
Maya fishing house modeling
Slf4j + logback logging framework
Leetcode skimming - game 280
sysdig分析容器系统调用
setInterval定时器在ie不生效原因之一:回调的是箭头函数
yolov5train. py
Architecture: database architecture design
经济学外文文献在哪查?
直击产业落地!飞桨重磅推出业界首个模型选型工具
What are the recommended thesis translation software?
Unique line of "Gelu"
67 page overall planning and construction plan for a new smart city (download attached)
MySQL advanced learning notes (4)