oddbudman
Member level 5
This is a simple problem lots of people make when coming to grips with PNP Transistors.
I find asking yourself is current flowing in the diode part of the transistor? often helps you understand why a transistor is or isn't turning on.
In your first circuit you would expect a potential difference of 7v from Vs to the output pin of the microcontroller (5v). Hence current will flow through the diode on the pnp transistor turning it on, which would turn the led on.
I like the circuit Gorgon suggested using a NPN to drive the pnp. This circuit demonstrates one important use of a NPN transistor - the Common Emitter Configuration. This configuration allows Voltage translation and inversion (for lack of a better terms).
Hope this helps.
oddbudman
I find asking yourself is current flowing in the diode part of the transistor? often helps you understand why a transistor is or isn't turning on.
In your first circuit you would expect a potential difference of 7v from Vs to the output pin of the microcontroller (5v). Hence current will flow through the diode on the pnp transistor turning it on, which would turn the led on.
I like the circuit Gorgon suggested using a NPN to drive the pnp. This circuit demonstrates one important use of a NPN transistor - the Common Emitter Configuration. This configuration allows Voltage translation and inversion (for lack of a better terms).
Hope this helps.
oddbudman