First, TRISA=1 is not what you want. You want to set pins 2 and 5 as input:
TRISA=%00100100
Start counting from right, 0 to 7.
Next, keep things simple. Make a copy of this program and remove all code after MAIN.
Then make 2 LEDs turn on and off by pressing the 2 inputs buttons.
Once that works, add the rest a bit at a time.
Robert
Bookmarks