Quatech RS-422/485, MPA-200/300 user manual Baud Rate Generator Programming

Models: RS-422/485 MPA-200/300

1 44
Download 44 pages 24.57 Kb
Page 15
Image 15

3.2Baud Rate Generator Programming

The baud rate generator (hereafter referred to as the BRG) of the SCC consists of a 16-bit down counter, two 8-bit time constant registers, and an output divide-by- two. The time constant for the BRG is programmed into WR12 (least significant byte) and WR13 (most significant byte). The equation relating the baud rate to the time constant is given below while Table 4 shows the time constants associated with a number of popular baud rates when using the standard MPA-200 9.8304 MHz clock.

Clock_Frequency

Time_Const ￿ 2￿Baud_Rate￿Clock_Mode ￿ 2

Where:

Clock_Frequency = crystal frequency of 9.8304 MHz

Clock_Mode = value programmed in WR4

Baud_Rate = desired baud rate

Table 4 Time constants for common baud rates

Baud Rate

Baud Constant (Hex)

38400 - - - - - - - - - - - - - - - - - - - - - - - 007EH 19200 - - - - - - - - - - - - - - - - - - - - - - - 00FEH 9600 - - - - - - - - - - - - - - - - - - - - - - - - 01FEH 4800 - - - - - - - - - - - - - - - - - - - - - - - - 03FEH 2400 - - - - - - - - - - - - - - - - - - - - - - - - 07FEH 1200 - - - - - - - - - - - - - - - - - - - - - - - - 0FFEH 600 - - - - - - - - - - - - - - - - - - - - - - - - - 1FFEH 300 - - - - - - - - - - - - - - - - - - - - - - - - - 3FFEH

(for 9.8304 Mhz Clock)

9

Quatech Inc., MPA-200/300 Manual

Page 15
Image 15
Quatech RS-422/485, MPA-200/300 user manual Baud Rate Generator Programming