Re: Problem with handling interrupts

Francois Lorrain <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <CAJERwX78E-GToQ8CK3RTpGryxkqLkd_=pcCnrYniynsfnk4bJw@mail.gmail.com>
Hello,

In the interrupt routine, just read the PIND register and look at which one
changed ...

Regards

Francois


On Tue, Jan 14, 2014 at 2:48 PM, dfx <[email protected]> wrote:

> Hello,
>
> my problem is the following:
>
> suppose we have 8 keys all connected to the same port (for. eg. D) of an
> AVR processor (eg. ATmega324) and that all pins have the interrupt enabled.
>
> If I understand correctly, when I press any key is called the same ISR
> (PCINT3_vect) and a single flag is set (PCIE3).
>
> Question: How do I know which button was actually pressed?
>
> thank you very much
>
> --
> Domenico Formenton
> Tel. 06 92731757
> Fax. 178 2250847
> Cell. 333 7075929
>
>
>
> ---
> Questa e-mail è priva di virus e malware perché è attiva la protezione
> avast! Antivirus.
> http://www.avast.com
>
> _______________________________________________
> AVR-GCC-list mailing list
> [email protected]
> https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
>
>

_______________________________________________
AVR-GCC-list mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.