Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

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: 105
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.

Latest threads

Back
Top