Shop OBEX P1 Docs P2 Docs Learn Events
Help needed to cascade 2 or more MAX 7219 LED driver ICs — Parallax Forums

Help needed to cascade 2 or more MAX 7219 LED driver ICs

T&E EngineerT&E Engineer Posts: 1,396
edited 2005-12-25 19:09 in BASIC Stamp
As stated in a previous post, I have modified Jon William's Nuts and Volts code. However, I am now trying to take it to the next level by cascading 2 or more MAX 7219 ICs (2 for now). I have attached Jon's original article however, I am using a common anode which means I need to use it as a 7 x 5 (not as a 5x7 common cathode display).

When I connect it in the cascading format as shown in the attached datasheet (e.g. DataOut IC1 to DataIn IC2), all I get is a repeat of the original scrolling display of my name "Tim" on 2 displays (e.g. 2 identical circuits set up with the DataOut IC1 to DataIn IC2).

I really need help in figuring this out. It should in theory be·similar to the 74HC595. As you can see in my code, it does have a statement for the Cascade (No Op register $00).

Please help if you can.

Merry Christmas and Happy Holidays!

Timothy Gilmore

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2005-12-25 14:52
    Timothy -

    This is going to take a few Q & A's since you haven't supplied a wiring diagram that I can see, nor a copy of Jon's original program (although I didn't download every file) so we can see what was changed. I'll start with a couple of educated shots in the dark.

    From a wiring and programming perspective, three conditions must be met, in order to cascade these drivers successfully. Please check your wiring and your program, to ensure that all of the following have been done:

    ········· WIRING

    1. Dout must be wired to Din for every chip in the array. This is essentially a series connection "through" the chips (if you will), from one end to the other.

    2. All Load lines must be common, and connected together.

    ········· PROGRAMMING

    3. For EACH chip that you want to "skip", you must issue a NOP ($00) COMMAND. NOP is NOT a register, it is a command inserted in a register. The internal command register must CONTAIN NOP if/when a driver is to be skipped in a SEQUENTIAL load sequence. Therefore, if you want to load the last chip in a 4-chip array, you must issue 3 NOP operations, and so on down the line as indicated below:

    · Destination Chip····· NOP Instructions
    ·· To Be Loaded·········· To Be Issued
    ·
    ·····
    ······· 4th······················· 3 NOPs
    ······· 3rd······················· 2 NOPs
    ······· 2nd······················· 1 NOP

    For larger numbers of driver chips, just subtract 1 from the number of the destination chip, and you have the number of NOPs to be issued. Ex. The 8th chip would require 7 NOPs to be issued.

    The following is just in passing, since it just represents something that I don't presently understand. The LOOKUP command in the program APPEARS to be assigning appropriate operation codes for the command register, unless I miss my guess. I haven't sat down with a pencil and paper to work out exactly what's happening, but the series of commands which follows, seems a bit odd:
    /code
    ············· 0-7······· $00·········· $0B········ $0A··········· $0C
    LOOKUP index, (Cascade, 0, Scan, 6, Intensity, 7, ShutDn, 1), d7219
    ·code/

    What I don't understand is the non-named LOOKUP parameters (2nd=0, 4th=6, 6th=7, 8th=1), and their purpose?

    If these next three paragraphs confuse you, then just forget I supplied it, since it is somewhat psychologically based. OTOH, it may clear things up immensely, if you're having a problem with the logic of cascading.

    When you cascade chips, especially those containing human readable information, the human mind tends to think of this as a contiguous string of data (letters and/or numbers) which begin on the left, and end to the right. Or at least that true for those of use who read from left to right, and those of us who use the Arabic numbering system. This is just human nature, and there is little one can do to change it, so understanding it is the best we can do. We know what we were taught; no more and no less. We can overcome our teaching when necessary, however.

    HOWEVER, this operation (cascading) is ACTUALLY occurrring right to left (by digit). In the end,·the driver chips·are loading the RIGHTMOST digit FIRST, then the one before it, and BACK to the LEFT in succession. Ergo RIGHT to LEFT! Now, using NOPs as placeholders for presently unused digits (to the left) may make a bit more sense. I hope that was more helpful than confusing.

    Regards,

    Bruce Bates
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-25 17:21
    Bruce,

    My code is essentially Jon's original code with columns changed to rows, etc for the 7x5 common anode display. It is also attached in the nv70 file if you scroll down far enough. I have wired it up with Dout going into Din and have read through the data sheet and familiar with that concept. The wiring is correct.

    As far as the LOOKUP command that is Jon's statement that I added a CASCADE statement. The first word is the register such as Cascade, Scan, Intensity, ShutDn and the other values are the values placed into the register such as (Cascade is $00 with a 0 value, Scan is $0B with a·6 value to Scan 5 rows, etc..).

    The problem I am having is not knowing if I issued the No-Op (Cascade) command properly or not.

    What is happening is the small letters T i m are scrolling from the right side to the left side. Each letter is 5 dots high by 3 dots wide (exception that m is 4 dots wide). That is working correctly.

    However, I don't think I am cascading them correctly as I have built 2 identical circuits with the only difference being the Dout (pin 28 7219 #1) going into Din (pin 1 7219 #28) and of course 1 Data line (pin 1) the 1st 7219 going into BS2. Of course the Load lines are ties together and the Clock lines are tied together (both of which are going into the BS2). It is wired correctly and functioning as 2 separate scrolling messages.

    This is not operating correctly in the aspect that is is not operating as 1 5 dot high by 14 dot wide scrolling message. It is operating currently as 2 5 dot high by 7 dot wide scrolling identical messages.

    Something is not right in the cascading process.

    I have also attached Jon's original code which is also listed in PDF form in the nv70 previous attachment.

    Please help if you can.

    Thanks again!

    Timothy Gilmore


    Post Edited (tdg8934) : 12/25/2005 7:12:56 PM GMT
  • T&E EngineerT&E Engineer Posts: 1,396
    edited 2005-12-25 19:09
    I have attached a schematic in the last post and updated the BS2 software to version 1.2.

    Please Help with this problem.

    Thanks,

    Timothy Gilmore
Sign In or Register to comment.