当前位置:网站首页>[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 )
边栏推荐
- What are the recommended thesis translation software?
- [shutter] image component (image component introduction | image constructor | image.network constructor | image.asset constructor)
- Sysdig analysis container system call
- NC17059 队列Q
- NC24325 [USACO 2012 Mar S]Flowerpot
- Digital twin visualization solution digital twin visualization 3D platform
- Digital twin smart factory develops digital twin factory solutions
- Matlab 信号处理【问答笔记-1】
- [target detection] r-cnn, fast r-cnn, fast r-cnn learning
- S12. Verify multi host SSH mutual access script based on key
猜你喜欢

DotNet圈里一个优秀的ORM——FreeSql

Understanding and application of least square method
![[shutter] shutter open source project reference](/img/3f/b1d4edd8f8e8fd8e6b39548448270d.jpg)
[shutter] shutter open source project reference

setInterval定时器在ie不生效原因之一:回调的是箭头函数

Maya fishing house modeling

In February 2022, the ranking list of domestic databases: oceanbase regained its popularity with "three consecutive increases", and gaussdb is expected to achieve the largest increase this month

67 page overall planning and construction plan for a new smart city (download attached)

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

Digital collection trading website domestic digital collection trading platform

Bigder: how to deal with the bugs found in the 32/100 test if they are not bugs
随机推荐
Go自定义排序
helm 基础学习
接口差异测试——Diffy工具
[shutter] shutter photo wall (center component | wrap component | clickrrect component | stack component | positioned component | button combination component)
Maya fishing house modeling
写论文可以去哪些网站搜索参考文献?
Open Source | Wenxin Big Model Ernie Tiny Lightweight Technology, Accurate and Fast, full Open Effect
Understanding and application of least square method
UART、RS232、RS485、I2C和SPI的介绍
洛谷_P2010 [NOIP2016 普及组] 回文日期_折半枚举
免费自媒体必备工具分享
Angled detection frame | calibrated depth feature for target detection (with implementation source code)
How to specify const array in the global scope of rust- How to specify const array in global scope in Rust?
Blue decides red - burst CS teamserver password
Pytorch里面多任务Loss是加起来还是分别backward?
In February 2022, the ranking list of domestic databases: oceanbase regained its popularity with "three consecutive increases", and gaussdb is expected to achieve the largest increase this month
NC50965 Largest Rectangle in a Histogram
Additional: token; (don't read until you finish writing...)
MySQL advanced learning notes (III)
Custom throttling function six steps to deal with complex requirements