www.geehy.com Page 160
15
General-purpose Timer (TMR14)
15.1
Introduction
The general-purpose timer takes the time base unit as the core, and has the
functions of input capture and output compare, and can be used to measure the
pulse width, frequency and duty cycle, and generate the output waveform. It
includes a 16-bit auto reload counter (realize count-up, count-down and
center-aligned count).
15.2
Main Characteristics
(
1
)
Timebase unit
Counter: 16-bit counter, count-up, count-down and center-aligned count
Prescaler: 16-bit programmable prescaler
Auto reloading function
(
2
)
Clock source
Internal clock
(
3
)
Timer function
Input capture
Output compare
PWM output mode
Forced output mode
(
4
)
Interrupt event
Update event (counter overrun/underrun, counter initialization)
Input capture
Output compare
15.3
Structure Block Diagram
Figure 60 General-purpose Timer TMR14 Structure Block Diagram
TMRx_CH1
Filter and edge
detector
Prescaler
TI1
TI1FP1 IC1
Channel 1 capture/
compare register
IC1PS
Output
control
OC1REF
OC1
CNT
Counter
Prescaler
CK_CNT
Trigger
controller
Enable, count
CK_PSC
Internal clock CK_INT
Auto reload
register
TMRx_CH1