参数资料
型号: PIC18LF96J65-I/PT
厂商: Microchip Technology
文件页数: 113/131页
文件大小: 0K
描述: IC PIC MCU FLASH 48KX16 100TQFP
标准包装: 90
系列: PIC® 18F
核心处理器: PIC
芯体尺寸: 8-位
速度: 41.667MHz
连通性: EBI/EMI,以太网,I²C,SPI,UART/USART
外围设备: 欠压检测/复位,POR,PWM,WDT
输入/输出数: 70
程序存储器容量: 96KB(48K x 16)
程序存储器类型: 闪存
RAM 容量: 3808 x 8
电压 - 电源 (Vcc/Vdd): 2 V ~ 3.6 V
数据转换器: A/D 16x10b
振荡器型: 内部
工作温度: -40°C ~ 85°C
封装/外壳: 100-TQFP
包装: 托盘
PIC18F97J60 FAMILY
DS39762F-page 82
2011 Microchip Technology Inc.
6.1.6.2
Return Stack Pointer (STKPTR)
The STKPTR register (Register 6-2) contains the Stack
Pointer value, the STKFUL (Stack Full) status bit and
the STKUNF (Stack Underflow) status bit. The value of
the Stack Pointer can be 0 through 31. The Stack
Pointer increments before values are pushed onto the
stack and decrements after values are popped off the
stack. On Reset, the Stack Pointer value will be zero.
The user may read and write the Stack Pointer value.
This feature can be used by a Real-Time Operating
System (RTOS) for return stack maintenance.
After the PC is pushed onto the stack 31 times (without
popping any values off the stack), the STKFUL bit is
set. The STKFUL bit is cleared by software or by a
POR.
The action that takes place when the stack becomes
full depends on the state of the STVREN (Stack Over-
flow Reset Enable) Configuration bit. (Refer to
for a description of
the device Configuration bits.) If STVREN is set
(default), the 31st push will push the (PC + 2) value
onto the stack, set the STKFUL bit and reset the
device. The STKFUL bit will remain set and the Stack
Pointer will be set to zero.
If STVREN is cleared, the STKFUL bit will be set on the
31st push and the Stack Pointer will increment to 31.
Any additional pushes will not overwrite the 31st push
and the STKPTR will remain at 31.
When the stack has been popped enough times to
unload the stack, the next pop returns a value of zero
to the PC, and sets the STKUNF bit, while the Stack
Pointer remains at zero. The STKUNF bit will remain
set until cleared by software or until a POR occurs.
6.1.6.3
PUSH
and POP Instructions
Since the Top-of-Stack 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 feature. The PIC18 instruction set
includes two instructions, PUSH and POP, that permit
the TOS to be manipulated under software control.
TOSU, TOSH and TOSL can be modified to place data
or a return address on the stack.
The PUSH instruction places the current PC value onto
the stack. This increments the Stack Pointer and loads
the current PC value onto the stack.
The POP instruction discards the current TOS by
decrementing the Stack Pointer. The previous value
pushed onto the stack then becomes the TOS value.
Note:
Returning a value of zero to the PC on an
underflow has the effect of vectoring the
program to the Reset vector, where the
stack conditions can be verified and
appropriate actions can be taken. This is
not the same as a Reset, as the contents
of the SFRs are not affected.
REGISTER 6-2:
STKPTR: STACK POINTER REGISTER
R/C-0
U-0
R/W-0
STKFUL(1)
STKUNF(1)
SP4
SP3
SP2
SP1
SP0
bit 7
bit 0
Legend:
C = Clearable bit
R = Readable bit
W = Writable bit
U = Unimplemented bit, read as ‘0’
-n = Value at POR
‘1’ = Bit is set
‘0’ = Bit is cleared
x = Bit is unknown
bit 7
STKFUL:
Stack Full Flag bit(1)
1
= Stack became full or overflowed
0
= Stack has not become full or overflowed
bit 6
STKUNF:
Stack Underflow Flag bit(1)
1
= Stack underflow occurred
0
= Stack underflow did not occur
bit 5
Unimplemented:
Read as ‘0’
bit 4-0
SP<4:0>:
Stack Pointer Location bits
Note 1:
Bit 7 and bit 6 are cleared by user software or by a POR.
相关PDF资料
PDF描述
PIC24F16KL401-I/P IC MCU 16BIT 16KB FLASH 20-PDIP
PIC24FJ128GA010-I/PF IC PIC MCU FLASH 128KB 100TQFP
PIC24FJ256GA110-I/PF IC PIC MCU FLASH 256K 100TQFP
PIC24FJ256GB110-I/PF IC PIC MCU FLASH 256K 100TQFP
PIC24FJ64GA004-E/ML IC PIC MCU FLASH 64K 44-QFN
相关代理商/技术参数
参数描述
PIC1-R68-JT 制造商:RCD 制造商全称:RCD COMPONENTS INC. 功能描述:SURFACE MOUNT POWER INDUCTORS
PIC1-R68-JTQ 制造商:RCD 制造商全称:RCD COMPONENTS INC. 功能描述:SURFACE MOUNT POWER INDUCTORS
PIC1-R68-JTW 制造商:RCD 制造商全称:RCD COMPONENTS INC. 功能描述:SURFACE MOUNT POWER INDUCTORS
PIC1-R68-KT 制造商:RCD 制造商全称:RCD COMPONENTS INC. 功能描述:SURFACE MOUNT POWER INDUCTORS
PIC1-R68-KTQ 制造商:RCD 制造商全称:RCD COMPONENTS INC. 功能描述:SURFACE MOUNT POWER INDUCTORS