2625 views|6 replies

18

Posts

0

Resources
The OP
 

Please help me with external interrupt and digital tube display (just look at the problem of interrupt trigger) [Copy link]

This post is from 51mcu

Latest reply

That's not the case. CPU US-level speed How sensitive can humans be? Even if they are sensitive, it is only at the 100ms level.   Details Published on 2020-9-2 09:53
 

18

Posts

0

Resources
2
 

Many of the displays in the middle are a bit cumbersome and seem very long. Can you guys help me look at the problem of interrupt triggering here? All the middle ones are compiled and run without problems. Problem: After pressing the key, the interrupt cannot be triggered to enter the interrupt function (occasionally pressing it a few more times can trigger it). After commenting out the display function in the main function, the key triggering interrupt is no problem. Can you guys help me see what the problem is?

If you have any better ideas for this topic, I hope you can analyze it. Appreciate it! !

This post is from 51mcu
 
 
 

6062

Posts

4

Resources
3
 
This post was last edited by damiaa on 2020-8-8 12:40

Your display is too time-consuming. Put it in the interrupt. Keyscan(); takes a long time to execute once. You can't program like this.

This post is from 51mcu

Comments

I don't quite understand. Isn't keyscan running in a loop in the while statement of the main function? Why does it only run once after a long time?  Details Published on 2020-8-29 08:59
 
 
 

18

Posts

0

Resources
4
 
damiaa posted on 2020-8-8 12:39 Your display is too time-consuming. Put it in the interrupt. keyscan(); takes a long time to execute once. You can't program like this.

I don't quite understand. Isn't keyscan running in a loop in the while statement of the main function? Why does it only run once after a long time?

This post is from 51mcu

Comments

It means that keyscan() does not need to be run all the time. It should be run for a longer period of time, such as putting it in a timer interrupt. In this way, it can scan once every 10ms or 20ms. No time is wasted.  Details Published on 2020-8-30 12:48
 
 
 

6062

Posts

4

Resources
5
 
liwing666 posted on 2020-8-29 08:59 I don't quite understand. Isn't keyscan running in a loop in the while statement of the main function? Why does it only run once in a long time?

It means that keyscan() does not need to be run all the time. It should be run for a longer period of time, such as putting it in a timer interrupt. In this way, it can scan once every 10ms or 20ms. No time is wasted.

This post is from 51mcu

Comments

Senior, shouldn't the more the keyboard is scanned, the more sensitive it is to key presses?  Details Published on 2020-9-2 08:06
 
 
 

18

Posts

0

Resources
6
 
damiaa posted on 2020-8-30 12:48 It means that keyscan() does not need to be run all the time. It should be run for a longer period of time, such as putting it in a timer interrupt. In this way, it can be scanned once every 10ms or 20ms. ...

Senior, shouldn't the more the keyboard is scanned, the more sensitive it is to key presses?

This post is from 51mcu

Comments

That's not the case. How sensitive can humans be with CPU US-level speed? Even if they are sensitive, it's still 100ms.  Details Published on 2020-9-2 09:53
 
 
 

6062

Posts

4

Resources
7
 
liwing666 posted on 2020-9-2 08:06 Senior, shouldn't the more the keyboard is scanned, the more sensitive it is to key presses?

That's not the case.

CPU US-level speed

How sensitive can humans be? Even if they are sensitive, it is only at the 100ms level.

This post is from 51mcu
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

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