Hi,

I wrote a program on the 16F876 but realized that I do not need the amount of pins that this PIC has so I transferred it to the 16F688. This program worked good on the 876 but I can't get anything to work on the 688. I decided to use the internal oscillator and I worked backwards to using just one input and one output and it still does not work. Below is just a simple program that turns on an LED when a button is pushed but I still can't get it to work:

PAUSE 1000
HIGH PORTC.2
PAUSE 1000
LOW PORTC.2

START:
IF PORTC.5=0 THEN LEDON <---PortC.5 is a 1 but the PIC thinks it is a 0.
GOTO START
LEDON:
HIGH PORTC.2
PAUSE 500
LOW PORTC.2
PAUSE 500
GOTO START

I tried a few different 688's and they all work the same so I am beginning to think that I am doing something wrong in the programming. I have used the 877 and 876 with the original program and it works fine.

To set the internal oscillator, I use the "C" on micro code studio. I tried the same program on porta.0 and it seemed to work better but it still does not make any sense. Can anyone help with this problem?