C8051F587-IMR Silicon Labs, C8051F587-IMR Datasheet - Page 305
![no-image](/images/no-image-200.jpg)
C8051F587-IMR
Manufacturer Part Number
C8051F587-IMR
Description
8-bit Microcontrollers - MCU 50 MIPS 96 kB 8 kB SPI 2xUART
Manufacturer
Silicon Labs
Datasheet
1.C8051F585-IQR.pdf
(356 pages)
Specifications of C8051F587-IMR
Rohs
yes
Core
8051
Data Bus Width
8 bit
Processor Series
C8051
- Current page: 305 of 356
- Download datasheet (3Mb)
C8051F58x/F59x
27.4. Timer 4 and Timer 5
Timers 4 and 5 are 16-bit counter/timers, each formed by two 8-bit SFRs: TMRnL (low byte) and TMRnH
(high byte) where n = 4 and 5 for timers 4 and 5 respectively. Timers 4 and 5 feature auto-reload, capture,
and toggle output modes with the ability to count up or down. Capture mode and Auto-Reload mode are
selected using bits in the Timer4 and 5 Control registers (TMRnCN). Toggle Output mode is selected using
the Timer 4 and 5 Configuration registers (TMRnCF). These timers may also be used to generate a
square-wave at an external pin. As with Timers 0 and 1, Timers 4 and 5 can use either the system clock
(divided by one, two, or twelve), external clock (divided by eight) or transitions on an external input pin as
its clock source.
The Counter/Timer Select bit CTn bit (TMRnCN.1) configures the peripheral as a counter or timer. Clearing
CTn to 0 configures the Timer to be in a timer mode (i.e., the system clock or transitions on an external pin
as the input for the timer). When CTn is set to 1, the timer is configured as a counter (i.e., high-to-low tran-
sitions at the Tn input pin increment (or decrement) the counter/timer register. Refer to Section “
20.4. Port
I/O Initialization
” on page
193
for information on selecting and configuring external I/O pins for digital
peripherals, such as the Tn pin.
The Timers can use either SYSCLK, SYSCLK divided by 2, SYSCLK divided by 12, an external clock
divided by 8, or high-to-low transitions on the Tn input pin as its clock source when operating in Coun-
ter/Timer with Capture mode. Clearing the CTn bit (TMRnCN.1) selects the system clock/external clock as
the input for the timer. The Timer Clock Select bits TnM0 and TnM1 in TMRnCF can be used to select the
system clock undivided, system clock divided by two, system clock divided by 12, or an external clock pro-
vided at the XTAL1/XTAL2 pins divided by 8 (see SFR Definition 27.19). When CTn is set to logic 1, a high-
to-low transition at the Tn input pin increments the counter/timer register (i.e., configured as a counter).
27.4.1. Configuring Timer 4 and 5 to Count Down
Timers 4 and 5 have the ability to count down. When the timer’s Decrement Enable Bit (DCENn) in the
Timer Configuration Register (see SFR Definition 27.19) is set to 1, the timer can then count up or down .
When DCENn = 1, the direction of the timer’s count is controlled by the TnEX pin’s logic level. When
TnEX = 1, the counter/timer will count up; when TnEX = 0, the counter/timer will count down. To use this
feature, TnEX must be enabled in the digital crossbar and configured as a digital input.
Note: When DCENn = 1, other functions of the TnEX input (i.e., capture and auto-reload) are not available. TnEX will
only control the direction of the timer when DCENn = 1.
27.4.2. Capture Mode
In Capture Mode, Timers 4 and 5 will operate as a 16-bit counter/timer with capture facility. When the Timer
External Enable bit (see SFR Definition 27.18) is set to 1, a high-to-low transition on the TnEX input pin
causes the 16-bit value in the associated timer (THn, TLn) to be loaded into the capture registers (TMRn-
CAPH, TMRnCAPL). If a capture is triggered in the counter/timer, the Timer External Flag (TMRnCN.6) will
be set to 1 and an interrupt will occur if the interrupt is enabled. See
Section “14. Interrupts” on
page 126
for further information concerning the configuration of interrupt sources.
As the 16-bit timer register increments and overflows TMRnH:TMRnL, the TFn Timer Overflow/Underflow
Flag (TMRnCN.7) is set to 1 and an interrupt will occur if the interrupt is enabled. The timer can be config-
ured to count down by setting the Decrement Enable Bit (TMRnCF.0) to 1. This will cause the timer to dec-
rement with every timer clock/count event and underflow when the timer transitions from 0x0000 to
0xFFFF. Just as in overflows, the Overflow/Underflow Flag (TFn) will be set to 1, and an interrupt will occur
if enabled.
Rev. 1.2
305
Related parts for C8051F587-IMR
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![CP2102EK](/photos/9/3/90395/cp2102ek_tmb.jpg)
Part Number:
Description:
KIT EVALUATION FOR CP2102
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![CP2103EK](/photos/9/6/90669/cp2103ek_tmb.jpg)
Part Number:
Description:
KIT EVAL FOR CP2103 USB TO UART
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![CP2201EK](/photos/9/9/90977/cp2201ek_tmb.jpg)
Part Number:
Description:
KIT EVAL FOR CP2201 ETH CTRLR
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![CAPTOUCHSENSEDC](/photos/9/20/92001/captouchsensedc_tmb.jpg)
Part Number:
Description:
DAUGHTER CARD CAP TOUCH SENSE
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![CAPTOUCHSENSESK](/photos/9/20/92002/captouchsensesk_tmb.jpg)
Part Number:
Description:
KIT STARTER CAP TOUCH SENSE
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F320DK](/photos/9/20/92068/c8051f320dk_tmb.jpg)
Part Number:
Description:
DEV KIT FOR C8051F320/F321
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F120DK](/photos/9/20/92070/c8051f120dk_tmb.jpg)
Part Number:
Description:
DEVKIT-F120/21/22/23/24/25/26/27
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F310DK](/photos/9/23/92300/c8051f310dk_tmb.jpg)
Part Number:
Description:
DEV KIT FOR C8051F310/F311
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F226DK](/photos/9/23/92302/c8051f226dk_tmb.jpg)
Part Number:
Description:
DEV KIT F220/221/226/230/231/236
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F300DK](/photos/9/23/92305/c8051f300dk_tmb.jpg)
Part Number:
Description:
DEV KIT F300/301/302/303/304/305
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F330DK](/photos/9/23/92306/c8051f330dk_tmb.jpg)
Part Number:
Description:
DEV KIT FOR C8051F330/F331
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F005DK](/photos/9/23/92307/c8051f005dk_tmb.jpg)
Part Number:
Description:
DEV KIT FOR F005/006/007
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F020DK](/photos/9/23/92314/c8051f020dk_tmb.jpg)
Part Number:
Description:
DEV KIT FOR F020/F021/F022/F023
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F340DK](/photos/9/23/92323/c8051f340dk_tmb.jpg)
Part Number:
Description:
KIT DEV FOR C8051F34X
Manufacturer:
Silicon Laboratories Inc
Datasheet:
![C8051F410DK](/photos/9/23/92324/c8051f410dk_tmb.jpg)
Part Number:
Description:
KIT DEV FOR C8051F41X
Manufacturer:
Silicon Laboratories Inc
Datasheet: