Shop OBEX P1 Docs P2 Docs Learn Events
Question about debugging script and debug terminal on the Propeller — Parallax Forums

Question about debugging script and debug terminal on the Propeller

geometrixgeometrix Posts: 27
edited 2007-08-16 04:57 in Propeller 1
All,

Has anybody written a debugger script for the Propeller?· I am currently using a PropSTICK USB and I could not figure out why the debugger was not appearing within the Propeller Tool IDE.· I called tech support and Dave told me that I need the external 2.5" display.· Is there any way to redirect this output from the PropSTICK USB·to my computer monitor without having to go with the development kit and 2.5" LCD monitor?

TIA,
Neal Rosenblum

<edit> Subject line added by moderator </edit>

Comments

  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-08-15 16:56
    In this case the easiest means for communicating information back is not by using the display drivers, but by using serial communication. You would use the FullDuplexSerial object and send your debug information to the PC using a terminal program such as HyperTerminal or Ariba's PropTerminal: http://forums.parallax.com/showthread.php?p=649540
    ·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • geometrixgeometrix Posts: 27
    edited 2007-08-15 21:08
    Hey Paul,

    I followed the link below and I am more confused than ever.· I am closer to novice and this stuff is starting to get way beyond me.

    In a nutshell, I wrote some inclinometer code for the BS2 (not for the Memsic2125) about 2 months ago.· Although the program worked quite well, I was not able to get the resolution that I wanted with integer arithmetic.· I decided to try using the Propeller because of its 32 bit capabilities (i.e. floating point arithmetic) and I am now in a pickle.· Canned commands for the BS2 such as PWM (for priming the ADC)·don't·exist for the Propeller and I am terribly confused about how to use registers to pulse the clock, etc...??????

    I think that there may be some Propeller motor control examples using robots.· I will have to look there and see if this helps.

    Thanks,
    Neal
  • MightorMightor Posts: 338
    edited 2007-08-16 03:49
    geometrix said...

    In a nutshell, I wrote some inclinometer code for the BS2 (not for the Memsic2125) about 2 months ago. Although the program worked quite well, I was not able to get the resolution that I wanted with integer arithmetic. I decided to try using the Propeller because of its 32 bit capabilities (i.e. floating point arithmetic) and I am now in a pickle. Canned commands for the BS2 such as PWM (for priming the ADC) don't exist for the Propeller and I am terribly confused about how to use registers to pulse the clock, etc...??????
    Might I suggest you check out the Propeller Manual. It has quite a few good examples of how to make LEDs blink, which is essentially a form of PWM, albeit super slow. All PWM is:
    repeat:
        set PIN to 1
        wait_for_timea
        set PIN to 0
        wait_for_timeb
    
    


    The timea and timeb amounts are dependent on your duty cycle. If you're really lost, why not have a look at the BS2 Functions object on the Object Exchange. Have a look at how the commands are written and learn from them. The PE kit lab examples are also extremely good for learning the Prop and SPIN.

    Gr,
    Mightor

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    | Any sufficiently advanced technology is indistinguishable from magic.
  • bulkheadbulkhead Posts: 405
    edited 2007-08-16 04:57
    The prop terminal works really well for debugging. Just read through that thread that Paul posted and it will explain how to do everything. In short, what you do is load EEPROM on the prop, open the prop terminal window (it's an .exe file) and your messages should start appearing. You don't need to write any code yourself for using the terminal and communicating over the serial port, you just need to copy and paste the code for the PC interface object into your library (your main Prop tool folder) and initialize that object at the start of your program (takes about 2-3 lines of code).

    Actually, if you are using the Memsic2125, have you checked the object exchange to see if the code posted will work?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I'm new to the propeller!
Sign In or Register to comment.