I'd like to ask for the right settings for internal weak pull up of PIC16f690 (PICkit 2).
I just want to sent portA pulled up bits to portC, this is the code:
Code: Select all
void main()
{
trisa=0xff;
ANSEL=0;
ANSELH=0;
trisc=0;
OPTION_REG = (OPTION_REG & 0b01111111);// clear bit 7 (RABPU)
WPUA=0xff; // enables pull ups
do
{
portc=porta;
}
while(1);
}
what i get is: portc=0b00000000;
Please tell me why??