I'm a little weak with arrays too, but a keypad reader will require one. What you can do is have a subroutine with the master code and use the "big red button" control it. Mister_e did a keypad...Archangel Today, 04:12
Maybe I didn't explain it right.
Lets say you had a keypad with button 0 to 10. Each button press is read as a number under normal operation. Now put a big read button on the wall and allow that...
Using the TRIS register, simply state TRISx = %11111100 assuming you have already set the portx to %00000011 that would make outputs on. You would be switching between input and hot(logic 1) output....Archangel Today, 01:01