Quote Originally Posted by jessey View Post
Oh, Steve I tried using SSPCON1=1 and I still can't seem to get pin 10 working as either a digital input or output. I tried it on a couple of different 452's with the same results?
Thanks
jessey
Very well commented code indeed...BUT...the code, as a whole, looks entirely too over-written, over-designed, over-complicated, for the end result. This almost looks like something written for the Space Shuttle or something

At any rate, back to the PortE.2 thing...
Back to the basics is all I can say. Get a fresh breadboard, get a fresh PIC, a push button and an LED. Put the button on PortE.2 with a pullup (or a pulldown, whatever works), put the LED on another Port, whichever you want. Write a program that makes the LED follow the button's input, and ONLY the button's input...like:

button var porte.2:input button:led var portb.0: output led:led=0

main:
if button = 1 then LED = 1
if button = 0 then LED = 0
goto main

If that doesn't work right off the bat, then start playing with the config registers until things start working.

I've read other posts from you, I know you've got a decent grasp on how to run these PICs. Sometimes a guy just forgets something stupid and silly and it kicks him in the arse for days...gotta break it back down to the basics.
For all you know, the lead going to PortE.2 is open somewhere, or the switch itself is shot.