Searching \ for '[PIC:] Controlling 8 bi-color LEDs' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/displays.htm?key=leds
Search entire site for: 'Controlling 8 bi-color LEDs'.

Exact match. Not showing close matches.
PICList Thread
'[PIC:] Controlling 8 bi-color LEDs'
2004\06\26@102130 by Anthony Van Herrewege

picon face
> Why don't you just use 5 PIC port pins?

Hm, that could be an option, but I'd rather not use that much pins. I've only got 6 pins left on the PIC18F452 and I'd like to keep those. The fewer pins used the better.

{Quote hidden}

Well, using 1 PIC port for each LED is out of the question. Using 3-wire bi-color LEDs is out of the question, since the switches only have 2 holes to mount a LED into. Well, unless you know of a nice switch that cathers for 3-wire LEDs. I've browsed the whole Farnell catalog for useable switches and the Mec Multimec 3F were by far the nicest, although I have to admit that they are pretty expensive :(.

I asked samples, when I receive them, I'll see if it is possible to drill an extra hole in the switch so that 3-pins LEDs can be mounted. I'm afraid it won't be possible though.

> I *think* you would need 16 pins to control 8 * 2-pin LEDs. If so, you
> could either connect 2 * 8-bit SRs serially and have each LED to an
> adjacent pair of SR o/ps or use the SRs in parallel with the LEDs
> between them (ie SR1d0 - LED+R - SR2d0), which amounts to the
> same thing except 1 * 16-bit is a little simpler to i/f to
>
> OTOH Maxim et al are always putting out new LED controller ICs

I'd like PWM to be able to dim the LEDs at night, for example when I want to fall asleep with music playing, so that I don't get disturbed by the bright LEDs. A blink function would be good too, that would free up the I2C bus (or the SPI bus of course) when I need to blink the LEDs. I saw that the MAX7314 has a blink input & PWM support, but it can only source current, so it's no good either. Does anybody know of a chip that can both source & sink current (10-15 mA per I/O should be fine) and that has blink & PWM output support?

It looks like Philips has got an even beter chip, the PCA9532, it does the blinking on it's own, but it can't source current either.

Hm, what about using a chip such as the Philips PCA9532 and let it drive 2 octal buffers such as the 74HC541. Could that work? If course it takes up a lot more space which isn't all that good either, but it's still better than occupying the I2C bus all the time.

