English
Language : 

C8051F58X Datasheet, PDF (308/356 Pages) Silicon Laboratories – Programmable hysteresis and response time Configurble as interrupt or reset source Low current
C8051F58x/F59x
SFR Definition 27.18. TMRnCN: Timer 4 and 5 Control
Bit
7
6
5
Name TFn
EXFn
Type R/W
R/W
R/W
Reset
0
0
0
4
3
2
EXEn
TRn
R/W
R/W
R/W
0
0
0
1
0
CTn
CPRLn
R
R/W
0
0
TMR4CN SFR Address = 0xC8; Bit-Addressable; SFR Page = 0x10
TMR5CN SFR Address = 0x91; SFR Page = 0x10;
Bit Name
Function
7
TFn Timer 4 and 5 16-bit Overflow/Underflow Flag.
Set by hardware when either the Timer overflows from 0xFFFF to 0x0000, under-
flows from the value placed in TMRnCAPH:TMRnCAPL to 0xFFFF (in Auto-reload
Mode), or underflows from 0x0000 to 0xFFFF (in Capture Mode). When the Timer
interrupt is enabled, setting this bit causes the CPU to vector to the Timer interrupt
service routine. This bit is not automatically cleared by hardware.
6
EXFn Timer 4 and 5 External Flag.
Set by hardware when either a capture or reload is caused by a high-to-low transition
on the TnEX input pin and EXENn is logic 1. This bit is not automatically cleared by
hardware.
5:4 Reserved Must Write 00b.
3
EXEn Timer 4 and 5 External Enable.
Enables high-to-low transitions on TnEX to trigger captures, reloads, and control the
direction of the timer/counter (up or down count). If DCENn = 1, TnEX will determine
if the timer counts up or down when in Auto-reload Mode. If EXENn = 1, TnEX should
be configured as a digital input.
0: Transitions on the TnEX pin are ignored.
1: Transitions on the TnEX pin cause capture, reload, or control the direction of timer
count (up or down) as follows:
Capture Mode: ‘1’-to-’0’ Transition on TnEX pin causes TMRnCAPH:TMRnCAPL to
capture timer value.
Auto-Reload Mode: DCENn = 0: ‘1’-to-’0’ transition causes reload of timer and sets
the EXFn Flag. DCENn = 1: TnEX logic level controls direction of timer (up or down).
2
TRn Timer 4 and 5 Run Control.
0: Timer is disabled.
1: Timer enabled and running / counting.
1
CTn Timer 4 and 5 Counter / Timer Select.
0: Timer Function: Timer incremented by clocked defined in TnM1:TnM0 (TMRnCF).
1: Counter Function: Timer incremented by high-to-low transitions on TnEX pin.
0 CPRLn Timer 4 and 5 Capture / Reload Select.
0: Timer is in Auto-Reload mode.
1: Timer is in Capture mode.
308
Rev. 1.2