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

PIC16F57-I/SP 参数 Datasheet PDF下载

PIC16F57-I/SP图片预览
型号: PIC16F57-I/SP
PDF下载: 下载PDF文件 查看货源
内容描述: 基于闪存的8位CMOS微控制器系列 [Flash-Based, 8-Bit CMOS Microcontroller Series]
分类和应用: 闪存微控制器
文件页数/大小: 88 页 / 1373 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC16F57-I/SP的Datasheet PDF文件第17页浏览型号PIC16F57-I/SP的Datasheet PDF文件第18页浏览型号PIC16F57-I/SP的Datasheet PDF文件第19页浏览型号PIC16F57-I/SP的Datasheet PDF文件第20页浏览型号PIC16F57-I/SP的Datasheet PDF文件第22页浏览型号PIC16F57-I/SP的Datasheet PDF文件第23页浏览型号PIC16F57-I/SP的Datasheet PDF文件第24页浏览型号PIC16F57-I/SP的Datasheet PDF文件第25页  
PIC16F5X  
FIGURE 3-7:  
LOADING OF PC BRANCH  
INSTRUCTIONSPIC16F57  
AND PIC16F59  
3.5  
Program Counter  
As a program instruction is executed, the Program  
Counter (PC) will contain the address of the next  
program instruction to be executed. The PC value is  
increased by one, every instruction cycle, unless an  
instruction changes the PC.  
GOTOInstruction  
10  
9
8
7
0
PC  
PCL  
For a GOTOinstruction, bits 8:0 of the PC are provided  
by the GOTO instruction word. The PC Latch (PCL) is  
mapped to PC<7:0> (Figure 3-6 and Figure 3-7).  
Instruction Word  
2
PA<1:0>  
For the PIC16F57 and PIC16F59, a page number must  
be supplied as well. Bit 5 and bit 6 of the STATUS reg-  
ister provide page information to bit 9 and bit 10 of the  
PC (Figure 3-6 and Figure 3-7).  
7
0
Status  
For a CALL instruction, or any instruction where the  
PCL is the destination, bits 7:0 of the PC again are  
provided by the instruction word. However, PC<8>  
does not come from the instruction word, but is always  
cleared (Figure 3-6 and Figure 3-7).  
CALLor Modify PCLInstruction  
10  
9
8
7
0
PC  
PCL  
Instructions where the PCL is the destination or modify  
PCL instructions, include MOVWF PCL, ADDWF PCL,  
and BSF PCL,5.  
Instruction Word  
Reset to ‘0’  
PA<1:0>  
2
For the PIC16F57 and PIC16F59, a page number  
again must be supplied. Bit 5 and bit 6 of the STATUS  
register provide page information to bit 9 and bit 10 of  
the PC (Figure 3-6 and Figure 3-7).  
7
0
Status  
Note:  
Because PC<8> is cleared in the CALL  
instruction or any modified PCL instruc-  
tion, all subroutine calls or computed  
jumps are limited to the first 256 locations  
of any program memory page (512 words  
long).  
3.5.1  
PAGING CONSIDERATIONS  
PIC16F57 AND PIC16F59  
If the PC is pointing to the last address of a selected  
memory page, when it increments, it will cause the pro-  
gram to continue in the next higher page. However, the  
page preselect bits in the STATUS register will not be  
updated. Therefore, the next GOTO, CALL or MODIFY  
PCL instruction will send the program to the page  
specified by the page preselect bits (PA0 or PA<1:0>).  
FIGURE 3-6:  
LOADING OF PC BRANCH  
INSTRUCTIONSPIC16F54  
GOTOInstruction  
For example, a NOP at location 1FFh (page 0)  
increments the PC to 200h (page 1). A GOTO xxxat  
200h will return the program to address xxh on page 0  
(assuming that PA<1:0> are clear).  
8
7
0
PCL  
PC  
Instruction Word  
To prevent this, the page preselect bits must be  
updated under program control.  
CALLor Modify PCLInstruction  
3.5.2  
EFFECTS OF RESET  
8
7
0
The PC is set upon a Reset, which means that the PC  
addresses the last location in the last page (i.e., the  
Reset vector).  
PCL  
PC  
Reset to '0'  
Instruction Word  
The STATUS register page preselect bits are cleared  
upon a Reset, which means that page 0 is preselected.  
Therefore, upon a Reset, a GOTO instruction at the  
Reset vector location will automatically cause the  
program to jump to page 0.  
© 2007 Microchip Technology Inc.  
DS41213D-page 19