データシートサーチシステム
  Japanese  ▼
ALLDATASHEET.JP

X  

PIC16F15213 データシート(PDF) 49 Page - Microchip Technology

部品番号 PIC16F15213
部品情報  PIC16F15213/14/23/24/43/44 Low Pin Count Microcontrollers
PDF  439 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
メーカー  MICROCHIP [Microchip Technology]
ホームページ  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F15213 データシート(HTML) 49 Page - Microchip Technology

Back Button PIC16F15213 Datasheet HTML 45Page - Microchip Technology PIC16F15213 Datasheet HTML 46Page - Microchip Technology PIC16F15213 Datasheet HTML 47Page - Microchip Technology PIC16F15213 Datasheet HTML 48Page - Microchip Technology PIC16F15213 Datasheet HTML 49Page - Microchip Technology PIC16F15213 Datasheet HTML 50Page - Microchip Technology PIC16F15213 Datasheet HTML 51Page - Microchip Technology PIC16F15213 Datasheet HTML 52Page - Microchip Technology PIC16F15213 Datasheet HTML 53Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 49 / 439 page
background image
9.4.4
Branching
The branching instructions add an offset to the PC. This allows relocatable code and code that crosses page
boundaries. There are two forms of branching, BRW and BRA. The PC will have incremented to fetch the next
instruction in both cases. When using either branching instruction, a PCL memory boundary may be crossed.
If using BRW, load the W register with the desired unsigned address and execute BRW. The entire PC will be loaded
with the address PC + 1 + W.
If using BRA, the entire PC will be loaded with PC + 1 + the signed value of the operand of the BRA instruction.
9.5
Stack
All devices have a 16-level by 15-bit wide hardware stack. The stack space is not part of either program or data
space. The PC is PUSHed onto the stack when the CALL or CALLW instructions are executed or an interrupt causes
a branch. The stack is POPed in the event of a RETURN, RETLW or a RETFIE instruction execution. PCLATH is not
affected by a PUSH or POP operation.
The stack operates as a circular buffer if the STVREN Configuration bit is programmed to ‘0’. This means that after
the stack has been PUSHed sixteen times, the seventeenth PUSH overwrites the value that was stored from the first
PUSH. The eighteenth PUSH overwrites the second PUSH, and so on. The STKOVF and STKUNF flag bits will be
set on an Overflow/Underflow, regardless of whether the Reset is enabled.
If the STVREN bit is programmed to ‘1’, the device will be reset if the stack is PUSHed beyond the sixteenth level or
POPed beyond the fist level, setting the appropriate bits (STKOVF or STKUNF, respectively).
Important:  There are no instructions/mnemonics called PUSH or POP. These are actions that occur
from the execution of the CALL, CALLW, RETURN, RETLW and RETFIE instructions or the vectoring to an
interrupt address.
9.5.1
Accessing the Stack
The stack is accessible through the TOSH, TOSL and STKPTR registers. STKPTR is the current value of the Stack
Pointer. The TOSH:TOSL register pair points to the TOP of the stack. Both registers are read/writable. TOS is split
into TOSH and TOSL due to the 15-bit size of the PC. To access the stack, adjust the value of STKPTR, which will
position TOSH:TOSL, then read/write to TOSH:TOSL. STKPTR also allows the detection of Overflow and Underflow
condition.
Important:  Care must be taken when modifying STKPTR while interrupts are enabled.
During normal program operation, CALL, CALLW and interrupts will increment STKPTR, while RETLW, RETURN and
RETFIE will decrement STKPTR. STKPTR can be monitored to obtain the value of stack memory left at any given
time. STKPTR always points at the currently used place on the stack. Therefore, a CALL or CALLW will increment
STKPTR and then write the PC, and a return will unload the PC value from the stack and then decrement STKPTR.
Reference the following figures for examples of accessing the stack.
PIC16F15213/14/23/24/43/44
Memory Organization
© 2020-2022 Microchip Technology Inc.
and its subsidiaries
Data Sheet
DS40002195E-page 49



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


データシート ダウンロード

Go To PDF Page


リンク URL



ALLDATASHEETはお客様のビジネスに役立ちますか?  [ DONATE ] 

Alldatasheetは   |   広告   |   お問い合わせ   |   プライバシーポリシー   |   データシートへのリンク    |   リンク交換   |   メーカーリスト
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