Peter van Hoof wrote: > put some diodes between outputs and keys to prevent blowing up outputs > if more than one key at a time is pressed (my kids would be great in > testing this) The other possibility is to only switch one of them to > output and keep the others inputs. No, actually you switch them between input and output low controlling the TRIS A register while all PORTA bits are written as zero. You also use inbuilt port B pull-ups (not pull-downs as was alternatively mentioned). That's what they are there for. Similarly, while it sleeps, you can pull *all* the port A strobes low and use port B interrupt-on-change to wake it. Even whilst "awake" and not using port B interrupt-on-change, this is the simplest way to poll for any keypress. -- Cheers, Paul B.