Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20780

BASCOM-AVR : pulse length capture : REPLY

$
0
0
[quote:3bae59c18a="philm"]here are some snips of code.[/quote:3bae59c18a] Not sure about the value of incomplete code missing all its variable definitions. Also one of your code's problems is it's unhandled race-condition, when the overflow int occurs, while execution of the icp int is on it's way. Potential is wasted by resetting the counter, instead of pushing the icp simply into a 16 bit unsigned variable and do it by subtraction. No mechanism also to protect the result from being modified, while it's being output. And finally I'm wondering, whether you get what you ask for, as the Bascom syntax does not require to have NOSAVE separated by a comma: [quote:3bae59c18a][code:1:3bae59c18a]On Icp1 Nt , Nosave[/code:1:3bae59c18a][/quote:3bae59c18a] Did you disassemble your code at least one time, to check how the isr's actually get compiled?

Viewing all articles
Browse latest Browse all 20780

Trending Articles



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