Hi all,
I am creating my first application using a PIC. I have used all of the pins on the 16F627 and so need to use RA5. However I can't get it to act as an input. I have used the following lines to configure the comparators:
MOVLW B'00000111'
MOVWF CMCON
and I have added the following to the __CONFIG line:
_MCLRE_OFF
I have tried the same bit of circuit on a different input line and it works so I know it is not he external circuitry.
I have tied the RA5 pin to +5V using a 330K resistor and then use a switch to ground (as I have done with the other working inputs).
The program appears to read the pin as a zero and when I press the switch resets the micro.
Any ideas would be greatly appreciated.
I am creating my first application using a PIC. I have used all of the pins on the 16F627 and so need to use RA5. However I can't get it to act as an input. I have used the following lines to configure the comparators:
MOVLW B'00000111'
MOVWF CMCON
and I have added the following to the __CONFIG line:
_MCLRE_OFF
I have tried the same bit of circuit on a different input line and it works so I know it is not he external circuitry.
I have tied the RA5 pin to +5V using a 330K resistor and then use a switch to ground (as I have done with the other working inputs).
The program appears to read the pin as a zero and when I press the switch resets the micro.
Any ideas would be greatly appreciated.