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

BASCOM-AVR : redefining interupt service routines : NEWTOPIC

$
0
0
Hi, I can't figure out how to do the following: I have a few (typically 10) [b:da7c7bedb8]very[/b:da7c7bedb8] time critical interrupt service routines. For example let's have these two: isr_200ns and isr_500ns. Their content is very simple: isr_200ns: PORTD.7=1 NOP PORTD.7=0 return isr_500ns: PORTD.7=1 NOP NOP PORTD.7=0 return Now, depending on the value of a certain variable A (e.g. a switch setting) I want to choose which of this isr's is active, so e.g.: if A=1 then on int0 isr_200ns else on int0 isr_500ns end if When compiling I get the error that the ISR is already defined. Why shouldn't it be possible to change isr's during runtime? Or does it have to do with the labels and should I (re)define the isr's in another way? Anybody have a suggestion on how to get this to work? I really can't change the content of the isr's and e.g. do the switching there because as I said they are very time critical. All help is very much appreciated! best, Marc [b:da7c7bedb8][color=red:da7c7bedb8](BASCOM-AVR version : 2.0.7.7 , Latest : 2.0.7.8 )[/b:da7c7bedb8][/color:da7c7bedb8]

Viewing all articles
Browse latest Browse all 20688

Trending Articles



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