home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RBBS in a Box Volume 1 #3.1
/
RBBSIABOX31.cdr
/
msch
/
modem450.txt
< prev
next >
Wrap
Text File
|
1990-10-01
|
9KB
|
144 lines
On The Topic of 450 Baud
Many users have asked about using 450 baud with this RBBS system.
Typically, they are asking why such an option exists (the N option on the
main RBBS menu) when their modem and IBM-PC BASIC don't appear to support
such a speed.
They are correct about IBM-PC BASIC not supporting 450 baud. In
fact, the ROM BIOS routines in the PC don't support 450 baud as an option
either. It's not that IBM or Microsoft skipped the speed when they developed
the PC, but the fact that 450 baud is not a standard communications speed
for the RS-232-C interface. The next higher 'standard' speed above 300
baud is 600 baud, followed by 1200 baud, etc. As a result, 450 baud is
not supported on most personal computer systems.
As it turns out, however, most 300 baud modems will run at somewhat
higher speeds - up to, guess what!, 450 baud in most cases. Although a
somewhat higher error rate can be expected when you "push" a 300 baud modem
to 450 baud, the error rate is typically still low enough to not be any
kind of serious problem to file transfer and message passing operations.
In fact, using the XMODEM file transfer protocol, errors which do occur
are normally detected by the check sum error detection scheme used by XMODEM
and simply force a re-transmission of the block originally received in
error.
Since the speed advantage of 450 over 300 baud can be substantial,
and since we are all interested in doing the most work in the least amount
of time with the equipment at hand, many users have implemented 450 baud
as an option which can used with their "home-grown" communications programs.
(Note that standard IBM-PC communications packages don't support 450 baud
either - such as PC-Talk III). I'll describe how 450 baud can be
implemented from a programming standpoint shortly. But first, let's get
rid of a few erroneous impressions about modem operation.
Your Hayes 300 baud SmartModem (or a Hayes 1200 running in 300 baud
mode) is capable of receiving modem commands and data at up to 1200 baud.
What this means is that the microprocessor in the Hayes is programmed to
automatically look for the AT command sequence - and performs automatic
baud rate detection at the speed you happen to be sending the command
sequence to the modem. This capability, for example, is used in the RBBS
code to send the various modem commands at 1200 baud - to minimize the time
spent sending them!
Your Hayes 300 will even try to send data across the line at 1200
baud - if you open your communications line at that speed and attempt to
go to data mode. However, the 300 is not capable of handling data at that
speed - in fact, it can only transmit and receive data at up to slightly
more than 450 baud - with any reasonable error rate. Since the Hayes doesn't
care at what rate is receives data (anything from 1 to 1200 baud is
acceptable), it is possible to transmit data to the modem and have the
modem transmit it to the phone line at any of those speeds. However, 450
baud is the reasonable upper limit for data communications with the Hayes
300.
Now that we understand the workings of the Hayes modem, let's talk
about how we can get the PC to send data from its RS-232-C Asynchronous
Communications Adapter at 450 baud. As mentioned earlier, 450 is not an
acceptable option to either the BASIC OPEN statement or to the direct
BIOS calls for asychronous communications. However, as always, almost
*anything* is possible using software! The IBM ACA uses an 8250 chip which
is capable of running at speeds from 1 to 19,600 baud (officially, only
up to 9600 baud, but that's another discussion!). The 8250 includes an on-chip
software programmable baud rate generator - which actually determines the
speed used to send and receive data across the RS-232-C interface. This
baud rate generator can be programmed to run at *any* baud rate between
1 and 19,600 baud. The IBM-PC ROM BIOS routines, however, were programmed
to only support the "standard" RS-232-C speeds. Since BASIC uses the BIOS
routines, BASIC only supports those same "standard" speeds.
However, it is possible for you to program the 8250 to run at any
speed you like. In this case, we are only interested in programming it to
run at 450 baud. Programming the baud rate generator in the 8250 consists
of loading the baud rate generator on the chip with a "baud rate divisor"
- which takes the clock frequency and divides it by the number you provide
to come up with the baud rate itself. (Those of you with Technical Reference
manuals for the PC can read all about this on pages 2-135 to 2-137). The
divisor is a two byte value - which is stored into two one byte registers
within the 8250 chip. First, we need to determine what the baud rate divisor
should be for 450 baud operation. Take it from me that the value is X'0100'.
Next, we need to get this value from a BASIC program into the 8250 itself.
Fortunately, BASIC includes the OUT statement - which allows us to send
data to the various I/O ports on the system. The 8250 uses several of these
ports - for the baud rate divisior, modem control, and for actually
sending and receiving the data across the RS-232-C interface.
The baud rate divisor ports are X'3F8' for the least significant
byte and X'3F9' for the most significant byte - when using the COM1 port.
(COM2 addresses are X'2F8' and X'2F9' respectively. Before we can load
these divisor ports, however, we must load another value to another port
to indicate that we are setting the baud rate divisor. This third port is
the Line Control Register and is port X'3FB' (X'2FB' for COM2). The high
order bit (X'80') of the LCR controls access to the baud rate divisor
registers. When this bit is 1, we can load the baud rate divisors. When it
is 0, the 8250 resumes operation with the baud rate loaded. The following
sequence of BASIC statements will load the baud rate divisor registers:
OUT &H3FB,(INP(&H3FB) AND &H80) 'Enable divisor registers.
OUT &H3F8,0 'Low order byte of X'0100'
OUT &H3F9,1 'High order byte of X'0100'
OUT &H3FB,(INP(&H3FB) OR &H80) 'Disable divisor registers.
Adding this code to a BASIC program will cause the COM1 port to
immediately switch to 450 baud operation. A merge file that adds the
450 baud option to PC-TALK.III is listed below. After merging the listed
code into PC-TALK.III, the resulting file can be compiled in accordance
with Andrew Fluegelman's instructions that come in the program's
documentation. This option allows you to dial into one of the local
RBBS-PC bulletin boards at 300 baud then switch to 450 baud for file
transfers at 150 per cent the 300 baud rate (use the <N>ew baud option
on the RBBS-PCs to switch to 450 baud).
Switching to other speeds is just as easy. The only thing you
need to know is the baud rate divisor required for that speed. Here are
a few of the common divisors (see the full table in the Tech. Ref.):
300 X'0180'
450 X'0100'
1200 X'0060'
I hope this discussion has helped to clarify the subject of 450
baud operation. Perhaps with this help, you can make some simple changes
to whatever communications program you're running which will allow you to
use your Hayes 300 at a speed which will allow up to 50 per cent faster
communications!
PC-TALK.III 450 baud merge file
-------------------------------------------------------------------------
200 'Modified for 450 Baud by Dorn W. Stickle - Voice 806-622-0575 - Data - 806-353-7484
425 CLOSE#1:OPEN COMM$ AS #1:PRINT#1,MODMINIT$;:IF BAU450 THEN GOSUB 11000
5026 PRINT" 5 - 450,E,7,1 (text) 6 - 450,N,8,1 (binary)
5055 IF Q$="F" THEN PRINT Q$:GOSUB 5815:PRINT:PRINT"Parameters reset to:";:DORN=0:GOSUB 5100:GOTO 5095
5060 DORN=0:Q=VAL(Q$):IF Q<1 OR Q>6 THEN BEEP:GOTO 5045 ELSE PRINT Q
5081 IF Q=6 THEN PAR$="N":DTA$="8
5086 IF Q=5 OR Q=6 THEN GOSUB 11000
5090 PRINT:PRINT"New parameters are: ";:GOSUB 5100
5095 PRINT GO$:GOSUB 2800:GOTO 515
5100 COLOR BG,FG:IF DORN=1 THEN 5101 ELSE PRINT MID$(COMM$,6,10);:COLOR FG,BG:PRINT:PRINT:GOTO 5105
5101 PRINT "450,"+PAR$+","+DTA$+","+STP$;:COLOR FG,BG:PRINT:PRINT
11000 OUT &H3FB,(INP(&H3FB) OR &H80):OUT &H3F8,0:OUT &H3F9,1:OUT &H3FB,(INP(&H3FB) AND &H7F):DORN=1:RETURN
-------------------------------------------------------------------------