Shop OBEX P1 Docs P2 Docs Learn Events
LED matrix programming — Parallax Forums

LED matrix programming

george miyagigeorge miyagi Posts: 48
edited 2005-06-13 10:46 in BASIC Stamp
Hi
I got an 8x8 LED matrix, which has only 16 pins, presumably 8 ins and 8 outs.
I've hooked it up to the basic stamp and have got it working.
The problem is I cannot work out the logic of how each light is turned on or off.
Setting different pins high and low results in diffrent combination and different numbers of lights being turned on.
Anybody have any idea how to reference the lights, or what the logic is behind this?
tx

Comments

  • NewzedNewzed Posts: 2,503
    edited 2005-06-11 16:58
    There are 8 pins for the 8 rows and 8 pins for the 8 columns.· If you take row 1 low and all 8 columns high then all LEDs in the first row will light.· If you take row 1 low and cols. 4-5-6-7 high then the four righthand LEDs in row 1 will light.· This matrix can be controlled with two 595s - one for the rows and one for the columns.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Need a bezel for your LCD?

    Newzed@aol.com
    ·
  • allanlane5allanlane5 Posts: 3,815
    edited 2005-06-11 19:40
    Make sure you have a current limiting resistor on each row, though. 220 is a good value.
  • george miyagigeorge miyagi Posts: 48
    edited 2005-06-12 02:50
    Thanks for the info guys.
    If the 8 pins represent rows and the other columns, how would i wire it then. how would the circuit flow through the matrix.
    would it be that i should connect the columns to the +5v instead of GRD -? And how do you determine which are the rows and which are the columns?
    i have resistors connected. and will eventually use some max6219s, but i'm just trying to work outthe logic of this before i go to the next step
    tx
  • george miyagigeorge miyagi Posts: 48
    edited 2005-06-12 05:59
    Some more questions...
    if i can't find 595s can i use UCN5841s? what's the difference? any other makes/brands i can look out for?
    And what's the difference bewteen shift registers and the Max6219s - except the price?
    I'm eventually wanting to drive a 32x16 matrix, so the max route seems quite expensive as opposed to the 595 route.
  • NewzedNewzed Posts: 2,503
    edited 2005-06-12 11:40
    Take a good look at the LED connections.· The line of LEDs with
    all 8 cathodes tied together would be a row.· The line with all anodes tied together would be a columns.· If you ground a row and apply 5V to a columns only the LED at the row/column intersection will light.· A 595 will handle about 35ma per channel, which is not enough if you turn on all 8 LEDs in a row or column.· Use a ULN2803 - that will handle the current quite easily.· You will have to use a 595 to drive each of the 2803s.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Sid Weaver
    Need a bezel for your LCD?

    Newzed@aol.com
    ·
  • george miyagigeorge miyagi Posts: 48
    edited 2005-06-13 02:22
    tx sid.
    the matrix however, was a bit more complicated than that, with a seemingly random order of the pins [noparse]:)[/noparse]
    but i finally figured it out, and am able to control all 64 lights individually. however, if all 64 are turned on, there's a definate dip in brightness when doing row/column scanning - though not sure if this is just a pulsewidth modulation issue.
    So is the ULN2803 the best way to go? if i can't find them, is there a similar part? and i assume i would then need to place resistors between then and the 595s? is that correct? and if so, what value?
  • cyberbiotacyberbiota Posts: 79
    edited 2005-06-13 02:32
    George-

    SGS Thompson, ON Semiconductor, ST Micro, TI, Toshiba and Allegro all make versions of the ULN280X darlington array chip. All of the ones that I have used (TI, ST Micro and ON Semi) have an integrated resistor, so no external resistor is required. Check the datasheet, though, to be sure.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Peter C. Charles

    Director, Research and Technology
    CyberBiota, Incorporated
    Peter.charles@cyberbiota.com
    http://www.cyberbiota.com
  • george miyagigeorge miyagi Posts: 48
    edited 2005-06-13 05:33
    Great thanks everyone for the info. i must say this is the best user forum i've ever been on.
    what would the advantages/disadvantages be between using the 595/ULN280X combo vs using a MAX7219 especially given the fact I eventaully want to drive 512 LEDs.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-06-13 07:55
    George -

    You might do well to let us know what your eventual goal is, at this juncture. There is little sophistication with the 595/ULN280X aproach, but there is some to be had with the MAX7219 approach. That sophistication may or may not be required to attain your end goal.

    Displaying Lady Godiva on her horse is one thing, and displaying "Eat at Tony's Pizzaria" is quite another smile.gif

    Regards,

    Bruce Bates
  • george miyagigeorge miyagi Posts: 48
    edited 2005-06-13 08:06
    Hey Bruce
    Kinda going the Lady Godiva way.
    I am using Processing to strip down gifs into binary values, passing those to the stamp to be displayed on a 32x16 matrix - and getting them to animate. phew just writing it seems daunting....
    problem is the MAXs are pretty expensive, (5 x screens of 32x6 = 40 Max7219s) and difficult to find (believe it or not) in Japan.
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-06-13 08:27
    George -

    Here are the international distributors for Maxim-Dallas Products. There are three companies listed in Japan:
    http://www.maxim-ic.com/company/contact/sales_offices_en.cfm/filter/idistributors

    In lots of 50 I'd like to think you could negotiate a decent quantity break over the one off price of ~ $10.00 US.

    That's SOME project you're embarking on. Good luck with it! My guess is that you may need to use something like an SX (NOT the BS-2SSX) processor to drive the LEDs at the rate/speed you'll need for proper animation.

    Regards,

    Bruce Bates
  • NateNate Posts: 154
    edited 2005-06-13 10:32
    George,

    I too am working on a LED matrix display, but mine will be 100 x 700 when done.· It is also alpha numeric, which simplifies·my task.· I started to go the Maxim route, until I saw the price of each chip, (at which point I practically fell out of my chair!)· I am now going the multiple '595 route (~$0.29).·

    Be aware, when you are displaying your data/image, the LEDs do not need to be on all the time. You can rotate through which ones are on at any given time, saving much in power used to light the display (and the power reqirements of the chips driving the display). I have heard/read that an LED turned on at least 100 times a second will appear to be on 'steady' to the human eye.· How long you have to have the LED on for each period of·this 100 Hz cycling I do not know, I am planning to run some emperical tests (frequency, duty cycle required for steady looking display) next weekend.· I am using SX chips for my application.· It will be interesting to hear how you make out.

    Nate
  • george miyagigeorge miyagi Posts: 48
    edited 2005-06-13 10:46
    Thanks for the shout out Nate. I am currently testing both methods to see which works. Suspect maybe I'll have to go the SX route. But at the moment pretty much in the dark.

    Bruce:
    <snip>That's SOME project you're embarking on. Good luck with it! <snip>
    now i'm pretty worried. [noparse]:)[/noparse] the animations are nothing major, simple 2/3 frame animations. that repeat for quite a while before the next one is triggered.
Sign In or Register to comment.