English
Language : 

PIC24FJ128GC010 Datasheet, PDF (215/472 Pages) Microchip Technology – 16-Bit Flash Microcontrollers with 12-Bit Pipeline A/D, Sigma-Delta A/D, USB On-The-Go and XLP Technology
PIC24FJ128GC010 FAMILY
12.0 TIMER1
Note:
This data sheet summarizes the features of
this group of PIC24F devices. It is not
intended to be a comprehensive reference
source. For more information, refer to the
“PIC24F Family Reference Manual”,
“Timers” (DS39704). The information in
this data sheet supersedes the information
in the FRM.
The Timer1 module is a 16-bit timer, which can serve
as the time counter for the Real-Time Clock (RTC) or
operate as a free-running, interval timer/counter. Tim-
er1 can operate in three modes:
• 16-Bit Timer
• 16-Bit Synchronous Counter
• 16-Bit Asynchronous Counter
Timer1 also supports these features:
• Timer Gate Operation
• Selectable Prescaler Settings
• Timer Operation During CPU Idle and Sleep
modes
• Interrupt on 16-Bit Period Register Match or
Falling Edge of External Gate Signal
Figure 12-1 presents a block diagram of the 16-bit
timer module.
To configure Timer1 for operation:
1. Set the TON bit (= 1).
2. Select the timer prescaler ratio using the
TCKPS<1:0> bits.
3. Set the Clock and Gating modes using the TCS,
TIECS<1:0> and TGATE bits.
4. Set or clear the TSYNC bit to configure
synchronous or asynchronous operation.
5. Load the timer period value into the PR1
register.
6. If interrupts are required, set the Timer1 Interrupt
Enable bit, T1IE. Use the Timer1 Interrupt Priority
bits, T1IP<2:0>, to set the interrupt priority.
FIGURE 12-1:
LPRC
SOSCO
SOSCI
16-BIT TIMER1 MODULE BLOCK DIAGRAM
Clock
Input Select
DQ
CK Q
TMR1
TGATE
1
0
Reset
Set T1IF
SOSCSEL<1:0>
SOSCEN
Clock Input Select Detail
SOSC
Input
T1CK Input
TMRCK Input
LPRC Input
Gate
Sync
2
TCY
TIECS<1:0>
TGATE
TCS
TON
Comparator
Equal
PR1
TCKPS<1:0>
2
Prescaler
1, 8, 64, 256
Gate
Output
0
Sync
1
Clock
Output
to TMR1
TSYNC
 2012-2013 Microchip Technology Inc.
DS30009312B-page 215