TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: J.E.
from: ROBERT FORTUNE
date: 1998-01-21 10:24:00
subject: Serial Communications Que

J.>I have a question about serial communications in PB32.  To open a com
J.>port (in my case, com2) I would type OPEN "COM2:2400,N,8,1,DS,CS,CD" AS
J.>#1 (or something to that effect).  Most of it is pretty self
J.>explanetory, but:
J.>#1. Can pb32 use protocals to transfer data at baud rates higher than
J.>the 2400 max imposed by standard phone lines?  Would I just open the com
J.>port at a higher baud rate, allowing PB32 to do the rest?
     Baud rate limitations are not solely due to phone line limitations.
   Just today in the news it was announced that Microsoft, Compaq and
   Intel are joining together to introduce new modems that will be as much
   as 30 times faster than current modems over existing phone lines.
   The new modems are expected to be available by next Christmas.
   You can use file transfer protocols (Xmodem, Ymodem, etc...) but you
   need the PB compatible code that performs the file transfer or you
   should be able to SHELL out of your PB program to run an external
   file transfer protocol like ZModem (many have dreamed of Zmodem code
   written in\for BASIC but it remains just an elusive dream).
    I haven't seen PB is some time but it is my understanding that PB
   has extensive support for the com port. If that is the case you should
   be able to open your com port at baud rates as high as 115,200 BPS.
    My own test with PDS 7.1 indicates that the highest BPS speed it can
   *reliably* handle is 9600 BPS. (One can bump up the BPS speed in
   QB/PDS to much higher speeds, but QB\PDS's I/O statements have trouble
   handling the higher BPS speeds and can cause chronic Device I/O errors.
   At this point I am unsure if this limitation is a QB problem or a BIOS
   problem or limitation of my 14400 modem. However, there are 3rd party QB
   libraries that allow QB\PDS to handle BPS speeds as high as 115,200 BPS.)
J.>#2. What are those DS, CS, CD options (or whatever they were)?
   This info extracted from the book The Waite Group's "Microsoft QuickBASIC
   Bible".
   ------------------------------------------------------------------------
   ASC   Specifies characters as ASCII, expands tabs, forces a carriage
         return at the end of each line, and treats Ctrl-Z as the EOF
         character.   Comments - usually the best setting for sending and
                      recieving ASCII text files.
   BIN   Performs none of the actions specified for ASC.  Comments - This
          is the default. Use either ASC or BIN but not both.
   CDms  Specifies the number of milli-seconds to wait for the time-out
         on Data Carrier Detect (DCD) line.  Comments - ms must be a
         number in the range 0 through 65535; 0 disables the time-out.
         the default is 0.
   CSms   Specifies the number of milli-seconds to wait for the time-out
          on Clear To Send (CTS) line.  Comments -  ms must be a number
          in the range 0 through 65535. The default is 1000 (1 second).
   DSms   Specifies the number of milli-seconds to wait for the time-out
          on Data Set Ready (DSR) line.  Comments -  ms must be a number
          in the range 0 through 65535. The default is 1000 (1 second).
   LF     Adds a linefeed character to every carriage return.  Comments -
          Use for printing on serial printers.
   OPms   Specifies the number of milli-seconds to wait for OPEN to be
          successful.  Comments - The default is 10000 (10 seconds).
   RBbytes  Allocates a number of bytes to the recieve data buffer.
            Comments - bytes must be in the range 0 through 32767. The
            default in 512.
   RS     Suppresses the detection of the Request to Send (RTS) signal.
   TBbytes Allocates a number of bytes to the transmit data buffer.
           Comments - bytes must be a number in the range 0 through 32767.
           The default is 512.
   -----------------------------------------------------------------------
   The *above* parameters can be included in any order in the OPEN COM
   statement, but must be seperated from each other by commas.
     In my own testing using Microsoft's PDS 7.1 I have found no need for
   any of the above parameters in the OPEN statement. That is the OPEN
   statement works fine with the default values for the above parameters.
   I don't know if PB 3.2 would be the exact same in that regard.
    If you want more information on serial communications a very good book
   is Frank Van Gilluwe's book, "The Undocumented PC". He has extensive
   coverage of the serial port and the UART's registers etc....
    I have a small demo QB\PDS program that I wrote. If you like I can post
   it for you here. It isn't very big but it demonstates the process
   of calling out to a BBS and what not with the exception that it does not
   yet have support for uploading and/or downloading files. If you would
   like me to post it here for you, let me know. Hope that helps. Good luck!
- Robert
J.>Thanks in advance for your time and help:-)
   Hehehe! It's cool! :)
 * OLX 2.1 TD * Programmer(n):makes the lies the Salesman told true.
--- PCBoard (R) v15.3/M 10
---------------
* Origin: MoonDog BBS þ Brooklyn,NY 718 692-2498 (1:278/15)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.