Setting The Baud Rate - Sanyo MBC-550 Series User Manual

Table of Contents

Advertisement

Setting the Baud Rate
Baud rate can be changed by writing a new point into
counter 2.
Example of Baud Rate Changing Program
(H800 baud)
10 BPS = H800:REM BAUD
RATE
20 RSBR=&H2il:REM COUNTER 2
i
BPS EQU 1)800: Baud rate
i
RSBR EQU 24H: COUNTER 2
RATE EQU 59658/((BPS/30)*16)!30 RATE=
59658/((BPS/30)*l6)
40 AL = RATE AND 255
50 AH = (RATE/256) AND 255
60 OUT RSBR, AL:REM LSB
70 AL =AH
80 OUT RSBR,AL:REM MSB
Basic
I
I
I
MOV AX, RATE
OUT RSBR, AL :LSB
MOV AL,AH
OUT RSBR AL
Assembler
i
i
i
i
i
i
:MSB
i
i
To set any other baud rate, subsitute the rate in place
of J|800 in the examples above.
The default rate upon cold boot is 1200.
Other baud
rates must be set upon start up.
Sanyo Basic may handle baud rates up to 1200.
For baud
rates over 1200, you must set them through assembler.
6-18

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents