Shop OBEX P1 Docs P2 Docs Learn Events
connecting a led — Parallax Forums

connecting a led

Robot FreakRobot Freak Posts: 168
edited 2008-03-11 23:03 in Propeller 1
WATCH OUT!
Not the normal way!

Because my numeric led bar (or how you call such thing) has only 2 connectors for the Vdd.
So the normal way (one of the eight pins to propeller, the Vss connector to the ground) will not work.
                       LED BAR
         -----------------------------------
         |    1     2     3     4     5    |
         |   LED1  LED2  Vss   LED3  LED4  |
         |                                 |
         |                                 |
         |   LED5  Led6  Vss   LED7  LED8  |
         |    6     7     8     9     10   |
         -----------------------------------
                          |
                          |
                          -------------------------o Vss



So my question is, how do I interface this with the Propeller.
Maybe this is an easy question after all, but we will see.

Kind regards,
Robot Freak

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-10 17:30
    I don't understand your question. What is your LED display? Usually these are labelled as common-anode or common-cathode where the anodes of all the LEDs are connected together or the cathodes of all the LEDs are connected together respectively. Sometimes there's a decimal point that's completely separate from the rest of the display and has both leads brought out.

    If it's common-cathode, you connect the common lead to ground. If it's common-anode, you connect the common lead to +3.3V. You need current limiting resistors on all the other leads and those get connected to the Propeller I/O pins. On a common-cathode display, you make the I/O pin high to light the LED. On a common-anode display, you make the I/O pin low to light the LED.
  • Robot FreakRobot Freak Posts: 168
    edited 2008-03-10 17:33
    I found a diagram.
    See the attachment.

    Post Edited (Robot Freak) : 3/10/2008 5:43:59 PM GMT
    330 x 246 - 12K
    164 x 190 - 6K
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-10 17:38
    Well, based on the diagram, which kind do you have and how do you need to connect it? You have all the information you need.

    I suggest you read the Wikipedia article on diodes (Google "wiki diode") if you're still confused.

    Post Edited (Mike Green) : 3/10/2008 5:44:02 PM GMT
  • Robot FreakRobot Freak Posts: 168
    edited 2008-03-10 17:41
    Thanks a lot Mike, I'll give it a try. It's a common-anode by the way.
    Is it also possible to connect the common ground by resistor, to use less resistors?

    Thanks,
    Robot Freak
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-10 17:46
    You can do anything you want, but you need to understand what happens when you do. Compute the currents (using Ohms Law) in a simple case of two diodes connected common-anode. Try it first with the resistors in the individual leads, then with a resistor in the common lead. Try it in the two cases of one LED on and with two LEDs on and see what you get.
  • HarleyHarley Posts: 997
    edited 2008-03-10 19:28
    Robot Freak,

    As a side comment to Mike's 'You can do anything you want....",

    I have a design which uses 6 '7-segment' LEDs (actually 8 segments, with the DP). They are common cathode type driven by FETs. The anodes are driven via resistors (100 Ohm) from a PIC running on 5v. Green LEDs, quite visible in this configuration, even though they are multiplexed about 80 Hz rate.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • deSilvadeSilva Posts: 2,967
    edited 2008-03-10 20:45
    Multilplexing is tricky when it comes to 6 digits. The common anodes should be boosted by transistors, as they have to source > 100 mA.

    Multiplexing also the segments will give an excellent brightness distributen, but also make it even dimmer.

    I never succeeded in an acceptable brightness as well as brghtness distribution without "true" drivers....
  • Robot FreakRobot Freak Posts: 168
    edited 2008-03-11 07:17
    Thank you all!

    I think I'll stay with the 6 resistors, to keep it easy,
    and error free.

    Kind regards,
    Robot Freak
  • Russ61Russ61 Posts: 11
    edited 2008-03-11 23:03
    Robot Freak,

    This is a schematic from an atomic clock I created a while back with an SX chip.· The circuitry may give you some ideas.

    RWC

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Russell Crow

    Project Manager
    Cohesive Automation Inc.
    1106 x 825 - 228K
Sign In or Register to comment.