Doh, Send it to the list, not just to Lawrence :) Definitely time to go to bed.. > -----Original Message----- > From: Ashley Roll [mailto:ash@digitalnemesis.com] > Sent: Tuesday, 5 February 2002 2:40 AM > To: 'Lawrence Lile' > Subject: RE: Re: [PIC]: Driving a dual LED > > > Hi Lawrence, > > I found it impossible to reliably light more then one LED at > once as you will find there are multiple current paths if you > don't float all the other pins when trying to drive one LED. > And also like you said, there are some combinations which you > can't do. > > However you don't actually need to light them at the same > time - just light each one in sequence fast enough and you > can have all the LEDs on at once as far as the eye is > concerned. :) Multiplexing is a very useful trick. You can > even get Yellow out of Bi-colour two leaded LEDs.. :) > > I've also used shift registers as well. Very useful. But it > takes less effort to drive the '138 :) just load a number to > the port, no messing about shifting bits around to send out.. > But it all comes down to what you need at the time and how > much it costs. > > Another thought I just had (beware - its 2:30AM here, so > sentience is not guaranteed) was to have the LED setup like: > > > ^ V+ > | > === Cap > ,-|<-, | > PIC PIN >------+ +-----+ > '->|-' | > === Cap > | > V GND > > > Then you float the pin.. When you want to light one of the > LEDs you set the pins data register to either high or low and > rapidly switch the pin between input and output. > > I've no idea if this would work, but you should be able to > draw some power thought the caps and may get enough to light the LED. > > Like I said, I haven't thought this through properly, and > definitely haven't tried it, but it might work? Maybe? > Perhaps I should just go to bed :) > > Cheers, > Ash. > > --- > Ashley Roll > Digital Nemesis Pty Ltd > www.digitalnemesis.com > Mobile: +61 (0)417 705 718 > > > > > > -----Original Message----- > > From: Lawrence Lile [mailto:llile@toastmaster.com] > > Sent: Tuesday, 5 February 2002 1:37 AM > > To: pic microcontroller discussion list; ash@DIGITALNEMESIS.COM > > Subject: Re: Re: [PIC]: Driving a dual LED > > > > > > Thanks, Ashley, this is a really cool trick! > > > > I suppose you could light more than one LED with various > > combinations of 1 > > and 0. I am supposed to be implementing a light bar, sort of like a > > progress baar on a download, so I will have to count up. > > This may not work > > so well in this case, because I think adjacent LEDs cannot be > > lit in the > > same color! > > > > You suggested a little port expander, another cheap chip that > > I have used is > > an 8-bit serial load parallel out shift register, 74HC164. > > These can be > > bought for $US0.15 in quantity, I think. I need to check the > > datasheet and > > see how many LED's thay can handle. > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body