I was thinking of testing the whole port at the same time,
and then, if it was different, doing a bitwise and on the current and past state.
...you can read all of the switchs in only 2 clock cycles, ...
But there are only 8 pcints, i need 12.
Quote...you can read all of the switchs in only 2 clock cycles, ...Or you can use interrupts to do this in effectively zero clock cycles.... That is precisely the purpose of having a pin change interrupt. The use of interrupts makes your programming easier, not more difficult as many fear.Don