当前位置:网站首页>[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 )
边栏推荐
- Program analysis and Optimization - 9 appendix XLA buffer assignment
- Multiprocess programming (II): Pipeline
- Shell脚本基本使用
- MySQL 23道经典面试吊打面试官
- Which websites can I search for references when writing a thesis?
- Where can I find foreign papers?
- Missing number
- 开源了 | 文心大模型ERNIE-Tiny轻量化技术,又准又快,效果全开
- Many to one, one to many processing
- Slf4j + Logback日志框架
猜你喜欢

Introduction of UART, RS232, RS485, I2C and SPI

Bigder: how to deal with the bugs found in the 32/100 test if they are not bugs

论文的英文文献在哪找(除了知网)?

JS interviewer wants to know how much you understand call, apply, bind no regrets series

130 pages of PPT from the brick boss introduces the new features of Apache spark 3.2 & 3.3 in depth

多进程编程(二):管道

Where can I find the English literature of the thesis (except HowNet)?

Markdown使用教程
![[shutter] shutter photo wall (center component | wrap component | clickrrect component | stack component | positioned component | button combination component)](/img/c5/2f65d37682607aab98443d7f1ba775.jpg)
[shutter] shutter photo wall (center component | wrap component | clickrrect component | stack component | positioned component | button combination component)

Confluence的PDF导出中文文档异常显示问题解决
随机推荐
1380. Lucky numbers in the matrix
Bloom filter
Blue decides red - burst CS teamserver password
Open source | Wenxin big model Ernie tiny lightweight technology, which is accurate and fast, and the effect is fully open
helm 基础学习
Bigder: how to deal with the bugs found in the 32/100 test if they are not bugs
Nc50528 sliding window
Xcode real machine debugging
来自数砖大佬的 130页 PPT 深入介绍 Apache Spark 3.2 & 3.3 新功能
NC24840 [USACO 2009 Mar S]Look Up
Architecture: load balancing
NC50528 滑动窗口
Where can I find foreign papers?
接口差异测试——Diffy工具
form表单实例化
Interface automation coverage statistics - used by Jacobo
有哪些比较推荐的论文翻译软件?
Installing redis under Linux
Which websites can I search for references when writing a thesis?
Custom throttling function six steps to deal with complex requirements