Announcement

Collapse
No announcement yet.

COM Port Libraries

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

  • COM Port Libraries

    I have an application that requires very fast handling
    of the COM port (RS-232) control lines (like RTS/CTS)
    in order to send and retreive characters through the COM port.

    To accomplish this, my goal is to use a single board
    computer running DOS and a Powerbasic program. (Windows
    handling of the COM port is generally not fast enough.)
    Is it possible with Powerbasic to switch the control lines
    (like switch RTS on and off)? Also, I need to detect when
    CTS is high of low.

    If this is possible, then can you point me to the
    correct section in your manual that discusses these
    feature. If it is not, then can you recommend a COM
    library that will enhance Powerbasic so that it can
    handle these lines?

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




    [This message has been edited by Michael B Cone (edited October 21, 2003).]

  • #2
    I just discovered the Marshallsoft and TeraTech
    libraries for Powerbasic RS-232 communications.

    MARSHALLSOFT
    Looking through their sample code, I can see that
    Marshallsoft libraries handle the control lines
    in both directions.

    For example Marshallsoft uses these functions:

    Code:
    DECLARE FUNCTION SioCTS(BYVAL Port AS INTEGER) AS INTEGER
    DECLARE FUNCTION SioDCD(BYVAL Port AS INTEGER) AS INTEGER
    DECLARE FUNCTION SioDSR(BYVAL Port AS INTEGER) AS INTEGER
    DECLARE FUNCTION SioDTR(BYVAL Port AS INTEGER, BYVAL Cmd AS WORD) AS INTEGER
    DECLARE FUNCTION SioRTS(BYVAL Port AS INTEGER,BYVAL Cmd AS WORD) AS INTEGER
    TERATECH
    However, according to the documentation, TeraTech only
    reads the lines that are typically observed only (like DSR).
    It does not appear to allow the changing of the outgoing
    control lines. (Please correct me if I'm wrong on this.)


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




    [This message has been edited by Michael B Cone (edited October 21, 2003).]

    Comment


    • #3
      Check IOCTL and IOCTL$, they might answer your question !!

      Herman.


      ------------------
      You gotta run, and don't loop back.
      You gotta run, and don't loop back.

      Comment

      Working...
      X