CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Communicate with another PIC or IC?!?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








Communicate with another PIC or IC?!?
PostPosted: Mon Oct 19, 2009 6:01 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Oct 19, 2009 6:08 pm     Reply with quote

Look at Microchip i/o expanders:
http://www.microchip.com/ParamChartSearch/chart.aspx?branchID=11034&mid=11&lang=en&pageId=79

Then search the forum for this, to find drivers:
Quote:
mcp23*

http://www.ccsinfo.com/forum/search.php
andrewg



Joined: 17 Aug 2005
Posts: 316
Location: Perth, Western Australia

View user's profile Send private message Visit poster's website

PostPosted: Tue Oct 20, 2009 9:21 am     Reply with quote

You could also consider an "led bar driver" such as the LM3914.
_________________
Andrew
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Oct 20, 2009 12:36 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Wed Oct 21, 2009 2:27 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group