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
set the B0 after the power reset
-
- Posts: 61
- Joined: Thu Dec 20, 2007 4:23 pm
- Location: singapore
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel