Quote:
Originally Posted by Browzilla
Those PICs are looking pretty nice and cost-effective, but I can't determine which model I need.
|
I originally suggested you try the
16f627A they can source/sink 200mA total with any one pin doing up to 25mA. The catch is it sounds like you are going to be hooking up 18 LEDs (six packages with three LEDs in each to achieve the multi-colour effect.) Although you can, with sufficient programming trickery using the PIC's tri-state (high, low and high-impedance) I/O capacity, run many more than 18 LED's off the PIC's 18 outputs, and can use PWM to ensure that you don't exceed the current capacity of the chip, that is hardly a fun way to start.
Now this means that you are going to be looking for a very specific set of characteristics. First of all, if you want to use the freeware PICC Lite compiler, you will be limited to the
processors supported by that compiler. Secondly you will want at least 18 I/O pins. Thirdly, you would probably like to have the PIC able to handle a fair bit of current. 200mA is the maximum I have seen any PIC listed as handling, so that means that if you want to have all six "lights" go white (all 18 LED's on at the same time) you will either run each LED at about 10mA, or will need to do as Don suggests and use some transistors or else an IC capable of boosing the power output a bit. Note that uC's are not known for being a robust source of power, so being able to source/sink up to 200mA is pretty impressive for a little PIC chip.
I'm also assuming that you want to use a DIP package for "through hole" mounting, typical of a common home made circuit board or breadboard, rather than a surface-mount package.
The constraints of PICC lite are probably the most severe. Most of the chips supported by it are 18 pin chips with just 15 I/O lines... not quite enough unless you cut back to 5 tri-colour LED's. However there are some larger PICs that it supports. One possibility is the
16f917. Note that this chip only handles 90mA source/sink across all ports, so some form of amplification will be needed. Another possibility is the
16f887 or
16f877a. Note that the 877a can handle 200mA, so the idea of running all 18 LEDs at 10mA without external amplification is possible on this chip... but it costs a bit more.
What I would suggest is picking a few PICs that might work out okay, then going to
www.microchip.com and finding the "sample" button in the middle of the screen and asking them to send you a couple samples that you can try out.
And while you are at it, perhaps someone reading this thread who is familiar with a broader range of IC's might be able to suggest a buffer or opto-isolator or similar chip that would be capable of driving 18 LED lines at 20mA each so that you wouldn't need an individual transistor for each line.
Jason