Shop OBEX P1 Docs P2 Docs Learn Events
Question: Simplest way to drive 64 LED's using BSX — Parallax Forums

Question: Simplest way to drive 64 LED's using BSX

bytor95bytor95 Posts: 53
edited 2006-12-20 19:22 in BASIC Stamp
Hello,

I created a tide calculator using the basic stamp + coprocessor + EEPROM + LCD.

I want to display the height information in a column of 32 Green/Red LED's so I'd like 64 different outputs. What is the simplest way to achieve this? I need control of each LED separately and to be able to control their states for Red, Green or Off.

Thanks very much in advance!

Engin

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-29 18:02
    Hello,
    ·
    ·· Depending on the current draw of the LEDs it may be possible to use two sets of 74HC595 shift registers with a Bi-Color LED between the outputs (don’t forget the resistor).· A HIGH on one output and LOW on the other gives one color while reversing gives the other.· Both LOW (or HIGH) would be off.· This would require eight 74HC595 shift registers and 8 bytes of variable space as well.· I hope this helps.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • bytor95bytor95 Posts: 53
    edited 2006-11-29 21:46
    Chris,

    Thank you for the prompt reply. Thanks to you I have a way of doing this. But I was wondering if anyone was using, say, a Maxim or Philips chip to do the same thing with one or two chips. I intend on using this LED

    http://www.jab-tech.com/3mm-Dual-Color-Red-Blue-Led-10-Pack-pr-3574.html

    It has 3 leads with a cathode for each color.

    Thanks again Chris.

    Engin
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-30 05:13
    Maxim chip…Well, you can control up to 64 LEDs with a MAX7219, although the programming won’t be as straight forward…But it would cut down the part count considerably.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • bytor95bytor95 Posts: 53
    edited 2006-11-30 16:02
    Chris,

    Wow! That's it I think. I'm ordering a few right now. I need to make this thing with less part count so I don't mind the programming.

    http://www.maxim-ic.com/quick_view2.cfm/qv_pk/1339

    The packaging is not DIP but it's PDIP. I looked that up and learned that the spacing is .300". Will I still be able to use a normal .100" spaced breadboard with these chips?

    Thanks again,

    Engin
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-11-30 16:54
    Engin,
    ·
    ·· The PDIP is just Plastic DIP.· The .300” spacing is for the width but the pins are still .100” spacing so you’re all set.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • bytor95bytor95 Posts: 53
    edited 2006-11-30 17:53
    Chris,

    Perfect reply. You answered exactly just what I was trying to ask.

    Thanks man!

    Engin
  • bytor95bytor95 Posts: 53
    edited 2006-12-15 19:07
    Well, I received and toasted four Max7219's. I have no idea what I'm doing wrong. Is there anyone out there with any experience with the MAX7219 chip?

    I had one working and then it stopped.

    Thanks is advance,


    Engin
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-12-15 19:19
    Get the PDF manual for the poor thing. I believe you need a current limiting resistor (one) to limit the current it sends to the LED's. And you should know it does internal "strobing" of the LED's, (which is a GOOD thing). The strobing means each LED is not on all the time -- which reduces the amount of power needed to drive them.

    What you should do is hook up like 8 LED's, the resistor, and the clock, data, and ground pin to the BS2. Then make the simplist program you can think of to make it work. Debug that, and get it working reliably.

    Scaling up after that point should be very straightforward.

    Oh, damn, it just occurred to me -- I don't think the 7219 support "bi-color" LED's, so that could be part of what you're doing wrong.· So get SEPARATE Red LED's,· Green LED's, and run a column of each.

    Part of the problem here is there's an infinite number of ways of blowing stuff up, and only a few ways of getting them working.· So we don't have much to go on, so far.

    Post Edited (allanlane5) : 12/15/2006 7:23:29 PM GMT
  • bytor95bytor95 Posts: 53
    edited 2006-12-15 19:58
    Allanlane5

    Thanks for the quick reply. I do have a current limiting resitor. I am using mono-color leds. I still can't figure out what the heck I'm doing wrong. I'm in desperation mode right now so when I get my brain back to normal I'll try again.

    Engin
  • allanlane5allanlane5 Posts: 3,815
    edited 2006-12-15 20:56
    Whatever you do, remember Vdd should be +5, Vss is Ground, and never use Vin for TTL circuitry.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-12-18 15:12
    Bytor95,
    ·
    ·· Here is a Completed Project that uses the MAX7219 and includes code and schematics.· Perhaps it will help you out.· Take care.

    http://forums.parallax.com/showthread.php?p=552892

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • bytor95bytor95 Posts: 53
    edited 2006-12-20 19:22
    Thanks Chris!

    Engin
Sign In or Register to comment.