Quantcast
Viewing all articles
Browse latest Browse all 20587

BASCOM-AVR : VAL (str to val) problem : REPLY

Regardless of the fact that you CAN do complex operations within ISRs, its not good practice. ISRs are for handling time-critical events where you must have a response to some outside event within a few processor cycles. But all other code, like maths, display handling, and any other stuff which takes a long time or ties up mulitple registers, should be handled in the main loop. Where you must respond to an event in an ISR with some complex operation, just set a flag to tell the main loop the ISR has occurred, then handle it in main ( and dont forget to clear the flag ! ).

Viewing all articles
Browse latest Browse all 20587

Trending Articles



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