Shop OBEX P1 Docs P2 Docs Learn Events
Serial communications question - newbie — Parallax Forums

Serial communications question - newbie

KB6WIJKB6WIJ Posts: 9
edited 2006-08-03 23:57 in BASIC Stamp
Another bonehead question from yours truly...

Why won't the following code work? The LED connected to pin 1 lights, signifying that the data reached the stamp, but I never see the stamp reply on my serial port monitor.

Thanks! Joe

' {$STAMP BS2}
' {$PBASIC 2.5}

query     VAR  Word

DO
  SERIN 16, 396, [noparse][[/noparse]DEC query]

  IF query = 15 THEN
    HIGH 1
    PAUSE 1000
    LOW 1
    SEROUT 16, 396, [noparse][[/noparse]"READY", CR]
  ENDIF
LOOP

END

Comments

  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-08-03 23:12
    Works here with the debug terminal.

    If you're using the debug terminal, are your settings correct on the terminal? For instance, your code is using a 2400 baud setting, and the debug terminal defaults to 9600 on start-up.
  • KB6WIJKB6WIJ Posts: 9
    edited 2006-08-03 23:27
    No, Kevin, I'm using a serial port monitor (Serial Monitor Lite v4.10). I can see the computer send to the stamp, but I can't see anything coming back.

    Joe

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "I'm an occasional drinker, the kind of guy who goes out for a beer and wakes up in Singapore with a full beard."

    Raymond Chandler, "The King in Yellow"
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2006-08-03 23:34
    Does it wok for you in the debug terrminal of the Stamp Editor?

    If it does, then your problem is probably your monitor configuration.
  • KB6WIJKB6WIJ Posts: 9
    edited 2006-08-03 23:57
    I hadn't tried the debug terminal. It worked. So did Hyperterminal. D'oh!

    Now let's see if it talks to the program on my PC...

    Thanks, Kevin! Joe

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "I'm an occasional drinker, the kind of guy who goes out for a beer and wakes up in Singapore with a full beard."

    Raymond Chandler, "The King in Yellow"
Sign In or Register to comment.