Electronic – Why do we use pull up resistor with PIC

floatingpulluptransistors

enter image description here

I tried to find an appropriate answer for the question but couldn't find what I needed exactly. I found out that "Initially the output from the PIC is floating and we use the pull up resistor R7 to turn OFF the transistor". My specific questions are:

  1. How will the floating output from the PIC affect the base of the transistor? Will it make it fluctuate between ON/OFF state?
  2. What would happen if we don't have the pull up resistor?
  3. Is there any risk of the transistor being destroyed because of the floating output form the PIC?
  4. How will the pull up resistor put the transistor in OFF state when there is floating output from the PIC?

Best Answer

A floating output can be due to the pin being configured as an input (quite common) or it is truly tri-state

1.How will the floating output from the PIC affect the base of the transistor? Will it make it fluctuate between ON/OFF state?

With the pullup in place, the transistor is solidly pulled to the OFF state.

2.What would happen if we don't have the pull up resistor?

Without the pull up, the state of the transistor will be indeterminate; there will only be leakage (in the order of μA) in or out of the controller pin, so the transistor might be either on or off, or possibly fluctuate as you mention.

3.Is there any risk of the transistor being destroyed because of the floating output form the PIC?

Highly unlikely, but it might depend on the transistor load.