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

PIC18C452-I/L 参数 Datasheet PDF下载

PIC18C452-I/L图片预览
型号: PIC18C452-I/L
PDF下载: 下载PDF文件 查看货源
内容描述: 高性能微控制器,10位A / D [High-Performance Microcontrollers with 10-Bit A/D]
分类和应用: 微控制器
文件页数/大小: 296 页 / 4835 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC18C452-I/L的Datasheet PDF文件第32页浏览型号PIC18C452-I/L的Datasheet PDF文件第33页浏览型号PIC18C452-I/L的Datasheet PDF文件第34页浏览型号PIC18C452-I/L的Datasheet PDF文件第35页浏览型号PIC18C452-I/L的Datasheet PDF文件第37页浏览型号PIC18C452-I/L的Datasheet PDF文件第38页浏览型号PIC18C452-I/L的Datasheet PDF文件第39页浏览型号PIC18C452-I/L的Datasheet PDF文件第40页  
PIC18CXX2  
Register 4-1: STKPTR - Stack Pointer Register  
R/C-0  
STKFUL STKUNF  
bit7  
R/C-0  
U-0  
-
R/W-0  
SP4  
R/W-0  
SP3  
R/W-0  
SP2  
R/W-0  
SP1  
R/W-0  
SP0  
R
= Readable bit  
W = Writeable bit  
C
U
6
5
4
3
2
1
bit0  
= Clearable bit  
= Unimplemented bit,  
Read as ‘0’  
- n = Value at POR reset  
bit 7(1): STKFUL: Stack Full Flag bit  
1= Stack became full or overflowed  
0= Stack has not become full or overflowed  
bit 6(1): STKUNF: Stack Underflow Flag bit  
1= Stack underflow occurred  
0= Stack underflow did not occur  
bit 5:  
Unimplemented: Read as ’0’  
bit 4-0: SP4:SP0: Stack Pointer Location bits  
Note 1: Bit 7 and Bit 6 can only be cleared in user software or by a POR.  
FIGURE 4-3: RETURN ADDRESS STACK AND ASSOCIATED REGISTERS  
Return Address Stack  
11111  
11110  
11101  
STKPTR<4:0>  
TOSU  
0x00  
TOSH  
0x1A  
TOSL  
0x34  
00010  
00011  
0x001A34 00010  
0x000D58 00001  
00000  
Top of Stack  
4.2.3  
PUSH AND POP INSTRUCTIONS  
4.2.4  
STACK FULL/UNDERFLOW RESETS  
Since the Top-of-Stack (TOS) is readable and writable,  
the ability to push values onto the stack and pull values  
off the stack without disturbing normal program execu-  
tion is a desirable option. To push the current PC value  
onto the stack, a PUSH instruction can be executed.  
This will increment the stack pointer and load the cur-  
rent PC value onto the stack. TOSU, TOSH and TOSL  
can then be modified to place a return address on the  
stack.  
These resets are enabled by programming the  
STVREN configuration bit. When the STVREN bit is  
disabled, a full or underflow condition will set the appro-  
priate STKFUL or STKUNF bit, but not cause a device  
reset. When the STVREN bit is enabled, a full or under-  
flow will set the appropriate STKFUL or STKUNF bit  
and then cause a device reset. The STKFUL or  
STKUNF bits are only cleared by the user software or  
a POR reset.  
The ability to pull the TOS value off of the stack and  
replace it with the value that was previously pushed  
onto the stack, without disturbing normal execution, is  
achieved by using the POPinstruction. The POPinstruc-  
tion discards the current TOS by decrementing the  
stack pointer. The previous value pushed onto the  
stack then becomes the TOS value.  
DS39026B-page 36  
Preliminary  
7/99 Microchip Technology Inc.  
 复制成功!