Shop OBEX P1 Docs P2 Docs Learn Events
Array of LEDs — Parallax Forums

Array of LEDs

GreenGiant83GreenGiant83 Posts: 43
edited 2006-12-13 02:57 in BASIC Stamp
I am wanting to control an array of LEDS, something in the order of 100 x 100.· I am not locked into that number by any means though.· Can someone point me in the right direction?· I need to be able to quickly control all of the LEDs individually.· Essentially I want to make one of the LED boards you see with scrolling text and such, but with a twist.

Comments

  • BeanBean Posts: 8,129
    edited 2006-12-10 00:23
    Are you actually going to build a 10,000 LED array ???
    I don't think any of the stamps have the memory or the horsepower to control such a beast.
    Probably the Propeller would be your best bet.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheap used 4-digit LED display with driver IC·www.hc4led.com

    Low power SD Data Logger www.sddatalogger.com
    SX-Video Display Modules www.sxvm.com
    Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1

    "People who are willing to trade their freedom for·security deserve neither and will lose both." Benjamin Franklin
    ·
  • GreenGiant83GreenGiant83 Posts: 43
    edited 2006-12-10 02:42
    I was wondering if there are·dedicated controller chips that you could control serially or something like that.· I really dont have any idea, but I know of those LED boards that run stock tickers and such.· I dont mind upgrading to a better chip if it will work, i just need to know the key components
  • Sarten-XSarten-X Posts: 32
    edited 2006-12-10 05:13
    I can give you the theory behind it, but I don't know if the stamp is fast enough to do it.
    First, while I haven't had the chance to play with it, you should be able to increase the effective number of I/O pins· by using shift registers and SHIFTOUT. This should, at the expense of time, let you control any number of bits.
    Second, take a·look at http://www.jameco.com/webapp/wcs/stores/servlet/CategoryDisplay?storeId=10001&catalogId=10001&langId=-1&categoryId=154050·. The displays listed as "MTX", "MTRX", or "MATRIX" are matrix displays. These seem to be best suited to your application. From what I can tell about how they work, you have to connect the row to either·voltage or ground, and the column pin to the other. When an LED has both pins connected, it lights.·Since all the LEDs in a row (and column)·are in parallel, you can light a whole row (or column) at once.·Flash multiple rows in sequence, timing it so you get back to the first row in under 1/30th of a second, and persistance of vision will make it seem like the whole array is lit.


    For the hardware aspect of your specific project, a lot of shift registers along the sides of the display should let you control the whole thing from·two I/O pins (one for row, one for column). If you have a small enough side, I'd suggest hooking that side directly to the Stamp's I/O pins, so you can switch rows faster. I think you'll also need some kind of relay or something to switch the ground connection.

    (assuming the vertical is the shortest dimension)
    For software, use SHIFTOUT, send out a few words worth of bits (96 pins would be 6 words) to correspond to which leds to turn on in the row. Then use SHIFTOUT to send the row state in the same fashion, so only one row connects. Once the correct pins have been switched, wait a bit to allow the viewer to see the row. Then repeat the process, using the data for the next row.

    Remember to watch the voltage... it looks like the ones listed on that page all take less than the 5v from the stamp. You'll probably also need to use transistors to protect the stamp from the amount of current the LEDs will draw.
  • GreenGiant83GreenGiant83 Posts: 43
    edited 2006-12-13 00:33
    Can you tell me more about this SHIFT OUT concept?· Are there no external circuit modules to do this sort of thing?
  • ZootZoot Posts: 2,227
    edited 2006-12-13 02:57
    SHIFTOUT is a Stamp command for sending bits to another device using a clock for timing -- e.g. you need two pins to send data -- one pin sends each data bit, the other pin "clocks" or synchronizes the data so the other device knows when the next bit is coming.

    That said, using shift registers would still require a LOT of chips to drive 100s of LEDs.

    I do think that you are best off checking out some of the many of LED drivers out there that let you drive many, many LEDs with just two pins. Many of them are SPI (serial -- using shiftin/shiftout), many of them are I2C (another two-pin clocked serial interface protocol). Parallax distributes a chip that drives 64 LEDs; I've seen I2C protocol chips that will drive more LEDs than that, but you are still talking about a LOT of LEDs. I've seen scrolling displays ready to go for less than $200 -- you might be better off buying one of those and hacking it if you need to tie the inputs to a controller like a Stamp or a Propellor.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    When the going gets weird, the weird turn pro. -- HST
Sign In or Register to comment.