4. Functions
36
COM-1(LPCI)H,
COM-2(LPCI)H, COM-4(LPCI)H
Setting the Baud Rate
The output baud rate can be set by setting the appropriate value to the Baud Rate Generator register. The
available setting range depends on which clock mode is used.
Clock 3 mode: 15 - 921,600bps
Clock 2 mode: 8 - 460,800bps
Clock 1 mode: 4 - 230,400bps
Clock 0 mode: 2 - 115,200bps
However, some baud rate values do not have a corresponding Baud Rate Generator register setting. If
the result of substituting the baud rate into the equation below is an integer, then that baud rate can be set.
If the result contains a fractional part, the baud rate cannot be set.
Clock 3 mode
921600 ÷ Desired baud rate
=
Division register setting value
Ex.) 921600
÷
9600bps
=
96 (As the result is an integer, this baud rate can be set.)
921600
÷
128000bps
=
7.2 (As the result contains a fractional part, this baud rate cannot be set.)
Clock 2 mode
460800 ÷ Desired baud rate
=
Division register setting value
Ex.) 460800
÷
9600bps
=
48 (As the result is an integer, this baud rate can be set.)
460800
÷
128000bps
=
3.6 (As the result contains a fractional part, this baud rate cannot be set.)
Clock 1 mode
230400 ÷ Desired baud rate
=
Division register setting value
Ex.) 230400
÷
9600bps
=
24 (As the result is an integer, this baud rate can be set.)
230400
÷
128000bps
=
1.8 (As the result contains a fractional part, this baud rate cannot be set.)
Clock 0 mode
115200 ÷ Desired baud rate
=
Division register setting value
Ex.) 115200
÷
9600bps
=
12 (As the result is an integer, this baud rate can be set.)
115200
÷
76800bps
=
1.5 (As the result contains a fractional part, this baud rate cannot be set.)
CAUTION
The "Driver Library API-PAC(W32)" and the "Standard COM Driver Software COM Setup Disk"
from the supplied CD-ROM use "Clock mode 3". (Fixed)
CAUTION
As Visual Basic's communication control (MSComm) accepts any available baud rate settings,
using the MSComm functionalities limits the rate to 115,200bps maximum. For setting the baud rate
higher than 115,200bps using Visual Basic, refer to the VB sample program included in the
accompanying CD-ROM “Standard COM Driver Software COM Setup Disk”.