English
Language : 

CC2510FX Datasheet, PDF (113/244 Pages) List of Unclassifed Manufacturers – True System-on-Chip with Low Power RF Transceiver and 8051 MCU
Note: Before an I/O pin can be used by the
timer, the required I/O pin must be configured
as a Timer 1 peripheral pin as described in
Section 13.4.6 on Page 89 .
13.6.4 Input Capture Mode
When a channel is configured as an input
capture channel, the I/O pin associated with
that channel, is configured as an input. After
the timer has been started, a rising edge,
falling edge or any edge on the input pin will
trigger a capture of the 16-bit counter contents
into the associated capture register. Thus the
timer is able to capture the time when an
external event takes place.
The channel input pin is synchronized to the
internal system clock. Thus pulses on the input
pin must have a minimum duration greater
than the system clock period.
The contents of the 16-bit capture register can
be read from registers T1CCnH:T1CCnL.
When the capture takes place, the interrupt
flag for the appropriate channel
(T1CTL.CH0IF,
T1CTL.CH1IF,
or
T1CTL.CH2IF for channel 0, 1, and 2
respectively) is asserted. The IRCON.T1IF
flag is only asserted if the corresponding
interrupt mask bit T1CCTL0.IM, T1CCTL1.IM,
or T1CCTL2.IM is set to 1. An interrupt
request is generated if the corresponding
interrupt mask bit is set together with
IEN1.T1EN.
13.6.4.1 RF Event Capture
Each timer channel may be configured so that
the RF events associated with the RF interrupt
(interrupt #16) will trigger a capture instead of
the normal input pin capture. This is done by
setting T1CCTLn.CPSEL=1. When this
configuration is chosen, the RF event(s)
enabled by RFIM (see Section 14.3.1 on Page
189) will trigger a capture. This way the timer
can be used to capture a value when e.g. a
start of frame delimiter (SFD) is detected.
Note: When using an RF event to trigger a
capture, both CLKCON.CLKSPD and
CLKCON.TICKSPD must be set to 000.
13.6.5 Output Compare Mode
In output compare mode the I/O pin associated
with a channel is set as an output. After the
timer has been started, the contents of the
counter are compared with the contents of the
C2510Fx / CC2511Fx
channel compare register T1CCnH:T1CCnL. If
the compare register equals the counter
contents, the output pin is set, reset, or toggled
according to the compare output mode setting
of T1CCTLn.CMP. Note that all edges on
output pins are glitch-free when operating in a
given output compare mode. Writing to the
compare register T1CCnL is buffered so that a
value written to T1CCnL does not take effect
until the corresponding high order register,
T1CCnH is written. For output compare modes
0 - 2, a new value written to the compare
register T1CCnH:T1CCnL takes effect after
the registers have been written. For other
output compare modes the new value written
to the compare register takes effect when the
timer reaches 0x0000.
Note that channel 0 has fewer output compare
modes than channel 1 and 2 because
T1CC0H:T1CC0L has a special function in
modes 6 and 7, meaning these modes would
not be useful for channel 0.
When a compare occurs, the interrupt flag for
the appropriate channel (T1CTL.CH0IF,
T1CTL.CH1IF, or T1CTL.CH2IF for channel
0, 1, and 2 respectively) is asserted. The
IRCON.T1IF flag is only asserted if the
corresponding interrupt mask bit T1CCTL0.IM,
T1CCTL1.IM, or T1CCTL2.IM is set to 1. An
interrupt request is generated if the
corresponding interrupt mask bit is set together
with IEN1.T1EN. When operating in up-down
mode, the interrupt flag for channel 0 is set
when the counter reaches 0x0000 instead of
when a compare occurs.
Examples of output compare modes in various
timer modes are given in Figure 31, Figure 32,
and Figure 33.
Edge-aligned: PWM output signals can be
generated using the timer modulo mode and
channels 1 and 2 in output compare mode 5 or
6 (defined by T1CCTLn.CMP bits, where n is 1
or 2) as shown in Figure 32. The period of the
PWM signal is determined by the setting in
T1CC0 and the duty cycle is determined by
T1CCn.
PWM output signals can also be generated
using the timer free-running mode and
channels 1 and 2 in output compare mode 5 or
6 as shown in Figure 31. In this case the
period of the PWM signal is determined by
CLKCON.TICKSPD and the prescaler divider
value in T1CTL.DIV and the duty cycle is
determined by T1CCn (n = 1 or 2).
SWRS055D
Page 113 of 243