Rainbow-electronics AT90S2313 Manual do Utilizador Página 31

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 92
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 30
31
AT90S2313
0839IAVR06/02
Timer/Counter1 can also be used as an 8-, 9-, or 10-bit Pulse Width Modulator. In this
mode the counter and the OCR1 Register serve as a glitch-free standalone PWM with
centered pulses. Refer to page 35 for a detailed description of this function.
The Input Capture function of Timer/Counter1 provides a capture of the Timer/Counter1
contents to the Input Capture Register (ICR1), triggered by an external event on the
Input Capture Pin (ICP). The actual capture event settings are defined by the
Timer/Counter1 Control Register (TCCR1B). In addition, the Analog Comparator can be
set to trigger the input capture. Refer to Analog Comparator on page 48 for details on
this. The ICP pin logic is shown in Figure 31.
Figure 31. ICP Pin Schematic Diagram
If the Noise Canceler function is enabled, the actual trigger condition for the capture
event is monitored over four samples, and all four must be equal to activate the capture
flag.
Timer/Counter1 Control
Register A TCCR1A
Bits 7, 6 COM1A1, COM1A0: Compare Output Mode1, Bits 1 and 0
The COM1A1 and COM1A0 control bits determine any output pin action following a
compare match in Timer/Counter1. Any output pin actions affect pin OC1 (Output Com-
pare pin 1) (PB3). This is an alternative function to the I/O port, and the corresponding
direction control bit must be set (one) to control an output pin. The control configuration
is shown in Table 8.
Notes: 1. In PWM mode, these bits have a different function. Refer to Table 12 for a detailed
description.
2. The initial state of the OC1 output line is undefined.
Bits 5..2 Res: Reserved Bits
These bits are reserved bits in the AT90S2313 and always read zero.
Bit 7 6 5 4 3 2 1 0
$2F ($4F) COM1A1 COM1A0 ––PWM11 PWM10 TCCR1A
Read/Write R/W R/W R R R R R/W R/W
Initial value 0 0 0 0 0 0 0 0
Table 8. Compare 1 Mode Select
(1)(2)
COM1A1 COM1A0 Description
0 0 Timer/Counter1 disconnected from output pin OC1
0 1 Toggle the OC1 output line.
1 0 Clear the OC1 output line (to zero).
1 1 Set the OC1 output line (to one).
Vista de página 30
1 2 ... 26 27 28 29 30 31 32 33 34 35 36 ... 91 92

Comentários a estes Manuais

Sem comentários