English
Language : 

XR88C681_06 Datasheet, PDF (55/101 Pages) Exar Corporation – CMOS Dual Channel UART (DUART)
XR88C681
D.3.1 Timer Mode:
Please note that of the two C/T Modes, the Timer Mode is
the only mode which is relevant to the function of Bit Rate
Selection. However, for completeness, the Counter
Mode is also discussed here.
In the Timer mode, the C/T acts as a programmable
divider and generates a square wave whose period is
twice the value (in clock periods) of the contents of the
Counter/Timer Registers, CTUR and CTLR. The C/T can
be used as a programmable bit rate generator in order to
produce a 16X clock for any bit rate not provided by the
BRG. The square-wave, originating from the C/T is
output on Output Port pin, OP3.
If the C/T is programmed to operate in the Timer mode,
the frequency of the resulting C/T square wave can be
expressed as follows:
C/T Output Frequency =
Frequency of Selected Timing Source
2·([CTUR]·28 + [CTLR] )
Where: [CTUR] = the contents of the CTUR register in
decimal form
[CTUR] = the contents of the CTLR register in
decimal form
Since the C/T Output is handled as a 16X clock signal by
the DUART circuitry, the resulting bit rate is 1/16 the
frequency of the C/T Output signal. Therefore, the bit
rate, derived from the C/T can be expressed as follows:
Bit Rate =
Frequency of Selected Timing Source
32·([CTUR]·28 + [CTLR] )
The contents of the CTUR and CTLR registers may be
changed at any time, but will only begin to take effect at
the next half cycle of the square wave. The C/T begins
operation using the values in CTUR/CTLR upon receipt of
the Address-Trigger “START COUNTER” command (See
Table 1).
The C/T then runs continuously. A subsequent “START
COUNTER” command causes the C/T to terminate the
current timing cycle and begin a new timing cycle using
the current values stored in CTUR and CTLR. The
COUNTER READY status bit, in the Interrupt Status
Register (ISR[3]), is set once each cycle of the square
wave. This allows the use of the C/T as a periodic
interrupt generator, if the condition is programmed to
generate an interrupt via the interrupt mask register
(IMR). The ISR[3] can be cleared by issuing the
address-triggered “STOP COUNTER” command (See
Table 1). In the TIMER mode, however, the command
does not actually stop the C/T.
D.3.2 COUNTER MODE
In the Counter Mode, the C/T counts down the number of
pulses written into CTUR/CTLR, beginning at the receipt
of a “START COUNTER” command.
The
COUNTER/READY status bit (ISR[3]) is set upon
reaching the count of 000016. The C/T will continue to
count past the 000016 and underflow (with the next count
being FFFF16) until it is stopped by the CPU via a “STOP
COUNTER” command. If OP3 is programmed to be the
output of the C/T, the output will remain high until the
terminal count is reached, at which time the output goes
low. It then returns to the high state and ISR[3] is cleared
when the C/T is stopped (via the “STOP COUNTER”
command). A “START COUNTER” command while the
counter is running restarts the counter with the values in
CTUR/CTLR. The CPU may change the contents of
CTUR or CTLR at any time but the new count takes effect
only on after the subsequent START COUNTER
command. If new values are not programmed the
previous values are preserved and used for the next
cycle.
D.4 External Inputs
The DUART allows for some of the Input Port pins (IP2 -
IP5) to be used as direct external inputs to the Timing
Control Block as timing sources for the Transmitters and
Receivers of both channels. Please note that the user can
specify whether a clock signal, applied to one of these
external inputs, is a 1X or a 16X clock signal; via the Clock
Select Registers (see Section D.5). For a more detailed
discussion on the Input Port pins and their function,
please see Section E.
D.5 Clock Select Registers, CSRA and CSRB
In Figure 24, the Clock Select Registers are the 32:1
MUX’s. The Clock Select Registers are the means that
the user can select which clock signals will drive the
Transmitters and Receivers of both channels. The CSRs
allow the user to select the 23 different standard bit rates
from the BRG, the Counter/Timer output, or to use an
external input as the timing source for the Transmitters
Rev. 2.11
55