micro I/o lines

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Hi all,
I need to understand micro I/o lines for a PIC 18F.
If I put a 10k pull up on a pin, and configure the pin as a input. It will read high. But if the same pin is set to an output, what happens? Also can I drive this low even though it has a pull up, by this I mean using the internal FET or open collector transistor inside the micro?
Best regards
Raj
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
If I put a 10k pull up on a pin, and configure the pin as a input. It will read high.

Unless something else pulls it (harder) to ground.

But if the same pin is set to an output, what happens?

The output takes the state you set it unless the pull up resistor has such a low value that the microcontroller can't pull it low. in addition, when you set the output to a low state current will flow through the resistor.

Also can I drive this low even though it has a pull up, by this I mean using the internal FET or open collector transistor inside the micro?

Yes. If the output is open collector then this is the only way to get a high level on the output.
 
Top