Maker Pro
Maker Pro

PIC Micro Output I/O

Rajinder

Jan 30, 2016
568
Joined
Jan 30, 2016
Messages
568
Hi,
I have a question regarding the PIC18F4520 micro. If i connect a 10K pull up to one of the pins and make this as an output. I believe that this will be a logic '1'. If i now make this (still as an output) but output a 0, how can the output be a 0 since it is connected to VCC via a 10K Pull-up.

Best regards,
 

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
Go revisit Ohm's Law. What is the resistance to ground at the output when the output is low?
 
Last edited:

BobK

Jan 5, 2010
7,682
Joined
Jan 5, 2010
Messages
7,682
Connect a 10K resistor from the + to the - terminal of a 1.5V battery. Is the voltage at the - terminal now 1.5V? If not, what is it?

Bob
 

Colin Mitchell

Aug 31, 2014
1,416
Joined
Aug 31, 2014
Messages
1,416
No.

The micro makes the output HIGH or LOW. The 10k has absolutely no effect what-so-ever.
 

Minder

Apr 24, 2015
3,478
Joined
Apr 24, 2015
Messages
3,478
The output either switches to +v or common as per the attached dwg.
M.
 

Attachments

  • PICout.jpg
    PICout.jpg
    17.1 KB · Views: 89

hevans1944

Hop - AC8NS
Jun 21, 2012
4,878
Joined
Jun 21, 2012
Messages
4,878
how can the output be a 0 since it is connected to VCC via a 10K Pull-up.
The output is shorted to common by the lower MOSFET when the output is low. The upper MOSFET in the totem-pole (NOT push-pull) output is turned off when the output is 0. The 10 kΩ "pull up" resistor is in parallel with the upper MOSFET (which is NOT conducting) and therefore provides a small current (about 0.5 mA with Vcc = 5 V) through the lower MOSFET (which IS conducting) when the output is 0. This current is NOT sufficient to raise the output to a logic 1 level. In essence, when the output is 0, the 10 kΩ resistor and the conductive resistance of the lower MOSFET form a voltage divider at the output producing an output voltage equal to (Vcc) (Ron/Ron + 10,000). The value of Ron is very low, about a tenth of an ohm or less, so the effect of Vcc acting through the 10 kΩ resistor is negligible.
 
Top