English
Language : 

PIC18F45K80-I Datasheet, PDF (227/622 Pages) Microchip Technology – 28/40/44/64-Pin, Enhanced Flash Microcontrollers with ECAN and nanoWatt XLP Technology
PIC18F66K80 FAMILY
16.3 Timer3 16-Bit Read/Write Mode
Timer3 can be configured for 16-bit reads and writes
(see Figure 16.3). When the RD16 control bit
(T3CON<1>) is set, the address for TMR3H is mapped
to a buffer register for the high byte of Timer3. A read
from TMR3L will load the contents of the high byte of
Timer3 into the Timer3 High Byte Buffer register. This
provides users with the ability to accurately read all
16 bits of Timer3 without having to determine whether a
read of the high byte, followed by a read of the low byte,
has become invalid due to a rollover between reads.
A write to the high byte of Timer3 must also take place
through the TMR3H Buffer register. The Timer3 high
byte is updated with the contents of TMR3H when a
write occurs to TMR3L. This allows users to write all
16 bits to both the high and low bytes of Timer3 at once.
The high byte of Timer3 is not directly readable or
writable in this mode. All reads and writes must take
place through the Timer3 High Byte Buffer register.
Writes to TMR3H do not clear the Timer3 prescaler.
The prescaler is only cleared on writes to TMR3L.
16.4 Using the SOSC Oscillator as the
Timer3 Clock Source
The SOSC internal oscillator may be used as the clock
source for Timer3. It can be enabled in one of these
ways:
• Setting the SOSCEN bit in either the T1CON or
T3CON register (TxCON<3>)
• Setting the SOSCGO bit in the OSCCON2 register
(OSCCON2<3>)
• Setting the SCSx bits to secondary clock source in
the OSCCON register (OSCCON<1:0> = 01)
The SOSCGO bit is used to warm up the SOSC so that
it is ready before any peripheral requests it.
To use it as the Timer3 clock source, the TMR3CSx bits
must also be set. As previously noted, this also config-
ures Timer3 to increment on every rising edge of the
oscillator source.
The SOSC oscillator is described in Section 14.5
“SOSC Oscillator”.
 2010-2012 Microchip Technology Inc.
DS39977F-page 227