Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

DM163006 Datasheet(PDF) 45 Page - Microchip Technology

Part # DM163006
Description  High-Performance ROM-less Microcontrollers
PDF  320 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

DM163006 Datasheet(HTML) 45 Page - Microchip Technology

Back Button DM163006 Datasheet HTML 41Page - Microchip Technology DM163006 Datasheet HTML 42Page - Microchip Technology DM163006 Datasheet HTML 43Page - Microchip Technology DM163006 Datasheet HTML 44Page - Microchip Technology DM163006 Datasheet HTML 45Page - Microchip Technology DM163006 Datasheet HTML 46Page - Microchip Technology DM163006 Datasheet HTML 47Page - Microchip Technology DM163006 Datasheet HTML 48Page - Microchip Technology DM163006 Datasheet HTML 49Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 45 / 320 page
background image
 2001 Microchip Technology Inc.
Advance Information
DS39541A-page 45
PIC18C601/801
4.2.3
PUSH AND POP INSTRUCTIONS
Since the Top-of-Stack (TOS) is readable and writable,
the ability to push values onto the stack and pop 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.
The POP instruction discards the current TOS by decre-
menting the stack pointer. The previous value pushed
onto the stack then becomes the TOS value.
4.2.4
STACK FULL/UNDERFLOW RESETS
These RESETS are enabled/disabled by programming
the STVREN configuration bit in CONFIG4L register.
When the STVREN bit is disabled, a full or underflow
condition will set the appropriate STKFUL or STKUNF
bit, but not cause a RESET. When the STVREN bit is
enabled, a full or underflow will set the appropriate
STKFUL or STKUNF bit and then cause a RESET. The
STKFUL or STKUNF bits are only cleared by the user
software or a POR.
4.3
Fast Register Stack
A “fast return” option is available for interrupts and calls.
A fast register stack is provided for the STATUS, WREG
and BSR registers, and is only one layer in depth. The
stack is not readable or writable and is loaded with the
current value of the corresponding register when the
processor vectors for an interrupt. The values in the fast
register stack are then loaded back into the working reg-
isters, if the fast return instruction is used to return
from the interrupt.
A low or high priority interrupt source will push values
into the stack registers. If both low and high priority
interrupts are enabled, the stack registers cannot be
used reliably for low priority interrupts. If a high priority
interrupt occurs while servicing a low priority interrupt,
the stack register values stored by the low priority
interrupt will be overwritten.
If high priority interrupts are not disabled during low pri-
ority interrupts, users must save the key registers in
software during a low priority interrupt.
If no interrupts are used, the fast register stack can be
used to restore the STATUS, WREG and BSR registers
at the end of a subroutine call. To use the fast register
stack for a subroutine call, a fast call instruction
must be executed.
Example 4-1 shows a source code example that uses
the fast register stack.
EXAMPLE 4-1:
FAST REGISTER STACK
CODE EXAMPLE
CALL SUB1, FAST
;STATUS, WREG, BSR
;SAVED IN FAST REGISTER
;STACK
•
•
SUB1
•
•
•
RETURN FAST
;RESTORE VALUES SAVED
;IN FAST REGISTER STACK



Html Pages

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  ...More


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com