PIC18F6720 Datasheet

  • PIC18F6720

  • 64/80-Pin High-Performance,256 Kbit to 1 Mbit Enhanced Flash...

  • 3274.08KB

  • 380页

  • Microchip   Microchip

扫码查看芯片数据手册

上传产品规格书

PDF预览

PIC18F6520/8520/6620/8620/6720/8720
4.3
Fast Register Stack
4.4
PCL, PCLATH and PCLATU
A 鈥渇ast interrupt return鈥?option is available for interrupts.
A Fast Register Stack is provided for the Status, WREG
and BSR registers and is only one in depth. The stack
is not readable or writable and is loaded with the
current value of the corresponding register when the
processor vectors for an interrupt. The values in the
registers are then loaded back into the working regis-
ters, if the
FAST RETURN
instruction is used to return
from the interrupt.
A low or high priority interrupt source will push values
into the stack registers. If both low and high priority
interrupts are enabled, the stack registers cannot be
used reliably for low priority interrupts. If a high priority
interrupt occurs while servicing a low priority interrupt,
the stack register values stored by the low priority
interrupt will be overwritten.
If high priority interrupts are not disabled during low
priority interrupts, users must save the key registers in
software during a low priority interrupt.
If no interrupts are used, the fast register stack can be
used to restore the Status, WREG and BSR registers at
the end of a subroutine call. To use the fast register
stack for a subroutine call, a
FAST CALL
instruction
must be executed.
Example 4-1 shows a source code example that uses
the fast register stack.
The program counter (PC) specifies the address of the
instruction to fetch for execution. The PC is 21 bits
wide. The low byte is called the PCL register; this reg-
ister is readable and writable. The high byte is called
the PCH register. This register contains the PC<15:8>
bits and is not directly readable or writable; updates to
the PCH register may be performed through the
PCLATH register. The upper byte is called PCU. This
register contains the PC<20:16> bits and is not directly
readable or writable; updates to the PCU register may
be performed through the PCLATU register.
The PC addresses bytes in the program memory. To
prevent the PC from becoming misaligned with word
instructions, the LSB of the PCL is fixed to a value of
鈥?鈥? The PC increments by 2 to address sequential
instructions in the program memory.
The
CALL, RCALL, GOTO
and program branch
instructions write to the program counter directly. For
these instructions, the contents of PCLATH and
PCLATU are not transferred to the program counter.
The contents of PCLATH and PCLATU will be trans-
ferred to the program counter by an operation that
writes PCL. Similarly, the upper two bytes of the
program counter will be transferred to PCLATH and
PCLATU by an operation that reads PCL. This is useful
for computed offsets to the PC (see
Section 4.8.1
鈥淐omputed GOTO鈥?.
EXAMPLE 4-1:
CALL SUB1, FAST
FAST REGISTER STACK
CODE EXAMPLE
;STATUS, WREG, BSR
;SAVED IN FAST REGISTER
;STACK
4.5
Clocking Scheme/Instruction
Cycle
鈥?/div>
鈥?/div>
SUB1
鈥?/div>
鈥?/div>
鈥?/div>
RETURN FAST
;RESTORE VALUES SAVED
;IN FAST REGISTER STACK
The clock input (from OSC1) is internally divided by
four to generate four non-overlapping quadrature
clocks, namely Q1, Q2, Q3 and Q4. Internally, the
program counter (PC) is incremented every Q1, the
instruction is fetched from the program memory and
latched into the instruction register in Q4. The instruc-
tion is decoded and executed during the following Q1
through Q4. The clocks and instruction execution flow
are shown in Figure 4-4.
FIGURE 4-4:
CLOCK/INSTRUCTION CYCLE
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
Q1
Q2
Q3
Q4
OSC1
Q1
Q2
Q3
Q4
PC
OSC2/CLKO
(RC mode)
PC+2
PC+4
Internal
Phase
Clock
PC
Execute INST (PC-2)
Fetch INST (PC)
Execute INST (PC)
Fetch INST (PC+2)
Execute INST (PC+2)
Fetch INST (PC+4)
DS39609B-page 44
铮?/div>
2004 Microchip Technology Inc.

PIC18F6720相关型号PDF文件下载

  • 型号
    版本
    描述
    厂商
    下载
  • 英文版
    8-Pin FLASH-Based 8-Bit CMOS Microcontrollers
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontroller with EEPROM Data Memory
    MICROCHIP ...
  • 英文版
    8-Pin, 8-Bit CMOS Microcontroller with A/D Converter and EEP...
    MICROCHIP ...
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP ...
  • 英文版
    8-Pin FLASH-Based 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    Microcontroller
    MICROCHIP
  • 英文版
    Microcontroller 
    Microchip
  • 英文版
    Microcontroller
    ETC
  • 英文版
    EPROM-Based 8-Bit CMOS Microcontroller
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP
  • 英文版
    8-Pin, 8-Bit CMOS Microcontrollers
    MICROCHIP ...
  • 英文版
    ETC
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP
  • 英文版
    EPROM Memory Programming Specification
    MICROCHIP ...
  • 英文版
    28-Pin Programmable Mixed Signal Controller
    Microchip
  • 英文版
    EPROM Memory Programming Specification
    Microchip
  • 英文版
    Microcontroller
    ETC
  • 英文版
    Microcontroller
    ETC
  • 英文版
    EPROM/ROM-Based 8-Bit CMOS Microcontroller Series
    MICROCHIP

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!