2692 views|2 replies

2

Posts

0

Resources
The OP
 

The idea of single chip microcomputer time-sharing control [Copy link]

I saw a post about the time-sharing idea of MCU but I don't quite understand it. For example, in the main function, the scanning program, xianshi represents the digital tube, and wei represents the key. Can you briefly explain the function of this time-sharing scanning? Thank you very much! I tried to remove this part of the scanning program, but the digital tube will not display when the key is pressed.

9f64df93cbc11d9919d5339bbc9b4ed.png (8.31 KB, downloads: 7)

9f64df93cbc11d9919d5339bbc9b4ed.png

b19c14a8f1ea6ff10804253733afbba.png (3.68 KB, downloads: 3)

b19c14a8f1ea6ff10804253733afbba.png
This post is from 51mcu

Latest reply

Your program is a sequential structure placed in a large loop, and it cannot be said to be time-sharing scanning. When the program is executed, the display scan is executed first and then the key scan is executed. It’s just that the microcontroller executes it faster, so it feels like it is being performed simultaneously.  Details Published on 2018-12-10 08:57
 

6366

Posts

4936

Resources
2
 
The scan function sends the data to be displayed to the corresponding port. If you remove it, it will not be displayed.
This post is from 51mcu
 
 
 

29

Posts

0

Resources
3
 
Your program is a sequential structure placed in a large loop, and it cannot be said to be time-sharing scanning. When the program is executed, the display scan is executed first and then the key scan is executed. It’s just that the microcontroller executes it faster, so it feels like it is being performed simultaneously.
This post is from 51mcu
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list