参数资料
型号: S1C7XXXF00E10C
元件分类: 微控制器/微处理器
英文描述: 16-BIT, 90 MHz, RISC MICROCONTROLLER, PQFP
文件页数: 68/196页
文件大小: 1650K
代理商: S1C7XXXF00E10C
第1页第2页第3页第4页第5页第6页第7页第8页第9页第10页第11页第12页第13页第14页第15页第16页第17页第18页第19页第20页第21页第22页第23页第24页第25页第26页第27页第28页第29页第30页第31页第32页第33页第34页第35页第36页第37页第38页第39页第40页第41页第42页第43页第44页第45页第46页第47页第48页第49页第50页第51页第52页第53页第54页第55页第56页第57页第58页第59页第60页第61页第62页第63页第64页第65页第66页第67页当前第68页第69页第70页第71页第72页第73页第74页第75页第76页第77页第78页第79页第80页第81页第82页第83页第84页第85页第86页第87页第88页第89页第90页第91页第92页第93页第94页第95页第96页第97页第98页第99页第100页第101页第102页第103页第104页第105页第106页第107页第108页第109页第110页第111页第112页第113页第114页第115页第116页第117页第118页第119页第120页第121页第122页第123页第124页第125页第126页第127页第128页第129页第130页第131页第132页第133页第134页第135页第136页第137页第138页第139页第140页第141页第142页第143页第144页第145页第146页第147页第148页第149页第150页第151页第152页第153页第154页第155页第156页第157页第158页第159页第160页第161页第162页第163页第164页第165页第166页第167页第168页第169页第170页第171页第172页第173页第174页第175页第176页第177页第178页第179页第180页第181页第182页第183页第184页第185页第186页第187页第188页第189页第190页第191页第192页第193页第194页第195页第196页
2 REGISTERS
2-4
EPSON
S1C17 FAMILY S1C17 CORE MANUAL
2.4 Stack Pointer (SP)
Symbol
SP
Size
24 bits
Initial value
0x000000
Register name
Stack Pointer
R/W
R/W
The Stack Pointer (hereinafter referred to as the “SP”) is a 24-bit register for holding the start address of the stack.
The stack is an area locatable at any place in the system RAM, the start address of which is set in the SP during the
initialization process. The 2 low-order bits of the SP are fixed to 0 and cannot be accessed for writing. Therefore,
the addresses specifiable by the SP are those that lie on 32-bit boundaries.
32-bit boundary address
0 0
0
1
2
23
Fixed
(read only)
Figure 2.4.1 Stack Pointer (SP)
2.4.1 About the Stack Area
The size of an area usable as the stack is limited according to the RAM size available for the system and the size of
the area occupied by ordinary RAM data. Care must be taken to prevent the stack and data area from overlapping.
Furthermore, as the SP becomes 0x000000 when it is initialized upon reset, “last stack address + 4, with 2 low-
order bits = 0” must be written to the SP in the beginning part of the initialization routine. A load instruction may
be used to write this address. If an interrupt occurs before the stack is set up, it is possible that the PC or PSR will
be saved to an indeterminate location, and normal operation of a program cannot be guaranteed. To prevent such a
problem, NMIs (nonmaskable interrupts) that cannot be controlled in software are masked out in hardware until the
SP is initialized.
2.4.2 SP Operation at Subroutine Call/Return
A subroutine call instruction, call or calla, uses four bytes of the stack. The call/calla instruction saves the
contents of the PC (return address) onto the stack before branching to a subroutine. The saved address is restored
into the PC by the ret instruction, and the program is returned to the address next to that of the call/calla in-
struction.
SP operation by the call/calla instruction
(1) SP = SP - 4
(2) PC
→ [SP]
SP
7
0
0xffffff
0x000000
SP = SP - 4
7
0
0xffffff
0x00
PC[23:16]
PC[15:8]
PC[7:0]
0x000000
Figure 2.4.2.1 SP and Stack (1)
相关PDF资料
PDF描述
ST72361AR9TA 8-BIT, FLASH, 8 MHz, MICROCONTROLLER, PQFP64
ST72361J9TA 8-BIT, FLASH, 8 MHz, MICROCONTROLLER, PQFP44
S-7750C02XX-HCT1 SPECIALTY MICROPROCESSOR CIRCUIT, PBGA16
S-7750C23XX-HCT1 SPECIALTY MICROPROCESSOR CIRCUIT, PBGA16
SPMC68336GMFT20 32-BIT, MROM, 20.97 MHz, MICROCONTROLLER, PQFP160
相关代理商/技术参数
参数描述
S1C88349 制造商:EPSON 制造商全称:EPSON 功能描述:8-bit Single Chip Microcomputer
S1C88649 制造商:EPSON 制造商全称:EPSON 功能描述:8-bit Single Chip Microcomputer
S1C88650 制造商:EPSON 制造商全称:EPSON 功能描述:8-bit Single Chip Microcomputer
S1C88655 制造商:EPSON 制造商全称:EPSON 功能描述:8-bit Single Chip Microcomputer
S1C88816 制造商:EPSON 制造商全称:EPSON 功能描述:8-bit Single Chip Microcomputer