English
Language : 

PIC24FJ128GA010_09 Datasheet, PDF (105/240 Pages) Microchip Technology – 64/80/100-Pin General Purpose, 16-Bit Flash Microcontrollers
PIC24FJ128GA010 FAMILY
10.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. Refer to Section 14. “Timers”
(DS39704) in the “PIC24F Family
Reference Manual” for more information.
The Timer1 module is a 16-bit timer which can serve as
the time counter for the Real-Time Clock, or operate as
a free-running interval timer/counter. Timer1 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 10-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
TCKPS1:TCKPS0 bits.
3. Set the Clock and Gating modes using the TCS
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 interrupt enable
bit, T1IE. Use the priority bits, T1IP2:T1IP0, to
set the interrupt priority.
FIGURE 10-1:
16-BIT TIMER1 MODULE BLOCK DIAGRAM
SOSCO/
T1CK
SOSCI
TGATE
SOSCEN
Gate
Sync
TCY
TON
1x
01
TCKPS1:TCKPS0
2
Prescaler
1, 8, 64, 256
00
TGATE
TCS
Set T1IF
1
0
Reset
QD
Q CK
TMR1
Equal
Comparator
0
1
TSYNC
Sync
PR1
© 2009 Microchip Technology Inc.
DS39747E-page 105