M37632EFFP#U2 Renesas Electronics America, M37632EFFP#U2 Datasheet - Page 11

no-image

M37632EFFP#U2

Manufacturer Part Number
M37632EFFP#U2
Description
IC 740 MCU 80QFP
Manufacturer
Renesas Electronics America
Datasheet

Specifications of M37632EFFP#U2

Lead Free Status / RoHS Status
Lead free / RoHS Compliant
CENTRAL PROCESSING UNIT
2.3 Stack Pointer (S)
The Stack Pointer is an eight-bit register used for generating interrupts and calling subroutines.
When an interrupt is received, the following procedure is performed automatically in the
indicated sequence:
The Processor Status Register is not saved when calling subroutines (items (5) and (6) above
are not executed). The Processor Status Register is saved by executing the PHP instruction
in software.
To prevent data loss when generating interrupts and calling subroutines, it is necessary to
save other registers as well. This is done by executing the proper instruction in software while
in the interrupt service routine or subroutine.
The high-order eight bits of the address are determined by the Stack Page Selection Bit.
For example, the PHA instruction is executed to save the contents of the Accumulator.
Executing the PHA instruction saves the Accumulator contents to an address using the Stack
Pointer contents as the low-order eight bits of the address.
The RTI instruction is executed to return from an interrupt routine.
When the RTI instruction is executed, the following procedure is performed automatically in
sequence.
Steps (1) and (2) are not performed when returning from a subroutine using the RTS
instruction. The Processor Status Register should be restored before returning from a
subroutine by using the PLP instruction. The Accumulator should be restored before returning
from a subroutine or an interrupt servicing routine by using the PLA instruction.
The PLA and PLP instructions increment the Stack Pointer by 1 and return the contents of an
address stored in the Stack Pointer to the Accumulator or Processor Status Register, respec-
tively.
Rev.2.00 Nov 14, 2006
REJ09B0322-0200
(1) The contents of the high-order eight bits of the Program Counter (PC
(2) The Stack Pointer contents are decremented by 1.
(3) The contents of the low-order eight bits of the Program Counter (PC
(4) The Stack Pointer contents are decremented by 1.
(5) The contents of the Processor Status Register (PS) are saved to an address using the
(6) The Stack Pointer contents are decremented by 1.
(1) The Stack Pointer contents are incremented by 1.
(2) The contents of an address using the Stack Pointer contents as the low-order eight bits
(3) The Stack Pointer contents are incremented by 1.
(4) The contents of an address using the Stack Pointer as the low-order eight bits of the
(5) The Stack Pointer contents are incremented by 1.
(6) The contents of an address using the Stack Pointer as the low-order eight bits of the
Saving data in the stack area gradually fills the RAM area with saved data; therefore,
caution must exercised concerning the depth of interrupt levels and subroutine nesting.
an address using the Stack Pointer contents for the low-order eight bits of the address.
address using the Stack Pointer Contents for the low-order eight bits of the address.
Stack Pointer contents for the low-order eight bits of the address.
of the address is returned to the Processor Status Register (PS).
address is returned to the low-order eight bits of the Program Counter (PC
address is returned to the high-order eight bits of the Program Counter (PC
page 3 of 185
Stack Pointer (S)
L
) are saved to an
H
) are saved to
L
H
).
).

Related parts for M37632EFFP#U2