Shop OBEX P1 Docs P2 Docs Learn Events
an 'LED' 5 x 7 matrix - (SX) - how do I form letters ? — Parallax Forums

an 'LED' 5 x 7 matrix - (SX) - how do I form letters ?

tommytommy Posts: 84
edited 2007-02-12 06:21 in General Discussion
. I was hi-jacking someone's thread - and would like to start here, especially so that the title might better match...

. previous multiple (more than 20) LED discussion was mostly about power distribution using (25%) duty-cycle so as to not overload the SX.··there was little discussion about lighting certain LEDS simultaneously (or quickly one after the other to fool the eye).

The blood bank has a date posted in crayon, (56 days in advance) when a donor might visit again, and I bought three of these modules thinking that I might be able to (keep track of time and) spell·the month of the year, as in JAN, FEB, etc...··· but in the 5 x 7 matrix, using two leads of just power and ground, only one pixel could be lit at a time...·· Theory first, please:· things like duty-cycle and figuring out the letter-patterns should I wish to spell a word...
·attachment.php?attachmentid=45360
.·later on there'll be cascading of the patterns to make moving words, I guess - but not yet, please -- I would be very happy now to be able to make a letter in each 5 x 7 matrix.···---·· right now I can see getting one, vertical row at a time, lit in the pattern I would like - that would be a duty cycle of 20% across the width of the first letter...
. but now I'd like more letters.··· is there a chip for this ?

tommy

Post Edited (tommy) : 2/7/2007 6:32:15 PM GMT
300 x 350 - 19K

Comments

  • pjvpjv Posts: 1,903
    edited 2007-02-07 19:25
    Hello Tommy;

    In the other thread PJ Allen directed you to thread:

    http://forums.parallax.com/forums/default.aspx?f=7&m=162118

    and you indicated you had read -and hopefully understood- the contents.

    In my post there on Dec 26, I show and attached the code for an SX28 running a clock program for a 4 digit 7 segment (7x4 matrix) LED display. If you connect your display which I think is not a 7 segment, but a 5x7 dot matrix, to the SX pins indicated it will light up the segments as if it were a 7 segment display.

    To drive a single digit (letter) of your display, you will have to extend my code to become 5 columns instead of 4, and modify the dot lookup table to accommodate all the combinations you require. If you can live with numbers only, it's not too bad, but if you also want letters, and possibly graphics characters, it get much more complicated.

    So why not just try the numbers and see what you get ?

    Cheers,

    Peter (pjv)

    Post Edited (pjv) : 2/7/2007 7:29:39 PM GMT
  • ForrestForrest Posts: 1,341
    edited 2007-02-08 01:06
    Parallax used to sell a Robolympic medal, which consisted of an SX28 driving (3) 5 x 7 LED dot matrix displays. Here's a link containing a SX/B program that may be useful http://forums.parallax.com/showthread.php?p=559562
  • tommytommy Posts: 84
    edited 2007-02-10 05:52
    originator's reply:

    ·. well, okay...· I thought that there might be some sort of hidden magic that would cause a fella to invent a display wired in this manner.· I'm not worried about writing illumination schemes - much of my MS-DOS assembly language work consisted of a (keyboard only) drawing program - there were schemes galore while looking at all of that upper memory through a one-segment window...

    ·. but how about the example below.· I might latch the rows across (freeing up computer pins) then use fifteen pins to illuminate the vertical·columns, one pattern at a time...· (all of the 1's, first, all of the 2's second, etc...)

    ·attachment.php?attachmentid=45402

    .·in the above sample - doing each of the six patterns consecutively would end up with a 16% duty cycle.

    . . . would it flicker ? --·the·month, "JAN" would need nine patterns -- what is my limit there ?·- certainly not all fifteen ? ! ?

    .· I personally, would never have invented this arrangement of LED dots - but someone else already has --- which is why I keep looking for the hidden magic.

    .· thank you for all previous comments and opinions.
    ·tommy

    Post Edited (tommy) : 2/10/2007 6:03:08 AM GMT
    500 x 150 - 11K
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-10 06:15
    Most displays that handle text work this way. Most video (TV and VGA) use some variation of the same thing (a dot matrix display). Typically, you have a font table with 5 bytes for each item in the table. Since the most common ASCII characters run from blank (32) to "~" (95), you typically need 64 entries in the table (for a total of 64 x 5 = 320 bytes) which is stored in EEPROM. Each byte is one column (with the 8th bit usually not used). You simply have a couple of nested loops, the outer loop goes through the characters of your message. The inner loop goes through each of the 5 table entries for the selected character and outputs the 7 bits (for the column being displayed). You could use a 4 bit decoder/driver to drive the display columns with one bit combination (%0000 or %1111) not connected so the display will be off. This 4 bit value would be incremented for each table entry and character (3 x 5 = 15). If you do these nested loops often enough, you'll get a nice 3 character display with no noticible flicker.
  • tommytommy Posts: 84
    edited 2007-02-12 06:09
    originator's reply:

    . okay.· thanks.· again, the scheme isn't the problem - but you say,
    Mike said...
    use a 4 bit decoder/driver to drive the display columns...·· ...(3 x 5 = 15)...· one·not connected...
    · which to me implies one of the fifteen columns at a time will be illuminated (with a pattern from the table)...·· for a duty-cycle of only 6%· -·· will that be enough to fool the eye...?

    . well, I can make printed circuit boards, now.··and twenty minutes with my drawing program will be sufficient to "wire up" a test board.· If it called for hand-wiring, I wouldn't even consider experimenting...····· I can socket the 5 x 7·matrix blocks...

    . AND ---> one column at a time·(per matrix, at least) may be the ONLY way I can do that - in order to have only just ONE lit LED per horizontal row - and so be able to supply the very same amount of current to each LED.· Forget (!) my patterns up above - I wouldn't be able to get consistantly even illumination.

    . thank you one and all.

    tommy
  • Mike GreenMike Green Posts: 23,101
    edited 2007-02-12 06:21
    You may end up needing external drivers. The ULN2803 Darlington arrays are simple to use. You'd need two packages (for 16 drivers). They ground the output so they'd go on the column lines. You'd need PNP transistors on the row lines. For testing, limit the current to the maximum steady state current for the LEDs. Usually 10-20ma is typical. Once you have this all working, you can decrease the current limiting resistors to make the peak current 7 x 10-20ma = 70-140ma (that's why you need the external drivers). The current limiting resistors would be in the row lines so the LED brightness would be set by the resistors (since only one column is lit at a time).
Sign In or Register to comment.