View previous topic :: View next topic |
Author |
Message |
Guest
|
Communicate with another PIC or IC?!? |
Posted: Mon Oct 19, 2009 6:01 pm |
|
|
Hi, I need to switch on and off LED's, such that when an analogue voltage gets higher, a line of LED's will light up and when voltage gets low the LED's turn off. i.e the first LED will turn on with first 100mV or so, then the next LED will turn on when voltage reaches 200mV and so on, then when drops below 200mV the second LED turns off again.
So far I have a PIC which has 5 pins left to play with. Is there an IC that I can send serial to turn on 1 to 15 LED's at any 1 time and leave them on for any amount of time, or is it recommended to communicate with another PIC with enough pins to control each LED?
Any help appreciated.
Cheers |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
andrewg
Joined: 17 Aug 2005 Posts: 316 Location: Perth, Western Australia
|
|
Posted: Tue Oct 20, 2009 9:21 am |
|
|
You could also consider an "led bar driver" such as the LM3914. _________________ Andrew |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Oct 20, 2009 12:36 pm |
|
|
Why not use a PIC with more pins?
A PIC16F724 with 40 pins costs $1.40 (volume pricing from the Microchip website). |
|
|
John P
Joined: 17 Sep 2003 Posts: 331
|
|
Posted: Wed Oct 21, 2009 2:27 pm |
|
|
It's pretty trivial to drive one or more 74HC595 shift registers; that takes 3 pins.
Or you can use a MAX7219 LED driver, which also uses 3 processor pins and can drive up to 64 LEDs. It has the advantage of not needing any resistors in series with the LEDs. |
|
|
|