Interupt proble

Status
Not open for further replies.

pixman

Member
Hi to all

i have found a stange problem when using an interupt.
The circuit is for a small alarm system.
I use the interupt to check if the alarm is on or off with a key switch
or externel remote control.
Then i scan the port that the sensors are connected to.
As you will see in the "loop" section switches portc,2 on and off with a delay of 1 second. This is the problem the portc,2 just gives a blink now and then. If i remove the inertupt portc,2 works fine.


Please help
 

Attachments

  • TX.asm
    5.5 KB · Views: 107
You should not call lots of functions from an interrupt. I haven't counted but it wouldn't surprise me if you have overflowed the stack. In your interrupt just set a flag that you test in the main loop. If you want lots of delays then add a counter to your interrupt and use that to time the delays.

Mike.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…