当前位置:网站首页>[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 )
边栏推荐
- LeedCode1480.一维数组的动态和
- 95 pages of smart education solutions 2022
- S12. Verify multi host SSH mutual access script based on key
- NC24840 [USACO 2009 Mar S]Look Up
- 关于Unity屏幕相关Screen的练习题目,Unity内部环绕某点做运动
- Unique line of "Gelu"
- Implement the foreach method of array
- Go自定义排序
- JSON转换工具类
- Interface automation coverage statistics - used by Jacobo
猜你喜欢

RTP 接发ps流工具改进(二)
![洛谷_P1149 [NOIP2008 提高组] 火柴棒等式_枚举打表](/img/4a/ab732c41ea8a939fa0983fec475622.png)
洛谷_P1149 [NOIP2008 提高组] 火柴棒等式_枚举打表

TypeError: Cannot read properties of undefined (reading ***)

Introduction of UART, RS232, RS485, I2C and SPI

sysdig分析容器系统调用
![[shutter] shutter open source project reference](/img/3f/b1d4edd8f8e8fd8e6b39548448270d.jpg)
[shutter] shutter open source project reference

有哪些比较推荐的论文翻译软件?

Interpretation of new plug-ins | how to enhance authentication capability with forward auth

秒杀系统设计

哪些软件可以整篇翻译英文论文?
随机推荐
MFC gets the current time
What are the projects of metauniverse and what are the companies of metauniverse
Explain in detail the process of realizing Chinese text classification by CNN
Confluence的PDF导出中文文档异常显示问题解决
redis21道经典面试题,极限拉扯面试官
SQL query statement parameters are written successfully
1380. Lucky numbers in the matrix
Many to one, one to many processing
What website can you find English literature on?
[shutter] open the third-party shutter project
Go custom sort
多进程编程(一):基本概念
Don't want teachers to see themselves with cameras in online classes? Virtual camera you deserve!
zhvoice
Luogu_ P1149 [noip2008 improvement group] matchstick equation_ Enumeration and tabulation
QT 如何将数据导出成PDF文件(QPdfWriter 使用指南)
Xcode real machine debugging
What is the standard format of a 2000-3000 word essay for college students' classroom homework?
v8
開源了 | 文心大模型ERNIE-Tiny輕量化技術,又准又快,效果全開