C161U
The Asynchronous/Synchr. Serial Interface
Preliminary Data Sheet
288
02.2000
PRELIMINARY
PRE
LI
M
INAR
Y
- E
XC
ER
PT
-
12.1.8
Autobaud Detection
12.1.8.1
General Operation
The autobaud detection unit in the ASC provides a capability to recognize the mode and
the baudrate of an asynchronous input signal at RXD. Generally, the baudrates to be
recognized must be known by the application. With this knowledge always a set of nine
baudrates can be detected. The autobaud detection unit is not designed to calculate a
baudrate of an unknown asynchronous frame.
Figure 90 shows how the autobaud detection unit of the ASC is integrated into its
asynchronous mode configuration. The RXD data line is an input to the autobaud
detection unit. The clock fDIV which is generated by the fractional divider is used by the
autobaud detection unit as time base. After successful recognition of baudrate and
asynchronous operating mode of the RXD data input signal, bits in the S0CON register
and the value of the S0BG register in the baudrate timer are set to the appropriate
values, and the ASC can start immediately with the reception of serial input data.
Figure 90
ASC Asynchronous Mode Block Diagram
The following sequence must be generally executed to start the autobaud detection unit
for operation :
– Definition of the baudrates to be detected : standard or non-standard baudrates
– Programming of the Prescaler/Fractional Divider to select a specific value of f
DIV
– Starting the Prescaler/Fractional Divider (setting CON_R)
– Preparing the interrupt system of the CPU
– Enabling the autobaud detection (setting ABCON_ EN and the interrupt enable bits in ABCON
for interrupt generation, if required)
– Polling interrupt request flag or waiting for the autobaud detection interrupt
f
MOD
Baudrate
Timer
Serial Port
Control
Receive / Transmit
Buffers and
Shift Registers
IrDA
Coding
Mux
IrDA
Decoding
Mux
RXD
TXD
Prescaler /
Fractional
Divider
Asynchronous
Mode
f
DIV
Autobaud
Detection