Help! I just spend 3 hours searching the net for a chip that has I2C/SPI control, 16 outputs, blink & PWM function and that can both sink & source current and nothing turned up :(.

Regards, Anthony Van Herrewege

PS: I added info on the preamp I'm making to my website, check it out here: http://members.lycos.nl/anthonvyh/index.php?page=preamp-main. Oh, and if you see anything stupid (and I'm sure the circuit's full of stupid mistakes), please inform me about it. Thanks!



Website: http://members.lycos.nl/anthonyvh


---------------------------------
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\06\26@130009 by Dwayne Reid

flavicon
face
At 08:22 AM 6/26/2004, Anthony Van Herrewege wrote:
> > Why don't you just use 5 PIC port pins?
>
>Hm, that could be an option, but I'd rather not use that much pins. I've
>only got 6 pins left on the PIC18F452 and I'd like to keep those. The
>fewer pins used the better.

Then just use an 8 pin PIC to drive the LEDs.  The LEDs are matrixed onto 4
or 5 pins.  Talk to it serially via the input-only pin (GPIO3).  Its a tiny
footprint and probably much cheaper than the alternatives.

dwayne

--
Dwayne Reid   <spam_OUTdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax

Celebrating 20 years of Engineering Innovation (1984 - 2004)
 .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-.   .-
    `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'   `-'
Do NOT send unsolicited commercial email to this email address.
This message neither grants consent to receive unsolicited
commercial email nor is intended to solicit commercial email.

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\06\26@183851 by Anthony Van Herrewege

picon face
> Then just use an 8 pin PIC to drive the LEDs.  The LEDs are matrixed onto 4
> or 5 pins.  Talk to it serially via the input-only pin (GPIO3).  Its a tiny
> footprint and probably much cheaper than the alternatives.
>
> dwayne

Ah yes, off course, great idea! And I could add PWM & blinking support and everything in software. But how do I connect those 2-pins bicolor LEDs to the pins? I tried to figure it out, but unfortunately, I didn't succeed...



Website: http://members.lycos.nl/anthonyvh


---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\06\26@195121 by Bob Barr

flavicon
face
On Sat, 26 Jun 2004 07:22:18 -0700, Anthony Van Herrewege wrote:

>> Why don't you just use 5 PIC port pins?
>
>Hm, that could be an option, but I'd rather not use that much pins. I've only got 6 pins left on the PIC18F452 and I'd like to keep those. The fewer pins used the better.
>

I haven't been following this thread too closely so this may not be an
option for you but take it for what it's worth (if anything).

It should be possible to connect your LEDs between the outputs of two
8-bit serial-to-parallel shift registers. For one color, write a 1 to
one of the registers and a 0 to the other. Swap these bits for the
other color. Write a 0 to both bits for LED off. Actually, writing a 1
to both pins would turn the LED off as well.

If flicker isn't a concern while changing the LEDs, all you'd need is
1 clock line and 1 data line out of the PIC. Otherwise, you'll need a
third line to latch the data (and, of course, shift registers with a
latch-enable input).


Regards, Bob

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\06\26@201650 by Spehro Pefhany
picon face
At 03:39 PM 6/26/2004 -0700, you wrote:
> > Then just use an 8 pin PIC to drive the LEDs.  The LEDs are matrixed onto 4
> > or 5 pins.  Talk to it serially via the input-only pin (GPIO3).  Its a tiny
> > footprint and probably much cheaper than the alternatives.
> >
> > dwayne
>
>Ah yes, off course, great idea! And I could add PWM & blinking support and
>everything in software. But how do I connect those 2-pins bicolor LEDs to
>the pins? I tried to figure it out, but unfortunately, I didn't succeed...


You need 5 and 5 resistors (one in series with each port pin).
Connect each LED back-to-back pair across one unique pair of pins after
the series resistor, of which there are 10, so you have two spare.

Only one LED can actually be on at once, but by multiplexing you can have
more than one apparently on.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam@spam@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

2004\06\27@073656 by Anthony Van Herrewege

picon face
> I haven't been following this thread too closely so this may not be an
> option for you but take it for what it's worth (if anything).
>
> It should be possible to connect your LEDs between the outputs of two
> 8-bit serial-to-parallel shift registers. For one color, write a 1 to
> one of the registers and a 0 to the other. Swap these bits for the
> other color. Write a 0 to both bits for LED off. Actually, writing a 1
> to both pins would turn the LED off as well.
>
> If flicker isn't a concern while changing the LEDs, all you'd need is
> 1 clock line and 1 data line out of the PIC. Otherwise, you'll need a
> third line to latch the data (and, of course, shift registers with a
> latch-enable input).
>
> Regards, Bob

I thought of that too, but, as someone else pointed out, it would take up a lot of space.

> You need 5 and 5 resistors (one in series with each port pin).
> Connect each LED back-to-back pair across one unique pair of pins after
> the series resistor, of which there are 10, so you have two spare.
>
> Only one LED can actually be on at once, but by multiplexing you can
> have more than one apparently on.
>
> Best regards, Spehro Pefhany

Thanks! Thanks a lot! That should be pretty simple, even although I've never done any PIC programming. The PIC12F683 looks good, too good even, but the price diffence between all the PIC12F parts is only $0.45 anyway. And 2 more LEDs I can connect, great, that's just what I need. And I have 3 more pins free on the 6 pins connector I'll use. Ha, this just couldn't be better :). Just to be sure I did it right, if it's not too much asked, could you please check this: http://members.lycos.nl/anthonyvh/images/preamp-buttons1-big.gif?

Regards, Anthony


Website: http://members.lycos.nl/anthonyvh


---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\06\27@084421 by Spehro Pefhany

picon face
At 04:36 AM 6/27/2004 -0700, you wrote:

> > You need 5 and 5 resistors (one in series with each port pin).
> > Connect each LED back-to-back pair across one unique pair of pins after
> > the series resistor, of which there are 10, so you have two spare.
> >
> > Only one LED can actually be on at once, but by multiplexing you can
> > have more than one apparently on.
> >
> > Best regards, Spehro Pefhany
>
>Thanks! Thanks a lot! That should be pretty simple, even although I've
>never done any PIC programming. The PIC12F683 looks good, too good even,
>but the price diffence between all the PIC12F parts is only $0.45 anyway.
>And 2 more LEDs I can connect, great, that's just what I need. And I have
>3 more pins free on the 6 pins connector I'll use. Ha, this just couldn't
>be better :). Just to be sure I did it right, if it's not too much asked,
>could you please check this:
>http://members.lycos.nl/anthonyvh/images/preamp-buttons1-big.gif?
>
>Regards, Anthony

