OK we had to dig into this further to make sure you can power up LEDs directly from FEZ directly. The on-board LED(s) are connected directly but we wanted to double check with datasheet to make sure this is within specification.
Looking at “10.3 Electrical pin characteristics” you can see a graph of voltage vs current which goes up beyond 16mA. The voltage will drop but this will not damage your FEZ.
So, go ahead and connect LEDs directly but, as in any microcontroller, do not forget to add a resistor. A 470 ohm resistor is recommended, which will result in under 10mA consumed from the IO.
Thank you Gus for taking the time to dig into this, but I still have one question. What is the total current say a Panda can handle? Can it handle 10mA on each IO pin and source 600mA if a LED was attached to every pin? (I would think not)
Not sure what is the total since this is not in the datasheet listed above. I do not think such info would be provided or tested by the processor makers since the processors are not made for loads but for signals. Yes simpler 5V 8-bit micros are made to handle a lot of current but that is not the case on moderns 32-bit processors.
Lets put it this way, if you want to connect few LEDs to FEZ directly then go ahead. If you want to load every single pin on the processor then this shouldn’t be done on any modern system, including FEZ. You will need to add some transistors.
Are those values that are you using for your calculations Gus ?[/quote]
I did those the numbers in my head and assumed the diode drop is about 0.7V, which is less than what an LED really is but I wanted to be more on the bad side to make sure we will not have problems.
Again Gus, Im not dissing the system, but users should be aware of the limitations with driving things directly on the IO pins. A user might start up with the on board LED, then adding more for testing. Maybe do a Knight Rider sequence. All is fine then try to top it off and flash all LEDs just to fry his board. I mean with 60 IOs its tempting.
[quote]Again Gus, Iâ��m not dissing the system, but users should be aware of the limitations with driving things directly …
[/quote]
Yes and if you know the limits you shouldn’t use anything close to the limits either.
If you want a simple answer, connect up to 5 LEDs to FEZ directly and never worry about it.
The limits can be a lot more than 5 but why bother risking. Yes 60+ IOs but please put them to better use than just LEDs … if you still need 60 LEDs then 3904 transistors are your friends
If you want to drive heaps of leds couldnt you just run a high power, single input multi output, shift register attached to a serial port. it would save on using true IOs to run leds
Speaking of such mundane things as transistors, I usually just pick up whatever Radio Shack has sitting around around, but in the last few days I’ve seen (for good reason) 3904’s cited, a preference for using 74HS CMOS logic chips and a few others.
Now I’ve actually got a capable processor board and I need to start fabricating stuff, I’ve got more specific needs for components like MOSFETs etc.
Any recommendations on a good, no-nonsense supplier who will sell components in small quantities?