Shop OBEX P1 Docs P2 Docs Learn Events
QuickStart and PropBasic — Parallax Forums

QuickStart and PropBasic

camelot2camelot2 Posts: 54
edited 2011-07-10 05:43 in Propeller 1
hi, I am using the QuickStart board and PropBasic and having a problem sending info to the terminal. The problem is that the terminal displays "??12345" when I press the reset button on the board or Reset Propeller from the bst terminal. Attached is the Propbasic file (testing.pbas) I am using. What am I doing wrong? How do I eliminate the ??? thanks for your help - Dave

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-07-09 12:53
    Edit: Ignore what I wrote. I see now that "1" is not 1. Sorry for the error.

    I haven't used PropBasic myself but this looks like if could be a problem.
    FOR alpha = "1" TO "5"
    TX_BYTE TX, alpha
    DELAY_MS 50
    NEXT
    

    Try this.
    FOR alpha = "1" TO "5"
    TX_BYTE TX, (alpha + 48) ' 48 is ASCII for "0"  this will change alpha to a printable value.
    DELAY_MS 50
    NEXT
    

    I'm not sure if that's how you do it PropBasic or not but you need to convert alpha to a ASCII printable character.

    Duane
  • simonlsimonl Posts: 866
    edited 2011-07-09 13:16
    Shouldn't that be
    FOR alpha = 1 TO 5
    
    No quote marks?
  • kwinnkwinn Posts: 8,697
    edited 2011-07-09 13:30
    I don't think this problem has anything to do with it being FOR alpha = "1" TO "5" or FOR alpha = 1 TO 5 since it does print the correct numbers after the ??.

    Most likely the output pin is set as an input during reset and therefore in a high impedance state and susceptible to noise. Try putting a 1K or there about pullup or pulldown resistor on the pin.
  • BeanBean Posts: 8,129
    edited 2011-07-09 14:22
    The program in the first post looks good to me.
    The TX pin is set to HIGH when declared as it should be.

    I agree with kwinn, it must be noise on the pin between the time of the reset and the program starts executing.
    Pulling the pin HIGH with a 1K should do the trick.

    Bean
  • camelot2camelot2 Posts: 54
    edited 2011-07-09 14:22
    Duane, will not compile

    simonl, compiles but displays ??????

    Kwinn, I checked the schematic and board
    and can not figure out how to add a 1k
    resistor to P30 , the TX pin

    still can not figure out what is wrong
    any help will be appreciated - thanks
  • Duane DegnDuane Degn Posts: 10,588
    edited 2011-07-09 14:39
    camelot2 wrote: »
    Duane, will not compile

    Yes, what I wrote was junk. I just have a strong aversion to deleting posts. I hoped my bolded "Ignore what I wrote" would save people the time of reading the post yet preserve the record of my not knowing what I was talking about for posterity.

    Duane
  • camelot2camelot2 Posts: 54
    edited 2011-07-10 05:43
    hi all, I think I found the problem, it's something in the "bst Terminal" program in "BST-Brad's Spin Tool".
    My Results
    1.open "BST-Brad's Spin Tool" and open testing.pbas
    2.open "bst Terminal"
    3.Compile and Load EEPROM
    4."bst Terminal" then displays 12345_
    5.press the reset on the QuickStart board and
    the "bst Terminal" then displays 12345_
    ??12345
    6.press reset again then the display is 12345_
    ??12345
    ?12345
    7.I get similar results when I click Reset Propeller in the "bst Terminal" program
    8.I then disconnected and closed "bst Terminal"
    9. open Parallax Serial Terminal using the same port and baud as above
    10.press reset then 12345 is displayed
    11.press reset again then 12345 is cleared and 12345 is displayed

    I also have a bread board wired up with a Propeller and get the same results as above. I then added a 1K resistor from P30 (TX) to the +3.3v and still get the same results as above.

    QUESTION
    Is there something I am not doing correctly when I use the "bst Terminal" program and how can I fix it?
    thanks again for any suggestions - Dave
Sign In or Register to comment.