The matrix looks okay, however note one of the classic PIC gotchas.. the
GP3 pin is INPUT ONLY.

Also check to make sure that none of the other output pins are open drain.

You can reduce the number of resistors to 5 by halving the value and putting
them in series with the outputs rather than the LEDs.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
speffspamKILLspaminterlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

2004\06\28@095714 by Anthony Van Herrewege

picon face
> The matrix looks okay, however note one of the
> classic PIC gotchas.. the GP3 pin is INPUT ONLY.
>
> Also check to make sure that none of the other
> output pins are open drain.
>
> You can reduce the number of resistors to 5 by
> halving the value and putting them in series with
> the outputs rather than the LEDs.
>
> Best regards, Spehro Pefhany

I noticed my mistake with GP3, I changed the schematic
now. Thanks for the tip on the resistors, that should
make everything even more simple.

I started writing my first ASM program for the LEDs
and I think I got part of the code OK, but I'm tired
of looking at it for the moment.

Regards, Anthony

=====
Website: http://members.lycos.nl/anthonyvh




__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email .....listservKILLspamspam.....mitvma.mit.edu with SET PICList DIGEST in the body

2004\06\28@101244 by Kyrre Aalerud

flavicon
face
Some students at my university anted to do this once...
What they ended up with was wiring the circuit a bit oddly, so that one pin
would have more than one function.

Imagine 4 pinns [0-3] where the first Bi-color led was connected with the
common pin to pin0 and the two color pinns to 1 and 2.
To make it light, pin0 need to be low I think, and one of the color pinns be
high.  Then one would turn it off and lower pin 1 while turning on either
pin 2 or 3.  I think this was how it was wired.  It was in such a way that
one didn't get spurious lightings, but it did work.  The leds could be run a
bit hader as they would be on a 25% dutycycle in this application using only
4 I/O ports.

Kyrre


{Original Message removed}

2004\06\28@105624 by Matthew Brush

flavicon
face
I'm just kinda jumping in on this thread, but what
about a 4 to 16 multiplexer like the 74HC154 (i
think)?

each led gets two outputs, one for each color.

This would take at least 4 I/O pins on the PIC and
maybe another to clock the multiplexer, but it'd be
small and fancy.

Just an idea...cheers

=====
MJ Brush
LeftClick.ca Internet Media Services
mbrush@[NOSPAM]leftclick.ca

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email EraseMElistservspam_OUTspamTakeThisOuTmitvma.mit.edu with SET PICList DIGEST in the body

2004\06\28@200533 by Anthony Van Herrewege

picon face
--- Matthew Brush <matthewbrushspamspam_OUTYAHOO.CA> wrote:
> I'm just kinda jumping in on this thread, but what
> about a 4 to 16 multiplexer like the 74HC154 (i
> think)?
>
> each led gets two outputs, one for each color.
>
> This would take at least 4 I/O pins on the PIC and
> maybe another to clock the multiplexer, but it'd be
> small and fancy.
>
> Just an idea...cheers
>
> =====
> MJ Brush

Well, if I use a PIC12 instead of a multiplexer I only
need 1 I/O pin on the PIC, 2 if I want to make sending
data easier.

Regards, Anthony

=====
Website: http://members.lycos.nl/anthonyvh




__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email @spam@listservKILLspamspammitvma.mit.edu with SET PICList DIGEST in the body

2004\06\28@201159 by Anthony Van Herrewege

picon face
--- Kyrre Aalerud <KILLspamkreatureKILLspamspamC2I.NET> wrote:
{Quote hidden}

I can't use that kind of bi-color LEDs. I have to use
2-legged bi-color LEDs, there isn't any common pin,
the supply needs to be reversed to switch colors.

Anthony

=====
Website: http://members.lycos.nl/anthonyvh




__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
email RemoveMElistservTakeThisOuTspammitvma.mit.edu with SET PICList DIGEST in the body

2004\06\28@205317 by Kyrre Aalerud

flavicon
face
ahh.  Why not connect them in a tandem like way anyway ?
What would happen is current can go through the led between the two pinns
you activate as + and - but it will also try to go through all the other
pairs via the other led's.  The last one would not make the LED's light up.


Kyrre

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2004 , 2005 only
- Today
- New search...