Take the advise from Bruce in post 5.
Here is an example for a different chip, but you will get the idea. Works much nicer.
http://rentron.com/PICX2.htm
And it may not be causing you trouble now but it could ...Maybe you got my hint...
1 = Input'Set entire PortB as digital input
PORTB = %00000000
TRISB = %00000000
'Set entire PortC as digital input
PORTC = %00000000
TRISC = %00000000
'Set entire PortD as digital input
PORTD = %00000000
TRISD = %00000000
0 = Output
Bookmarks