This is why engineering is an art, not a science!If my way of doing (thinking) is completely wrong, how would this kind of problem be resolved in an industrial environnement? Would they just use a 20 I/O ports PIC?
Finally, I ask myself if this can be done ... or not?
Let's sum up what we know so far:
1. It is a 5 VDC circuit.
2. The LEDs require more current than a PIC pin can source or sink.
3. There are three permitted states for any pair of LEDs--one or the other is on, or they are both off. They are never both on at the same time.
4. There are 10 output channels.
Beyond this, we don't know what you are attempting to do, or why. In other words, we don't know your intended application.
And there are questions: Do you have to use such current-hungry LEDs? Why? Of 10 channels, how many LEDs are likely to be on at the same time? Do you have size and/or board space limitations?
Alain suggests using "classic" transistors (I think he means ones without the built-in resistors). This sounds like one good approach. I would go further and suggest generic switching transistors driven well into saturation. Going to a 20-port PIC would also work, with the advantage of allowing you to use transistors that are all the same.






Bookmarks