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

BASCOM-AVR Old versions : PIN Change Interrupt BASCOM Version 2.0.7.5 : REPLY

$
0
0
Hello The following code works. But I would like to understand why there is no output printed from the ISR as per the code posted before. Thank you for all your help. I am a newbie in coding [code:1:cd8f45f6ef]$regfile = "M164pdef.dat" $crystal = 14745600 'this freq give 0.0% error for all baud rates up to 115200 $baud = 57600 Config Porta = Input Porta = &HF 'activate pull up Enable Interrupts 'enable global ints Pcmsk0 = &B00000100 Do If Pcifr.pcif0 = 1 Then ' change detected Print "pina.2 has changed" 'in this case it must be pinc.0 Pcifr.pcif0 = 1 ' write a 1 to clear the flag so we can detect it again End If Waitms 200 Loop End[/code:1:cd8f45f6ef]

Viewing all articles
Browse latest Browse all 20688

Trending Articles



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