Shop OBEX P1 Docs P2 Docs Learn Events
Not being negative, but ... — Parallax Forums

Not being negative, but ...

RichardFRichardF Posts: 168
edited 2007-06-07 19:22 in Propeller 1
Why no Debug command for the Propeller Tool editor? Not that I have much programming experience, but I have always been able to read my variables results on the editor screen, no matter what editor/language I was using. Is there something unique about the Propeller that would have made this so difficult, or have I completely missed the boat and there is a way to debug using the IDE? Just curious. For now I have set up some Led's on output pins to give me a little bit of debug capability.
Thanks,
Richard

Comments

  • Chicago MikeChicago Mike Posts: 88
    edited 2007-06-02 22:23
    I know what you mean. At least at first I thought that was a hangup too, but the TV output is SOOOOOOO easy to do, that you quickly get over it. If you haven't tried it yet, 3 resistors and a connector. The TV Object is super easy to use and is documented really well. A lot better than the LED method your using I think. All you need is to dig out an old TV.
  • KaioKaio Posts: 253
    edited 2007-06-02 22:44
    You don't need any additional hardware. You can use the serial connection also for debugging.

    An very easy way could be to use the PropTerminal which is a program running on your PC and operates as the TV output of your Propeller. You can use your PC keyboard and mouse to control the Propeller using special drivers which are used as replacements of the TV text driver and the standard keyboard and mouse driver of the Propeller.

    http://forums.parallax.com/showthread.php?p=649540
  • RichardFRichardF Posts: 168
    edited 2007-06-02 22:46
    Mike,
    I found the circuit diagram for a video output on page 90 of the manual. As far as I can se it is never mentioned again until Exercise 11 (page138) and then video out is used using the video output jack on the Demo Board. I am using the PE board which has not been wired for video. Using the circuit shown on page 90, do you use the display.spin object file for your video out? If so did you have to chage any pin numbers in the object methods?
    Thanks,
    Richard
  • Chicago MikeChicago Mike Posts: 88
    edited 2007-06-02 23:27
    I play with propeller the same way... I just bought the chip and slapped it on a broad board. (Though I did by the kit later for some extra parts).

    Easiest way is to use the TV_Text Object (It hides some of the more complex parts of the TV object when you start out), and wire it up according to page 90 of the manual. Using tv_text, you just pass it the first pin you are using and your good to go!

    TV_Text.start(12)

    Starts the TV_text object at base pin 12. (Of course you had to declare TV_Text in your OBJ section).

    TV_Text.str("I LIKE PIZZA")

    prints that string to the screen.

    When you get more familiar with it, you can use the TV object directly, but I've still had no need, but I'm sure there are many out there that differ on this.

    ---
    There is that serial method too, but I found this TV method pretty easy. I just had to hack an RCA cable in half because I didn't have any breadboard mount ones.

    Post Edited (Chicago Mike) : 6/3/2007 9:21:04 PM GMT
  • KaioKaio Posts: 253
    edited 2007-06-02 23:47
    Chicago Mike said...

    Using tv_text, you just pass it the first pin you are using (The pin wired to the 270Ohm resistor) and your good to go!

    Mike,

    the first part of what you said is right, but the first pin is number 12 and it is wired to a 1,1K resistor, which you have to use to initialize the TV object.

    Thomas
  • Chicago MikeChicago Mike Posts: 88
    edited 2007-06-03 21:19
    Yeah... Its 12 by default. I forgot the I changed the base pin in my Object because of the application I was working on. And your right, the first resistor is 1.1K on P12. I had read it backwards when referring back to the manual. I've updated the note.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-06-04 01:03
    I can definately add a second vote for the propeller terminal, it gives you the ease of use of the TV drivers and you don't even need the resistors!

    Graham
  • APAP Posts: 24
    edited 2007-06-06 01:22
    More than the TV objects (which I used to use to a 6" LCD TV made for minivans), I really really like the "SimpleDebug" which sends debug back through your serial/propclip connection to the PC, and you can conveniently view on the debug windo from the BasicStamp editor. One wrinkle is that you have to set the Stamp debug com port to "none" when you want to F10 or F11 load propeller code.
  • RinksCustomsRinksCustoms Posts: 531
    edited 2007-06-06 01:50
    i've also demo'd the prop terminal, could use a bit of polishing, but a great effort by the author, keeps thing simple also. No more getting burnt by the high-voltage power supply on the cheap $20 4"LCD Monitor i found at a local stereo shop lying around, better picture than the cheapy too!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Definetly a E3 (Electronics Engineer Extrodinare!)
    "I laugh in the face of imposible,... not because i know it all, ... but because I don't know well enough!"
  • HannoHanno Posts: 1,130
    edited 2007-06-06 22:15
    Richard,
    If you want to view and even edit variables in your program, Viewport might be just the ticket. Once initialized from your program, it runs in a separate cog sending your variables to a viewer on your pc. On your pc you can see the real-time values, as well as looking for trends over time- data from variables is graphed over time. If you want to change the value of a variable, you can do that too.
    Since you're not littering your program with "print" statements, debugging is a lot less frustrating.
    Viewport uses a 2,000,000 baud connection to transfer data very quickly- anywhere from 1 byte at 200,000/second to dozens of longs and bytes a bit slower. The program made it possible for me to build an affordable balancing robot- mydancebot, more about that later.
    Give it a try and let me know what you think!

    Download it here: http://mydancebot.com/products/viewport
  • RichardFRichardF Posts: 168
    edited 2007-06-07 19:22
    Hanno et all,
    Thank you very much for the information. I am first going the simple route of Parallax's 4x20 backlit LCD because it will mount on my robot platform and I can follow it around looking at info generated internally to the bot. This gives me a debug capablity when the bot is sitting on my desk and a real-time monitor when it is doing its' thing. I am the guy with the recent "servo problems" post. What a learning experience that was.
    Richard
Sign In or Register to comment.