Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Getting ExtInt0 to Override ExtInt1

2007-07-20 by John Samperi

At 01:52 PM 20/07/2007, you wrote:
>  how can I get the INT0 switch to IMMEDIATELY
>interrupt any code that is running, and go to the EXT_INT0 label and begin
>execution the code there? Right now, what's happening is the INT0 waits
>until the INT1 routine returns back to MAIN before it jumps to the ISR,
>which could be too late....

If INT1 routine or ANY OTHER interrupts routine is running
then nothing else can stop that routine UNLESS you reenable
interrupts within the INT1 routine which is VERY DANGEROUS
unless you handle it properly.

You can get INT1 (and INT0) to simply set a flag and exit and
then you handle their service in the main loop, this way if another
int happens it can be serviced suspending the current service.

STILL IT CAN GET VERY MESSY unless handled properly.

By the way I hope you have RETIs in your interrupts routines.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Email: john@ampertronics.com.au
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.10.10/908 - Release Date: 19/07/2007 6:10 PM

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.