Page 1 of 1

set the B0 after the power reset

Posted: Thu Jan 03, 2008 10:51 am
by saravana_3
Hi friends,
I am using the pic16f84 for programming, I need to get high output at the B0 after the power reset, any one has the idea, how to do it,
thanks
saran

Posted: Thu Jan 03, 2008 12:35 pm
by Benj
Hello Saran

The best you can do is to do the following at the start of your program.

Write to the TrisB register to configure bit 0 as an output.

trisb = 0x00;

Write to the PortB register to output a 1 to the pin.

portb = 0x01;

You cannot have the pin set to 1 as standard on power on because all I/O pins are configured to be inputs as standard.