I am building a led chaser with nearly 30 leds on Arduino Due.I have to drive them with pnp transistors without npn transistors which usually we use to switch pnp base pins.Is it OK to make the desired pin LOW and the all rest HIGH on Due?
What is the voltage that the PNP transistors must switch ? Is it the same voltage that the Arduino runs at ( 5 volt or maybe 3.3 volt) or a higher voltage say 12 volts ?
Same voltage (3.3V)
OK. Then it will work without any level shifting npn transistors.
If the voltage to be switched is higher than the voltage of the Arduino, then you may have trouble switching pnp transistors off.
A PNP transistor with emitter to 3.3volt and base with a basecurrent limiting resistor to a pin and LED/resistor between collector and ground will probably work for a 3.3volt processor (Due). Calculate max pin current, max port current, and max chip current before you pick a base resistor value.
But... there is not enough headroom for a blue/white/high-efficient/power LED (with a Vf of ~3.3volt).
Just enough for a common 3mm/5mm red/green indicator LED (Vf ~2volt).
And... there is a current limit for the linear 3.3volt regulator (the 30 LEDs).
Leo..
Thanks