PIC24FJ128GA MICROCHIP [Microchip Technology], PIC24FJ128GA Datasheet - Page 105

no-image

PIC24FJ128GA

Manufacturer Part Number
PIC24FJ128GA
Description
General Purpose, 16-Bit Flash Microcontrollers
Manufacturer
MICROCHIP [Microchip Technology]
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC24FJ128GA006-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GA006-I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC24FJ128GA006-I/PT
0
Part Number:
PIC24FJ128GA006T-I/PT
Manufacturer:
FSC
Quantity:
13 520
Part Number:
PIC24FJ128GA006T-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GA006T-I/PT
0
Part Number:
PIC24FJ128GA008-I/PT
Manufacturer:
ISSI
Quantity:
38
Part Number:
PIC24FJ128GA008-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GA008-I/PT
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC24FJ128GA008T-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GA010-I/PF
Manufacturer:
MICROCHIP
Quantity:
225
Part Number:
PIC24FJ128GA010-I/PF
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC24FJ128GA010-I/PF
Manufacturer:
MICROCHIP/微芯
Quantity:
20 000
Part Number:
PIC24FJ128GA010-I/PF
Quantity:
3
Part Number:
PIC24FJ128GA010-I/PF
0
Part Number:
PIC24FJ128GA010-I/PT
Manufacturer:
Microchi
Quantity:
627
Part Number:
PIC24FJ128GA010-I/PT
Manufacturer:
MICROCHIP
Quantity:
212
11.0
The Timer2/3 and Timer4/5 modules are 32-bit timers,
which can also be configured as four independent 16-bit
timers with selectable operating modes.
As a 32-bit timer, Timer2/3 and Timer4/5 operate in
three modes:
• Two independent 16-bit timers (Timer2 and
• Single 32-bit Timer
• Single 32-bit Synchronous Counter
They also support these features:
• Timer gate operation
• Selectable prescaler settings
• Timer operation during Idle and Sleep modes
• Interrupt on a 32-bit period register match
• ADC Event Trigger (Timer4/5 only)
Individually, all four of the 16-bit timers can function as
synchronous timers or counters. They also offer the
features listed above, except for the ADC Event
Trigger; this is implemented only with Timer5. The
operating modes and enabled features are determined
by setting the appropriate bit(s) in the T2CON, T3CON,
T4CON and T5CON registers. T2CON and T4CON are
shown in generic form in Register 11-1; T3CON and
T5CON are shown in Register 11-2.
For 32-bit timer/counter operation, Timer2 and Timer4
are the least significant word; Timer3 and Timer4 are
the most significant word of the 32-bit timers.
© 2006 Microchip Technology Inc.
Note:
Timer3) with all 16-bit operating modes (except
Asynchronous Counter mode)
Note:
TIMER2/3 AND TIMER4/5
This data sheet summarizes the features
of this group of PIC24FJ devices. It is not
intended to be a comprehensive reference
source.
For 32-bit operation, T3CON and T5CON
control bits are ignored. Only T2CON and
T4CON control bits are used for setup and
control. Timer2 and Timer4 clock and gate
inputs are utilized for the 32-bit timer
modules, but an interrupt is generated with
the Timer3 or Timer5 interrupt flags.
Preliminary
PIC24FJ128GA FAMILY
To configure Timer2/3 or Timer4/5 for 32-bit operation:
1.
2.
3.
4.
5.
6.
The timer value at any point is stored in the register
pair, TMR3:TMR2 (or TMR5:TMR4). TMR3 (TMR5)
always contains the most significant word of the count,
while TMR2 (TMR4) contains the least significant word.
To configure any of the timers for individual 16-bit
operation:
1.
2.
3.
4.
5.
6.
Set the T32 bit (T2CON<3> or T4CON<3> = 1
Select the prescaler ratio for Timer2 or Timer4
using the TCKPS1:TCKPS0 bits.
Set the Clock and Gating modes using the TCS
and TGATE bits.
Load the timer period value. PR3 (or PR5) will
contain the most significant word of the value,
while PR2 (or PR4) contains the least significant
word.
If interrupts are required, set the interrupt enable
bit T3IE or T5IE; use the priority bits,
T3IP2:T3IP0 or T5IP2:T5IP0, to set the interrupt
priority. Note that while Timer2 or Timer4 con-
trols the timer, the interrupt appears as a Timer3
or Timer5 interrupt.
Set the TON bit (= 1).
Clear the T32 bit corresponding to that timer
(T2CON<3>
T4CON<3> for Timer4 and Timer5).
Select the timer prescaler ratio using the
TCKPS1:TCKPS0 bits.
Set the Clock and Gating modes using the TCS
and TGATE bits.
Load the timer period value into the PRx register.
If interrupts are required, set the interrupt enable
bit, TxIE; use the priority bits, TxIP2:TxIP0, to
set the interrupt priority.
Set the TON bit (TxCON<15> = 1).
for
Timer2
and
DS39747C-page 103
Timer3
or
)
.

Related parts for PIC24FJ128GA