weak pull up setting

General discussion on mikroC PRO for PIC.
Post Reply
Author
Message
silvestro71
Posts: 2
Joined: 22 Mar 2011 16:54

weak pull up setting

#1 Post by silvestro71 » 22 Mar 2011 17:12

Hello,
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);
}
CONFIG reg =0x0FF2
what i get is: portc=0b00000000;
Please tell me why??

Post Reply

Return to “mikroC PRO for PIC General”