hi,mesamune80 said:ya,from the above code i already se it as input right?
NO,
Look at the TRISC..... 0 = 0utput... 1 = 1nput
The format of the binary number 00001111, is b7,b6,b5,b4,b4,b3,b2,b1,b0
As PORTC.6 is 0 in the TRISC it an OUTPUT. Set it to 1
example:
TRISC = %01001111
I have run your code in the simulator with TRISC= %01001111 and it works OK.