When using common-cathode 7-segment display we use NPN transistors with the emitter connected to GND and collector to the 7-segment display.
In contrast when using common-anode 7-segment display we use PNP transistors with the emitter connected to +5V and the collector to the 7-segmnet display.
In both cases the emitter is connected to a fixed voltage potential and the 7-segment display is connected to the collector. Why?
Also, a resistor is required to limit the base current since not using it will mean that driving the base emitter junction using 3.3V or 5V may cause the base emitter junction to be destroyed. Please correct me if I am wrong about this.
Now my question is, why do we not do this the other around i.e use PNP transistor with common-cathod and NPN with common-anode. In both cause we just want a current path from +5V (or +3.3V) to ground that can be switched on or off. Either PNP or NPN can do that right?
Presume you don't have supply voltages outside the 0/5 or 0/3.3V range available.
Common cathode display can be switched with PNP. But you can't achieve the low voltage drop (e.g. 0.1 V) of the NPN switch without a negative base voltage supply. Minimum voltage drop is at least equal to the base-emitter forward voltage. For this reason, NPN is usually preferred.
The collector of a transistor can be used as a switch with a low base voltage and current turning it on. The logic circuit driving the base has a voltage drop when it is loaded that does not matter when the emitter of an NPN transistor is grounded.
But you are thinking about using an emitter-follower that is not a switch. The emitter voltage is 0.7V or more less than the base voltage when the emitter-follower is turned on. If the power supply is +3.3V and the logic driving the NPN transistor base can supply the required base current then the base voltage will be maybe 2.7V or less and the emitter driving the common anode will be 2.0V or less which might be too low to light some LEDs.
So far I know, current for common cathode display is sourced by microcontroller or other device and NPN transistor sinks that current causing the display lit. On the other hand, in case of common anode display, current is sourced by PNP transistor and the microcontroller or other device sinks that current. Obviously a resistor is placed to limit the base current. I doubt if both the transistors will work in same configuration.