More on Serial Data

Mike Naberezny mnaberez at nyx.net
Tue Apr 6 18:19:17 GMT 1999


Hi Guys,

>>BTW - My language of choice (Power Basic, stop laughing!!) only supports
>>9600baud not 8192, any probs here?.
> 
> 9600 will only show garbage...
> Check on the ftp site for GCAR or if you can't find it, I'll send it to
> you...  It's written in C and runs the serial port at 8228 baud (within 5%)

I've never used Power Basic, but in QuickBasic you can "fool" it into
using the 8228 baud rate, a trick that Barry Tisdale showed me.  First,
OPEN up the COM port like you normally would with 9600 baud.  Then,
execute these commands after setting "base" to your COM port's hex address
($3f8 for COM1).

OUT base + 3, 128   'line control register...hi bit = 1
OUT base, 14        'divisor latch lo byte.....14 = 8228bps
OUT base + 1, 0     'divisor latch hi byte
OUT base + 3, 3     'hi bit back to 0      N81

These commands manipulate the UART's registers directly to change the baud
rate to 8228 bps.  You can verify that it works by checking out the COM
port with the MSD program after running it.  You'll see the baud rate as
8228 bps.

 - Mike Naberezny (mnaberez at nyx.net) http://www.nyx.net/~mnaberez





More information about the Gmecm mailing list