Cypress Semiconductor FX2LP Información técnica Pagina 303

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 460
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 302
Chapter 14. Timers/Counters and Serial Interface Page 14-11
Figure 14-5. Timer 2 - Timer/Counter with Auto Reload
14.2.7 Timer 2 Baud Rate Generator Mode
Setting either RCLK or TCLK to 1 configures Timer 2 to generate baud rates for Serial Port 0 in
serial mode 1 or 3. Figure 14-6 is the functional diagram for the Timer 2 baud rate generator mode.
In baud rate generator mode, Timer 2 functions in auto-reload mode. However, instead of setting
the TF2 flag, the counter overflow is used to generate a shift clock for the serial port function. As in
normal auto-reload mode, the overflow also causes the pre-loaded start value in the RCAP2L and
RCAP2H Registers to be reloaded into the TL2 and TH2 Registers.
When either TCLK = 1 or RCLK = 1, Timer 2 is forced into auto-reload operation, regardless of the
state of the CP/RL
2 Bit. Timer 2 is used as the receive baud clock source when RCLK=1, and as
the transmit baud clock source when TCLK=1.
When operating as a baud rate generator, Timer 2 does not set the TF2 Bit. In this mode, a Timer
2 interrupt can only be generated by a high-to-low transition on the T2EX pin setting the EXF2 Bit,
and only if enabled by EXEN2 = 1.
The counter time base in baud rate generator mode is CLKOUT/2. To use an external clock
source, set C/T
2 to 1 and apply the desired clock source to the T2 pin.
The maximum frequency for an external clock source on the T2 pin is 3 MHz.
0
7
Divide by 12
Divide by 4
CLKOUT
T2 pin
TR2
CLK
70
EXF2
T2M
INT
RCAP2L
TL2 TH2
RCAP2H
8
15
8
15
EXEN2
T2EX pin
TF2
0
10
1
C/ T2
CP/RL2 = 0
Vista de pagina 302
1 2 ... 298 299 300 301 302 303 304 305 306 307 308 ... 459 460

Comentarios a estos manuales

Sin comentarios