Connect with us

Bicolor LED Switch driven by a PIC, need to pull outs to GND?

Discussion in 'Electronic Design' started by Nick, Sep 5, 2006.

Scroll to continue with content
  1. Nick

    Nick Guest

    I have a bicolor led switch that I would like to control with 2
    different output lines from a PIC that I'm using. I'm having trouble
    figuring out the circuit.

    The switch is: pages/Switches/JC Series Catalog.pdf

    SPDT Red & Green

    Their datasheet (linked above) shows the LEDs circuit to be:

    --->|---0 LED1
    --->|---0 LED2

    So, I figure I want a 180 Ohm R between + and the single leg, the other
    2 need to be pulled to ground.

    I did not look at the datasheet close enough when I ordered this part
    and planned the circuit in my head. I thought it was the opposite,
    where there were 2 feeds to the forward side and 1 pull to ground.

    I guess I need a circuit that looks like:

    --->|---0 -- ??? --- PIC Out1
    +5V 0---|
    --->|---0 -- ??? --- PIC Out2

    What is the blackmagic I can use to pull an active high output to

  2. Just two resistors where your ??? are. Drive the output low to turn
    the LED on, assuming you're writing the code. If you're not writing
    the code, and the outputs are high for ON, then add one inverter on
    each output (eg. use 2/6 of a 74HC04)

    Best regards,
    Spehro Pefhany
  3. The first question that comes to mind is why do the outputs have to be
    active high? If they could be active low, you could just use a 470
    ohm resistor in place of ???.

    But if there is some good reason they have to be active high, then you
    might add a 2N7000 or BS170 N channel mosfet as an inverter. Source
    goes to ground, drain to resistor to LED, gate to PIC output.
  4. Nick

    Nick Guest


    Thanks, I tested this today and it worked. Thanks again.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day