Take a PNP bi-polar transistor. Connect 0 volts directly to the base. Connect 5 volts directly to the emitter. Connect the anode of the LED to the collector, and the cathode of the LED to ground.
Now obviously, in everyday life, you put a resistor going into the base, and also a resistor in series with the LED. Why? To stop:
1) Damage to the transistor from having too much base current 2) Damage to the LED from having too much current thru itRegarding the LED, well a friend of mine has told me of experiments where people flashed a normal LED with as much as an entire ampere, and it worked fine because the duty cycle and the pulse width were sufficiently low that the LED didn't get damaged. This is quite easy to see if you take a green diode; if there's too much current, it will glow yellow. On my own board, my green LED's stay green.
It seems quite conceivable to me that I'm experiencing the same thing with the transistor, i.e. I'm putting a massive current thru it but it's OK because the pulse width and duty cycle are low enough that it won't get damaged.
Another thing I'll look into is the current limit on the microcontroller pins -- specifically, what happens if you try to draw too much current. Maybe the microcontroller will die, or maybe I'll just get an output voltage less than 5 volts. Who knows? I'll look into it.
I'm sure I could find a sufficiently low pulse width and duty cycle that would make ths happen. Whether this pulse width and duty cycle is within the MCU's capability, I don't know.
There's 16 columns. Each column stays lit for 220 microseconds. The shifting time is neglibile compared to the 220 microseconds, so it takes about 3.5 milliseconds to perform one full flash. That gives a frequency of about 284 Hz.
Noted, that answers my question above ^
None specifically on embedded systems, just more generic elecronics.
I'll look into it, thanks.
Each LED gets flashed as follows: Pulse width =3D 200 microseconds Duty Cycle =3D 1/16
The board works perfectly when set like this.
However, if I increase the pulse width to 300 microseconds, the board dies. Perhaps it's the microcontroller that's being killed, perhaps it's the shift register that's being killed. Maybe even the transistors, I don't know.
Thinking about it logically, what exactly changes when I increase the pulse width? Well, current flows for a longer amount of time. The significance of this? Well, current flow produces heat, so maybe too much heat is building up for the duty cycle to compensate for. I don't know, I'll look into it.