humm...
nem nas Application notes da NXP , eles usam debounce...
------------------------------------------------------------------------------------
43 if ((IOPIN0 & 0x00004000) == 0x00000000) //check p0.14 is pushed
44 // Looks for the interrupt button to be pushed
45 {
46 IOCLR0 = 0x00000001; //Turning off test pin to show in shutdown
47 write(mask, 0x0); //Store data to external EEPROM
48 IODIR0 = 0x00800000; //set port 0.23 as an out.
49 IOCLR0 = 0x00800000; //Sets extreme power-down mode
50 }
-------------------------------------------------------------------------------------
veja o exemplo completo.
http://www.nxp.com/acrobat_download/app ... 0535_1.pdf
e agora ??
j.silvestre