1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Bi-colour LED driving

Discussion in 'Modding' started by ballen, 22 Feb 2009.

  1. ballen

    ballen What's a Dremel?

    Joined:
    18 Jun 2005
    Posts:
    10
    Likes Received:
    0
    Hi,

    I have some 3mm Red/Green bi-colour (2 lead type) LEDs that I want to drive from a PIC - there's five in total, each needs to be controlled seperatly. The PIC is an 18f4550 - off the top of my head it can sink/source 250ma in total, 25ma per port.

    My first concern is that this won't be enough if I am doing other things also (driving LCD, USB etc) also I'm not sure if the 25ma is enough to drive the LED to its full brightness (although i can't find the datasheet for them).

    My other concern is that with five led's I will need to use 10 ports - although I can't think of a way around this without multiplexing. I was wondering If there was a NOT gate with a decent enough current source/sink ability but this would mean there would be no way to turn the LED off (except possibly tri-stating it but i've read this can be bad for the port).

    Does anyone have any idea? I should stress that while I have a very basic understanding of this stuff I'm very much a noob.

    Thanks
     
  2. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    you can use a transistor as a buffer. the pic drives the base of a transistor, and the collector is tied to a voltage while the emitter is tied to a resistor then to the led then to gnd. google transistor buffer.

    whats wrong with multiplexing? if your totally against it, i'm sure there are some rgb led drivers out there that interface to a micro.
     
  3. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    2.5mA will drive most LEDs to very nearly full brightness.
     

Share This Page