avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] qn regarding interrupt


From: harshit suri
Subject: [avr-gcc-list] qn regarding interrupt
Date: Sat, 5 Jun 2004 13:10:27 -0700 (PDT)

Atmega128 manual: "The External Interrupts 7 - 4 are
activated by the external pins INT7:4 if the SREG
I-flag
and the corresponding interrupt mask in the EIMSK is
set"

requirement is that an external event should trigger
the interrupt flag BUT the interrupt handler should
not be executed at that time. It should just set the
relevant bit in External Interrupt Flag Register –
EIFR. At the end of the loop i shall go and check the
EIFR flags and one by one service the interrupts.
is this correct

--program the EICRA or EICRB registers
--enable relvant interrupts in EIMSK
--But do not sei(); 

this way i hope to enable the interrupts but not jump
to their corresponding interrupt handlers. Is it
correct?

ps: another way would be to have an interrupt handler
that sets some flags.Then poll the EIFR reg at the
end. but then i shall have to write two interrupt
handlers for the same interrupt as i use the same
interrupt for another task. So i dont want to do that.




        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]