Electronic Components Datasheet Search
  New Zealand  ▼
ALLDATASHEET.CO.NZ

X  

PIC16F716 Datasheet(PDF) 19 Page - Microchip Technology

Part # PIC16F716
Description  8-bit Flash-based Microcontroller with A/D Converter and Enhanced Capture/Compare/PWM
PDF  126 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

PIC16F716 Datasheet(HTML) 19 Page - Microchip Technology

Back Button PIC16F716 Datasheet HTML 15Page - Microchip Technology PIC16F716 Datasheet HTML 16Page - Microchip Technology PIC16F716 Datasheet HTML 17Page - Microchip Technology PIC16F716 Datasheet HTML 18Page - Microchip Technology PIC16F716 Datasheet HTML 19Page - Microchip Technology PIC16F716 Datasheet HTML 20Page - Microchip Technology PIC16F716 Datasheet HTML 21Page - Microchip Technology PIC16F716 Datasheet HTML 22Page - Microchip Technology PIC16F716 Datasheet HTML 23Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 19 / 126 page
background image
 2003 Microchip Technology Inc.
Preliminary
DS41206A-page 17
PIC16F716
2.3
PCL and PCLATH
The Program Counter (PC) specifies the address of the
instruction to fetch for execution. The PC is 13 bits
wide. The low byte is called the PCL register. This
register is readable and writable. The high byte is
called the PCH register. This register contains the
PC<12:8> bits and is not directly readable or writable.
All updates to the PCH register go through the PCLATH
register.
2.3.1
MODIFYING PCL
Executing any instruction with the PCL register as the
destination
simultaneously
causes
the
Program
Counter PC<12:8> bits (PCH) to be replaced by the
contents of PCLATH register. This allows the entire
contents of the program counter to be changed by first
writing the desired upper 5 bits to the PCLATH register.
When the lower 8 bits are then written to the PCL
register, all 13 bits of the program counter will change
to the values contained in the PCLATH register and
those being written to the PCL register.
Care should be exercised when modifying the PCL
register to jump into a look-up table or program branch
table (computed GOTO). With PCLATH set to the table
start address, if the table is greater than 255
instructions or if the lower 8 bits of the memory address
rolls over from 0xFF to 0x00 in the middle of the table,
then PCLATH must be incremented for each address
rollover that occurs between the table beginning and
the target address.
2.3.2
PROGRAM MEMORY PAGING
The CALL and GOTO instructions provide 11 bits of
address to allow branching within any 2K program
memory page. When doing a CALL or GOTO instruction,
the
upper
bit
of
the
address
is
provided
by
PCLATH<3>. When doing a CALL or GOTO instruction,
the user must ensure that the page select bit is
programmed so that the desired program memory
page is addressed. If a RETURN from a CALL instruction
(or interrupt) is executed, the entire 13-bit PC is pushed
onto the stack.
Therefore,
manipulation of
the
PCLATH<3> bit is not required for the RETURN
instructions (which POPs the address from the stack).
FIGURE 2-3:
LOADING OF PC IN
DIFFERENT SITUATIONS
2.4
Stack
The stack allows a combination of up to 8 program calls
and interrupts to occur. The stack contains the return
address from this branch in program execution.
Mid-range devices have an 8-level deep x 13-bit wide
hardware stack. The stack space is not part of either
program or data space, and the stack pointer is not
readable or writable. The PC is PUSHed onto the stack
when a CALL instruction is 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 modified when the stack is PUSHed or
POPed.
After the stack has been PUSHed 8 times, the ninth
push overwrites the value that was stored from the first
push. The tenth push overwrites the second push (and
so on).
Instruction with
PCL as
Destination
8
ALU
12
0
11
Opcode <10:0>
GOTO
, CALL
PCLATH<4:3>
PCLATH
PCLATH
87
PCLATH<4:0>
12
1110
8 7
0
PCH
PCL
PCH
PCL
5
2



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