Shop OBEX P1 Docs P2 Docs Learn Events
Why "stamp works" and other guides from paralax does not provide usable code? — Parallax Forums

Why "stamp works" and other guides from paralax does not provide usable code?

CuriousOneCuriousOne Posts: 931
edited 2012-10-23 14:21 in BASIC Stamp
A title is a bit incorrect, but I have no idea about how to spell it more correctly.

Let's take an example, stamp works, experiment #29. This example shows how to use MAX7219 IC for driving 7 segment led display. Nice, but, instead of providing short sample code in beginning, which will show how to display say digit "3" on the 7 segment led using this IC, we directly get a complex code for a special "game", from which, extracting and understaning the part which is the interface with this IC needs considerable amount of time to waste. And this also applies to other examples. Instead of showing how to interface with something, we immediatelly got code of some "game", device or whatsoever.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-10-22 11:15
    I just looked at my copy of the StampWorks Manual (v2.1) and experiment #29 deals with temperature measurement using a DS1620. What document are you looking at?

    I can't say that all guides from Parallax and all examples from them will be useful, but most of them look like very good teaching examples of basic principles. When examples are complex (like for a complex part like the MAX7219), something like a game is not the first example provided. Usually the first of a series of examples is quite basic, followed by more complex examples.
  • CuriousOneCuriousOne Posts: 931
    edited 2012-10-22 11:20
  • PublisonPublison Posts: 12,366
    edited 2012-10-22 11:31
    Try an Advanced Search on MAX7219, Basic Stamp only. Brings up many threads.

    I do not think StampWorks deals with a Max7219 at all, the SHIFTOUT command applys though.
  • CuriousOneCuriousOne Posts: 931
    edited 2012-10-22 11:43
    The question is not MAX7219 exactly. This was just an example. Question is,why parallax makes things complex where they should be made easy?
  • davejamesdavejames Posts: 4,047
    edited 2012-10-22 11:47
    Curious - you're asking the "why...." question and it's a hard one to answer for anyone who didn't develop the material.

    As a developer of instructional material, I struggle with the level at which to described a topic. At too high a level, I lose the newbies; at too low a level, I lose the experienced. It is a fine balancing act to aim for the middle, knowing there will be newbs and experienced that feel a bit left out.

    Also (and I see this in all training material BTW), quite often the examples are generated by people who are WAY too close to the subject matter. This can result in very cluttered examples that mask the simple question.

    EG: "...where's the blasted ON switch? I don't need to build a #$%&!#$ nuclear reactor!"
  • Mike GreenMike Green Posts: 23,101
    edited 2012-10-22 12:31
    Looking at the link you provided, the title says "advanced". The code and the description of what the code does indicates that it uses both the BCD display and the direct control of the segments features of the MAX7219. It's not at all an introductory example for the use of the MAX7219, but it does illustrate how to use the MAX7219 in its various modes and a moderately experienced Stamp programmer could use the code as a starting point for a project that displays both numeric values and alphanumeric codes or either one separately. It's not a "game". It's a real life example of a coin counter.

    There are other examples of the use of a MAX7219 with Stamps. This one uses a BS1 rather than a BS2. A few of the declarations are different for the BS1 and some of the statements have a slightly different format for the BS1, but it should be easily modified for the BS2. Here's another example from Parallax including sample code for the PIC, BS1, and BS2. All of these were found with a single web search for "MAX7219 Stamp".
  • CuriousOneCuriousOne Posts: 931
    edited 2012-10-22 13:00
    Hm, again a bit of misunderstanding.

    Here's how I see usage of this IC via the basic stamp to display the digits (the commands aren't exactly ones that needed or from basic stamp at all, just idea how should it described).
    The max 7219 can be used to drive up to 8 pieces of 7 segment leds. To work with this IC, you'll need 3 data pins, one for clock, others for data. example below assumes that these pins are connected to same numbered pins of basic stamp module.
    
    the below set of comands will display text "1911" on the 4 digit 7 segment display:
    
    SETMODE=1 ' tell the IC to handle input data as decimal numbers"
    SETBRIGHT=5 'set the brightness of led digits, 1 min, 15=max.
    SETNUMBER=4 'set the number of digits of 7 segment displays
    SHIFTOUT(1,"1")
    SHIFTOUT (2,"9")
    SHIFTOUT (3,"1")
    SHIFTOUT (4,"1")
    

    here's a simple example,then it should be followed by explanation why such arrangement of digits is needed, what is serial i/o, what other modes chip can display, but all that should be AFTER. User should be getting simple, working code 1st, which he can alter according to his needs and use in his project directly, without going in deep in all these fifos, multiplexors and so on. Also, in basic stamp things are complicated by assigning ports some names, creating arrays, etc. All this is fine, but not needed for quick job.

    And regarding this:

    http://www.rasmicro.com/FTP/MAX7219-21%208-Digit%20LED%20Display%20Driver.pdf

    can you please point me to the area of code/description, which promptly explains how should user set number of digits used?

    Thanks.
  • PublisonPublison Posts: 12,366
    edited 2012-10-22 13:00
    I have to agree with Mike . A simple web search will bring up many examples.

    Paste this into a Google Web Search search:

    MAX7219 Basic Stamp site:forums.parallax.com

    Will keep you busy for a few hours.
  • CuriousOneCuriousOne Posts: 931
    edited 2012-10-23 12:50
    Once again.

    I have NO PROBLEMS with MAX7219 and basic stamp.

    I'm just asking, why parallax making things complex at places, where they should be simpler?
  • Mike GreenMike Green Posts: 23,101
    edited 2012-10-23 14:21
    "should be" is what you've said while "want" is more correct. Parallax has published lots of examples of 7-segment display drivers, usually driving the display directly or via transistors. The Maxim part is complicated and someone who is going to use it "should" be willing to do some research on the web and reading the datasheet. The driver you referenced is explained in some detail, but the documentation is not a beginner's tutorial. It's a working example of a practical project. The level you're asking for is typified by the StampWorks Manual, by some of the Nuts and Volts Columns, and by the other tutorials like "What's a Microcontroller?" Some of these are intended for rank beginners, some for people with some experience, and some are worked examples where the user is expected to do some homework. Parallax is under no obligation to provide beginner's tutorials for everything they make or sell or reference in other items. The fact that they provide so much documentation at a variety of levels speaks to their efforts in education.
Sign In or Register to comment.