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

PIC16F84A-04/P 参数 Datasheet PDF下载

PIC16F84A-04/P图片预览
型号: PIC16F84A-04/P
PDF下载: 下载PDF文件 查看货源
内容描述: 18引脚增强型闪存/ EEPROM的8位微控制器 [18-pin Enhanced Flash/EEPROM 8-Bit Microcontroller]
分类和应用: 闪存微控制器可编程只读存储器电动程控只读存储器电可擦编程只读存储器
文件页数/大小: 68 页 / 474 K
品牌: MICROCHIP [ MICROCHIP TECHNOLOGY ]
 浏览型号PIC16F84A-04/P的Datasheet PDF文件第7页浏览型号PIC16F84A-04/P的Datasheet PDF文件第8页浏览型号PIC16F84A-04/P的Datasheet PDF文件第9页浏览型号PIC16F84A-04/P的Datasheet PDF文件第10页浏览型号PIC16F84A-04/P的Datasheet PDF文件第12页浏览型号PIC16F84A-04/P的Datasheet PDF文件第13页浏览型号PIC16F84A-04/P的Datasheet PDF文件第14页浏览型号PIC16F84A-04/P的Datasheet PDF文件第15页  
PIC16F84A
2.3
PCL and PCLATH
2.4
The program counter (PC) specifies the address of the
instruction to fetch for execution. The PC is 13 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<12:8>
bits and is not directly readable or writable. All updates
to the PCH register go through the PCLATH register.
2.3.1
STACK
Indirect Addressing; INDF and FSR
Registers
The INDF register is not a physical register. Address-
ing INDF actually addresses the register whose
address is contained in the FSR register (FSR is a
pointer).
This is indirect addressing.
EXAMPLE 2-1:
INDIRECT ADDRESSING
The stack allows a combination of up to 8 program calls
and interrupts to occur. The stack contains the return
address from this branch in program execution.
Midrange devices have an 8 level deep x 13-bit wide
hardware stack. The stack space is not part of either
program or data space and the stack pointer is not
readable or writable. The PC is PUSHed onto the stack
when a
CALL
instruction is executed or an interrupt
causes a branch. The stack is POPed in the event of a
RETURN, RETLW
or a
RETFIE
instruction execution.
PCLATH is not modified when the stack is PUSHed or
POPed.
After the stack has been PUSHed eight times, the ninth
push overwrites the value that was stored from the first
push. The tenth push overwrites the second push (and
so on).
Register file 05 contains the value 10h
Register file 06 contains the value 0Ah
Load the value 05 into the FSR register
A read of the INDF register will return the value of
10h
• Increment the value of the FSR register by one
(FSR = 06)
• A read of the INDF register now will return the
value of 0Ah.
Reading INDF itself indirectly (FSR = 0) will produce
00h. Writing to the INDF register indirectly results in a
no-operation (although STATUS bits may be affected).
A simple program to clear RAM locations 20h-2Fh
using indirect addressing is shown in Example 2-2.
EXAMPLE 2-2:
HOW TO CLEAR RAM
USING INDIRECT
ADDRESSING
0x20
FSR
INDF
FSR
FSR,4
NEXT
;initialize pointer
; to RAM
;clear INDF register
;inc pointer
;all done?
;NO, clear next
;YES, continue
NEXT
movlw
movwf
clrf
incf
btfss
goto
:
CONTINUE
An effective 9-bit address is obtained by concatenating
the 8-bit FSR register and the IRP bit (STATUS<7>), as
shown in Figure 2-1. However, IRP is not used in the
PIC16F84A.
©
1998 Microchip Technology Inc.
Preliminary
DS35007A-page 11