Announcement

Collapse
No announcement yet.

Looking for Terminal Program to comunicate to RS232

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Looking for Terminal Program to comunicate to RS232

    Does anyone have any source to open a COM port with a specified
    baud rate and echo data that is displayed to it?

    I'm in need of an application that can run on a boot disk.

    If so I might be purchasing PB/DOS.

    Thanks

    ------------------
    -Greg
    -Greg
    [email protected]
    MCP,MCSA,MCSE,MCSD

  • #2
    A "simple" terminal program is supplied with PB3.5... take a look in the Examples file (PB35EX.ZIP) in the downloads section.

    It should be a very small job to modify it to your needs, and place it on a bootable diskette.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      Yes, it only needs to be pointed to the location of the
      PB35.inc (Include) and PB35.PBL (Library) files. And one
      line of code in the ModemOut routine to have it display
      what you type in, if that is desired.


      Im, am trying to work up a program that will let two
      programs compare results over a serial line. In trying
      to strip it down I have apparently lost something. Yet
      I can't see any functional difference in the code, though
      it will not apparently transmit or receive anything. (If
      you keep pushing keys it eventually overflows the buffer.)
      In noting the control line, I've noticed that the CTS (Clear
      to Send) line is always low. The terminal program is
      normally always high there. (I am using a cheap cable that
      only passes the RTS (Request to Send) over to the CST on the
      same cconnector. Using two terminals programs it works fine.
      So what can hang a system up like that?

      Sincerely,

      Gregory D. Mellott


      ------------------

      Comment


      • #4
        Can you post the OPEN "COM.." statement ?

        ------------------

        Comment


        • #5
          Sure,

          x$ = "COM1:9600" + ",N,8,1,DS,,CS,CD"
          ON ERROR RESUME NEXT: CLOSE #1: ON ERROR GOTO 0
          OPEN "x$" AS #1 LEN 128

          Yea, I can see it now. I sohouldn't have
          quotes around the variable x$. Sad thing is,
          I looked half the night for it.

          Sincerely, Greg


          PS. Still odd-ball status lines. Will get back if
          I can't find those problems.

          Thanks again.


          ------------------

          Comment


          • #6
            Greg,

            The LEN clause needs the = sign (e.g. LEN = 128).

            I’ m not sure that disabling error trapping before closing #1 is ok; if #1 was opened by the COM and CLOSE #1 causes an error (provided this can happen), then there is something wrong which will likely affect the following OPEN too. If you do so for the case where #1 wasn’ t open, you don’ t need it, as CLOSE #1 won’ t return any error if #1 wasn’ t open.

            This should work with almost any cable (with TX and RX pins crossed of course, like yours):

            Code:
            OPEN “COM1:9600,N,8,1,DS0,CS0,CD0,RS” AS #1
            It bypasses the checking of DSR, CTS, RTS and CD at the OPEN time.

            If the data to be received are not very small, you’ ll probably need to do XON/XOFF sw handshaking (safe but not too immediate to code) or set a big enough rx buffer (not so safe but immediate) or significantly decrease the speed (for emergency only ) otherwise you might loose data.

            ------------------

            Comment

            Working...
            X