08-18-2013 10:01 PM
Hi,
I need drive 4 red LEDs with the signle digital output port of USB-6210.
I'm wondering if it is possible some how drive the LEDs without using a transistor?
Thanks.
08-19-2013 12:22 PM
Configure the digital outputs to sink the current, rather than sourcing it.
Hook all the LEDs up to a common +V supply, through current-limiting resistors, and switch the DO to ground to turn the light on.
You can invert the logic in software to make true turn it on.
There's a wiring example in page 6-3, "Connecting Digital I/O Signals on USB-6210/6211/6215/6218 Devices", of the 621x manual:
08-19-2013 07:46 PM
Thanks for your reply.
But is it able to sink all that current from each of the four LEDs? Assuming 20mA each, that would be 80mA of current when all LEDs are turned on.
08-20-2013 01:20 PM
Try it and see what happens?
If the load on each line is within its tolerance (see datasheet/user manual) and the supply can source the current it'll be fine.
If you're really worried about it or want some additional power capability you can use a driver like a ULN2003. But for a typical 5mm indicator LED you can drive it right from the 5V/DO lines.