Quantcast
Viewing all articles
Browse latest Browse all 20688

BASCOM-AVR : please help with my first project : REPLY

MWS youre right, i mixed it up with ISR a bit. After having had breakfast and blood in my brain, i edited my post while you answered. Still I think it is a good idea only to set flags in a pushbutton sub, see my edited post. I always care not to wait nor pause for to long, or wait for things I dont know how long they could take. If the button here is pressed, and a loop sets the buzzer as long as the button is pressed, the main loop is halted maybe for 10ms, maybe for 10min. That's why I use a lot of flags. But again: one should be as fast and short as possible in an ISR. As subroutine is a part of the main routine and pauses and waiting are allowed (as long as really nessesary). In general, do not wait for things to happen, that could take unpredictable time, while the main loop is halted.

Viewing all articles
Browse latest Browse all 20688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>