Shop OBEX P1 Docs P2 Docs Learn Events
Interface via RS-232 — Parallax Forums

Interface via RS-232

ArchiverArchiver Posts: 46,084
edited 2000-11-27 10:54 in General Discussion
This isn't strictly a Stamp question but I could be applicable, I
think.

I have a device called Weather Jack that records temperature and
barometric pressure. The values are stored in the device and can be
called by the supplied program.

I would like to make a program that retrieves the values at the
interval that I choose and manupilate the data in the way that I need
it.

I am using Power Basic to write the program and I can not get
the "OPEN COM(x):" function in basic to get the data back out.

All of the parameters, "2400,N,8,1" are correct as well as the cable
to the device. All I really need to do is send a command, "GC" and
wait for a return string of 19 characters but the return characters
never arrive!

Since someone out there probably has experience with RS-232
communications, I am hoping that I can get some answers to this
dilema.

The device in question has just 3 wires to it so there are no control
signals for handshaking. I have tried "OPENING FOR OUTPUT" then
sending the command then "CLOSING" and "OPENING FOR INPUT" but that
did not work.

Any help with this problem would be greatly appreciated.

Thanks in advance for the help.

Dick

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2000-11-26 18:13
    Dick,

    I am using PowerBasic to communicate between my PC and the bs2:

    open "com1: 9600,n,8,1,ds,cs" as #1

    'output to bs2
    print #1, [noparse][[/noparse]data to transmit goes here]

    'input from bs2
    if loc(1)>0 then
    delay .1
    Input_Data$ = input$(loc(1),#1)
    end if

    Have you tried using the tests for line status (CS, DS, and CD
    options) to troubleshoot the problem?

    I don't think you can use the "open for input/output" statements.
    They only select a com port as the active serial port.

    Regards,
    Adolph Stumpf
    astumpf@q...


    > This isn't strictly a Stamp question but I could be applicable, I
    > think.
    >
    > I have a device called Weather Jack that records temperature and
    > barometric pressure. The values are stored in the device and can be
    > called by the supplied program.
    >
    > I would like to make a program that retrieves the values at the
    > interval that I choose and manupilate the data in the way that I
    need
    > it.
    >
    > I am using Power Basic to write the program and I can not get
    > the "OPEN COM(x):" function in basic to get the data back out.
    >
    > All of the parameters, "2400,N,8,1" are correct as well as the cable
    > to the device. All I really need to do is send a command, "GC" and
    > wait for a return string of 19 characters but the return characters
    > never arrive!
    >
    > Since someone out there probably has experience with RS-232
    > communications, I am hoping that I can get some answers to this
    > dilema.
    >
    > The device in question has just 3 wires to it so there are no
    control
    > signals for handshaking. I have tried "OPENING FOR OUTPUT" then
    > sending the command then "CLOSING" and "OPENING FOR INPUT" but that
    > did not work.
    >
    > Any help with this problem would be greatly appreciated.
    >
    > Thanks in advance for the help.
    >
    > Dick
  • ArchiverArchiver Posts: 46,084
    edited 2000-11-27 02:55
    You might try
    COM(x):2400,N,8,1,CD0,CS0,DS0,RS
    I had a similar problem with a particular hardware set-up and this seemed
    to solve it. The hardware wouldn't pass data unless software told it to
    ignore the handshake lines. You could also tie the handshake lines at
    the connector if this is what is causing your problem.

    On Sun, 26 Nov 2000 17:21:23 -0000 n2toy@e... writes:
    > This isn't strictly a Stamp question but I could be applicable, I
    > think.
    >
    > I have a device called Weather Jack that records temperature and
    > barometric pressure. The values are stored in the device and can be
    > called by the supplied program.
    >
    > I would like to make a program that retrieves the values at the
    > interval that I choose and manupilate the data in the way that I
    > need
    > it.
    >
    > I am using Power Basic to write the program and I can not get
    > the "OPEN COM(x):" function in basic to get the data back out.
    >
    > All of the parameters, "2400,N,8,1" are correct as well as the cable
    >
    > to the device. All I really need to do is send a command, "GC" and
    > wait for a return string of 19 characters but the return characters
    > never arrive!
    >
    > Since someone out there probably has experience with RS-232
    > communications, I am hoping that I can get some answers to this
    > dilema.
    >
    > The device in question has just 3 wires to it so there are no
    > control
    > signals for handshaking. I have tried "OPENING FOR OUTPUT" then
    > sending the command then "CLOSING" and "OPENING FOR INPUT" but that
    > did not work.
    >
    > Any help with this problem would be greatly appreciated.
    >
    > Thanks in advance for the help.
    >
    > Dick
    >
    >
    >
    >

    ________________________________________________________________
    GET INTERNET ACCESS FROM JUNO!
    Juno offers FREE or PREMIUM Internet access for less!
    Join Juno today! For your FREE software, visit:
    http://dl.www.juno.com/get/tagj.
  • ArchiverArchiver Posts: 46,084
    edited 2000-11-27 10:54
    Hi!
    Can you please send me a example of yours program.I think I can help you.
    Regards.
    Original Message
    From: <n2toy@e...>
    To: <basicstamps@egroups.com>
    Sent: Sunday, November 26, 2000 6:21 PM
    Subject: [noparse][[/noparse]basicstamps] Interface via RS-232


    > This isn't strictly a Stamp question but I could be applicable, I
    > think.
    >
    > I have a device called Weather Jack that records temperature and
    > barometric pressure. The values are stored in the device and can be
    > called by the supplied program.
    >
    > I would like to make a program that retrieves the values at the
    > interval that I choose and manupilate the data in the way that I need
    > it.
    >
    > I am using Power Basic to write the program and I can not get
    > the "OPEN COM(x):" function in basic to get the data back out.
    >
    > All of the parameters, "2400,N,8,1" are correct as well as the cable
    > to the device. All I really need to do is send a command, "GC" and
    > wait for a return string of 19 characters but the return characters
    > never arrive!
    >
    > Since someone out there probably has experience with RS-232
    > communications, I am hoping that I can get some answers to this
    > dilema.
    >
    > The device in question has just 3 wires to it so there are no control
    > signals for handshaking. I have tried "OPENING FOR OUTPUT" then
    > sending the command then "CLOSING" and "OPENING FOR INPUT" but that
    > did not work.
    >
    > Any help with this problem would be greatly appreciated.
    >
    > Thanks in advance for the help.
    >
    > Dick
    >
    >
    >
    >
Sign In or Register to comment.