欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC18F4580-I/P 参数 Datasheet PDF下载

PIC18F4580-I/P图片预览
型号: PIC18F4580-I/P
PDF下载: 下载PDF文件 查看货源
内容描述: 28 /40/ 44引脚增强型闪存微控制器与ECAN技术, 10位A / D和纳瓦技术 [28/40/44-Pin Enhanced Flash Microcontrollers with ECAN Technology, 10-Bit A/D and nanoWatt Technology]
分类和应用: 闪存微控制器和处理器外围集成电路光电二极管PC时钟
文件页数/大小: 490 页 / 8912 K
品牌: MICROCHIP [ MICROCHIP TECHNOLOGY ]
 浏览型号PIC18F4580-I/P的Datasheet PDF文件第161页浏览型号PIC18F4580-I/P的Datasheet PDF文件第162页浏览型号PIC18F4580-I/P的Datasheet PDF文件第163页浏览型号PIC18F4580-I/P的Datasheet PDF文件第164页浏览型号PIC18F4580-I/P的Datasheet PDF文件第166页浏览型号PIC18F4580-I/P的Datasheet PDF文件第167页浏览型号PIC18F4580-I/P的Datasheet PDF文件第168页浏览型号PIC18F4580-I/P的Datasheet PDF文件第169页  
PIC18F2480/2580/4480/4580
15.2
Timer3 16-Bit Read/Write Mode
15.4
Timer3 Interrupt
Timer3 can be configured for 16-bit reads and writes
(see Figure 15-2). When the RD16 control bit
(T3CON<7>) 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 the user with the ability to accurately read all
16 bits of Timer1 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 a user 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.
The TMR3 register pair (TMR3H:TMR3L) increments
from 0000h to FFFFh and overflows to 0000h. The
Timer3 interrupt, if enabled, is generated on overflow
and is latched in the interrupt flag bit, TMR3IF
(PIR2<1>). This interrupt can be enabled or disabled
by setting or clearing the Timer3 Interrupt Enable bit,
TMR3IE (PIE2<1>).
15.5
Resetting Timer3 Using the CCP
Special Event Trigger
If the ECCP1 module is configured to generate a
special
event
trigger
in
Compare
mode
(ECCP1M<3:0> =
1011),
this signal will reset Timer3.
It will also start an A/D conversion if the A/D module is
enabled (see
for more information.).
The module must be configured as either a timer or
synchronous counter to take advantage of this feature.
When used this way, the ECCPR2H:ECCPR2L register
pair effectively becomes a period register for Timer3.
If Timer3 is running in Asynchronous Counter mode,
the Reset operation may not work.
In the event that a write to Timer3 coincides with a
Special Event Trigger from a CCP module, the write will
take precedence.
Note:
The special event triggers from the
ECCP1 module will not set the TMR3IF
interrupt flag bit (PIR1<0>).
15.3
Using the Timer1 Oscillator as the
Timer3 Clock Source
The Timer1 internal oscillator may be used as the clock
source for Timer3. The Timer1 oscillator is enabled by
setting the T1OSCEN (T1CON<3>) bit. To use it as the
Timer3 clock source, the TMR3CS bit must also be set.
As previously noted, this also configures Timer3 to
increment on every rising edge of the oscillator source.
The Timer1 oscillator is described in
TABLE 15-1:
Name
INTCON
PIR2
PIE2
IPR2
TMR3L
TMR3H
T1CON
T3CON
REGISTERS ASSOCIATED WITH TIMER3 AS A TIMER/COUNTER
Bit 6
Bit 5
TMR0IE
Bit 4
INT0IE
EEIF
EEIE
EEIP
Bit 3
RBIE
BCLIF
BCLIE
BCLIP
Bit 2
TMR0IF
HLVDIF
HLVDIE
HLVDIP
Bit 1
INT0IF
TMR3IF
TMR3IE
TMR3IP
Bit 0
RBIF
ECCP1IF
(2)
ECCP1IE
(2)
ECCP1IP
(2)
Reset
Values
on Page:
TMR1CS
TMR3CS
TMR1ON
TMR3ON
Bit 7
GIE/GIEH PEIE/GIEL
OSCFIF
OSCFIE
OSCFIP
CMIF
(2)
CMIE
(2)
CMIP
(2)
Timer3 Register Low Byte
Timer3 Register High Byte
RD16
RD16
T1RUN
T1CKPS1 T1CKPS0 T1OSCEN T1SYNC
T3ECCP1
(1)
T3CKPS1 T3CKPS0 T3CCP1
(1)
T3SYNC
Legend:
— = unimplemented, read as ‘0’. Shaded cells are not used by the Timer3 module.
Note 1:
These bits are available in PIC18F4X80 devices only.
2:
These bits are available in PIC18F4X80 devices and reserved in PIC18F2X80 devices.
©
2009 Microchip Technology Inc.
DS39637D-page 165