P
Pete Verdon
- Jan 1, 1970
- 0
Hi,
I'm a software developer dabbling in hardware for the first time,
building a device controlled by a PIC microcontroller, specifically a
16F914:
http://www.microchip.com/stellent/groups/picmicro_sg/documents/devicedoc/en020956.pdf
This IC is described as "high power, suitable for direct connection of
LEDs", which is mostly what I need. However, my LEDs are 20mA ones, and
the spec sheet says that the maximum power source capability of the chip
is 200mA. Presumably this means I can only drive ten such LEDs, since
there are situations in which they must all be on simultaneously.
Unfortunately I need each chip to run up to 16 LEDs, plus a small number
of other things (logic connections to other ICs, pushbuttons, etc).
I have thought of two solutions to this - or possibly three if we
include the option of just not worrying about it and assuming the specs
have a large enough margin (not something I would want to do without
knowledgeable advice). The other two are:
1. Since the chip has both a 200mA source capacity and 200mA sink,
connect half the LEDs with their positive sides to the chip and drive
the pins high to light them, and the others the other way round and
drive the pins low. I have no idea if this is a sensible proposal, but I
can't immediately see a problem. Maybe as a software engineer I see
things too abstractly.
2. Pulse the LEDs so that only half of them are on at any given time, so
quickly that the flicker will not be noticeable. I don't entirely like
this idea, partly because it will mean the LEDs are dimmer and partly
because I'm wary of introducing high-frequency noise into the circuit.
Any advice would be welcome.
Pete
I'm a software developer dabbling in hardware for the first time,
building a device controlled by a PIC microcontroller, specifically a
16F914:
http://www.microchip.com/stellent/groups/picmicro_sg/documents/devicedoc/en020956.pdf
This IC is described as "high power, suitable for direct connection of
LEDs", which is mostly what I need. However, my LEDs are 20mA ones, and
the spec sheet says that the maximum power source capability of the chip
is 200mA. Presumably this means I can only drive ten such LEDs, since
there are situations in which they must all be on simultaneously.
Unfortunately I need each chip to run up to 16 LEDs, plus a small number
of other things (logic connections to other ICs, pushbuttons, etc).
I have thought of two solutions to this - or possibly three if we
include the option of just not worrying about it and assuming the specs
have a large enough margin (not something I would want to do without
knowledgeable advice). The other two are:
1. Since the chip has both a 200mA source capacity and 200mA sink,
connect half the LEDs with their positive sides to the chip and drive
the pins high to light them, and the others the other way round and
drive the pins low. I have no idea if this is a sensible proposal, but I
can't immediately see a problem. Maybe as a software engineer I see
things too abstractly.
2. Pulse the LEDs so that only half of them are on at any given time, so
quickly that the flicker will not be noticeable. I don't entirely like
this idea, partly because it will mean the LEDs are dimmer and partly
because I'm wary of introducing high-frequency noise into the circuit.
Any advice would be welcome.
Pete