Shop OBEX P1 Docs P2 Docs Learn Events
RS232 connection problems — Parallax Forums

RS232 connection problems

alnajjaralnajjar Posts: 12
edited 2005-03-09 17:21 in BASIC Stamp
I am interfacing an Oregon Scientific weather station (WRM918) to the BS2 to remote control an observatory with 2 telescopes for public use.· the problem is that Oregon Sci. does not publish and refuse to release the RS232 documentation.· So I don't know the settings nor how the data is transferred.· I know that it is unidirectional (sensors to base) and that it sends 12 bytes once every 3 senconds (approximately).

I hooked it up to Hyp. Terminal and tried all the different settings and can see the characters coming in but in weird symbols!

Any ideas of how to decipher this and try to use it in the BS2?

Al Najjar

Comments

  • steve_bsteve_b Posts: 1,563
    edited 2005-03-09 17:21
    They're showing up as ASCII probably.· But, be aware that if you are slightly off in your baud rate settings, you can still see garbage.
    Do a google for serial port sniffer or monitor.· There's some trial software out there that should help you out!

    Also, you could bring in the data to the stamp in one big string...just to see what it might look like!

    Here's a snip of some code I used to see what the string was in a device.
    My gear was talking at 19200 soo....you'll have to play with that much!
    Basically what it does is, looks at the first 20 characters coming in and drops each one in a slot in an array.· I use the debug command to read back in the info for me.



    n19k2· CON 110
    serstring VAR Byte(20)
    temp VAR Byte
    temp = 0
    serstring = 0
    main:
    · DEBUG CLS
    · SERIN commin, n19k2, [noparse][[/noparse]STR serstring\20]··· 'input string
    · DEBUG DEC2 temp + 1," :",HEX serstring(0),CR
    · GOSUB display
    END
    display:
    · DO
    ····· temp = temp + 1
    ····· DEBUG DEC2 temp+1," :",HEX serstring(temp),CR
    ····· IF (temp = 20) THEN
    ······· RETURN
    ······ ENDIF
    · LOOP
    RETURN

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://ca.geocities.com/steve.brady@rogers.com/index.html
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
Sign In or Register to comment.