Note the following details of the code protection feature on Microchip devices:
•Microchip products meet the specification contained in their particular Microchip Data Sheet.
•Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the
intended manner and under normal conditions.
•There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our
knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data
Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
•Microchip is willing to work with the customer who is concerned about the integrity of their code.
•Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not
mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our
products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts
allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device
applications and the like is provided only for your convenience
and may be superseded by updates. It is your responsibility to
ensure that your application meets with your specifications.
MICROCHIP MAKES NO REPRESENTATIONS OR
WARRANTIES OF ANY KIND WHETHER EXPRESS OR
IMPLIED, WRITTEN OR ORAL, STATUTORY OR
OTHERWISE, RELATED TO THE INFORMATION,
INCLUDING BUT NOT LIMITED TO ITS CONDITION,
QUALITY, PERFORMANCE, MERCHANTABILITY OR
FITNESS FOR PURPOSE. Microchip disclaims all liability
arising from this information and its use. Use of Microchip
devices in life support and/or safety applications is entirely at
the buyer’s risk, and the buyer agrees to defend, indemnify and
hold harmless Microchip from any and all damages, claims,
suits, or expenses resulting from such use. No licenses are
conveyed, implicitly or otherwise, under any Microchip
intellectual property rights.
Trademarks
The Microchip name and logo, the Microchip logo, dsPIC,
K
logo, rfPIC and UNI/O are registered trademarks of
Microchip Technology Incorporated in the U.S.A. and other
countries.
FilterLab, Hampshire, HI-TECH C, Linear Active Thermistor,
MXDEV, MXLAB, SEEVAL and The Embedded Control
Solutions Company are registered trademarks of Microchip
Technology Incorporated in the U.S.A.
Analog-for-the-Digital Age, Application Maestro, CodeGuard,
dsPICDEM, dsPICDEM.net, dsPICworks, dsSPEAK, ECAN,
ECONOMONITOR, FanSense, HI-TIDE, In-Circuit Serial
Programming, ICSP, Mindi, MiWi, MPASM, MPLAB Certified
logo, MPLIB, MPLINK, mTouch, Octopus, Omniscient Code
Generation, PICC, PICC-18, PICDEM, PICDEM.net, PICkit,
PICtail, REAL ICE, rfLAB, Select Mode, Total Endurance,
TSHARC, UniWinDriver, WiperLock and ZENA are
trademarks of Microchip Technology Incorporated in the
U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated
in the U.S.A.
All other trademarks mentioned herein are property of their
respective companies.
Microchip received ISO/TS-16949:2002 certification for its worldwide
headquarters, design and wafer fabrication facilities in Chandler and
Tempe, Arizona; Gresham, Oregon and design centers in California
and India. The Company’s quality system processes and procedures
are for its PIC
devices, Serial EEPROMs, microperipherals, nonvolatile memory and
analog products. In addition, Microchip’s quality system for the design
and manufacture of development systems is ISO 9001:2000 certified.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
DS41418A-page 2Preliminary 2010 Microchip Technology Inc.
PIC16F707/PIC16LF707
40/44-Pin, Flash Microcontrollers with
nanoWatt XLP and mTouch™ Technology
Devices included in this data sheet:
•PIC16F707
• PIC16LF707
High-Performance RISC CPU:
• Only 35 Single-Word Instructions to Learn:
- All single-cycle instructions except branches
• Operating Speed:
- DC – 20 MHz clock input
- DC – 200 ns instruction cycle
• 8K x 14 Words of Flash Program Memory
• 363 Bytes of Data Memory (SRAM)
• Interrupt Capability
• 8-Level Deep Hardware Stack
• Direct, Indirect and Relative Addressing modes
• Processor Read Access to Program Memory
• Pinout Compatible to other 40-pin PIC16CXXX
and PIC16FXXX Microcontrollers
Special Microcontroller Features:
• Precision Internal Oscillator:
- 16 MHz or 500 kHz operation
- Factory calibrated to ±1%, typical
- Software selectable ÷1, ÷2, ÷4 or ÷8 divider
• 31 kHz Low-Power Internal Oscillator
• External Oscillator Block with:
- 3 crystal/resonator modes up to 20 MHz
- 3 external clock modes up to 20 MHz
• Power-on Reset (POR)
• Power-up Timer (PWRT)
• Oscillator Start-Up Timer (OST)
• Brown-out Reset (BOR):
- Selectable between two trip points
- Disabled in Sleep option
• Watchdog Timer (WDT)
• Programmable Code Protection
• In-Circuit Serial Programming™ (ICSP™) via two
pins
• In-Circuit Debug (ICD) via Two Pins
• Multiplexed Master Clear with Pull-up/Input Pin
• Industrial and Extended Temperature Range
• High-Endurance Flash Cell:
- 1,000 Write Flash Endurance (typical)
- Flash Retention: >40 years
- Power-Saving Sleep mode
• Operating Voltage Range:
- 1.8V to 3.6V (PIC16LF707)
• 1.8V to 5.5V (PIC16F707)
Extreme Low-Power Management
PIC16LF707 with nanoWatt XLP:
20.0 Program Memory Read........................................................................................................................................................... 179
22.0 In-Circuit Serial Programming™ (ICSP™) .............................................................................................................................. 185
23.0 Instruction Set Summary ......................................................................................................................................................... 187
24.0 Development Support.............................................................................................................................................................. 197
26.0 DC and AC Characteristics Graphs and Charts ...................................................................................................................... 231
Appendix A: Data Sheet Revision History ......................................................................................................................................... 273
Appendix B: Migrating From Other PIC® Devices ............................................................................................................................ 273
The Microchip Web Site.................................................................................................................................................................... 281
Customer Change Notification Service ............................................................................................................................................. 281
Customer Support ............................................................................................................................................................................. 281
DS41418A-page 8Preliminary 2010 Microchip Technology Inc.
PIC16F707/PIC16LF707
TO OUR VALUED CUSTOMERS
It is our intention to provide our valued customers with the best documentation possible to ensure successful use of your Microchip
products. To this end, we will continue to improve our publications to better suit your needs. Our publications will be refined and
enhanced as new volumes and updates are introduced.
If you have any questions or comments regarding this publication, please contact the Marketing Communications Department via
E-mail at docerrors@microchip.com or fax the Reader Response Form in the back of this data sheet to (480) 792-4150. We
welcome your feedback.
Most Current Data Sheet
To obtain the most up-to-date version of this data sheet, please register at our Worldwide Web site at:
http://www.microchip.com
You can determine the version of a data sheet by examining its literature number found on the bottom outside corner of any page.
The last character of the literature number is the version number, (e.g., DS30000A is version A of document DS30000).
Errata
An errata sheet, describing minor operational differences from the data sheet and recommended workarounds, may exist for current
devices. As device/documentation issues become known to us, we will publish an errata sheet. The errata will specify the revision
of silicon and revision of document to which it applies.
To determine if an errata sheet exists for a particular device, please check with one of the following:
• Microchip’s Worldwide Web site; http://www.microchip.com
• Your local Microchip sales office (see last page)
When contacting a sales office, please specify which device, revision of silicon and data sheet (include literature number) you are
using.
Customer Notification System
Register on our web site at www.microchip.com to receive the most current information on all of our products.
DS41418A-page 10Preliminary 2010 Microchip Technology Inc.
1.0DEVICE OVERVIEW
The PIC16F707/PIC16LF707 devices are covered by
this data sheet. They are available in 40/44-pin
packages. Figure 1-1 shows a block diagram of the
PIC16F707/PIC16LF707 devices. Table 1-1 shows the
pinout descriptions.
Legend: AN = Analog input or output CMOS = CMOS compatible input or outputOD = Open Drain
TTL = TTL compatible inputST= Schmitt Trigger input with CMOS levels I
HV = High VoltageXTAL = Crystallevels
Note:The PIC16F707 devices have an internal low dropout voltage regulator. An external capacitor must be
connected to one of the available V
Section 5.0 “Low Dropout (LDO) Voltage Regulator”. The PIC16LF707 devices do not have the voltage
regulator and therefore no external capacitor is required.
Output
Typ e
Typ e
CAP pins to stabilize the regulator. For more information, see
Description
2
C™ = Schmitt Trigger input with I2C
DS41418A-page 16Preliminary 2010 Microchip Technology Inc.
PIC16F707/PIC16LF707
PC<12:0>
13
0000h
0004h
Stack Level 1
Stack Level 8
Reset Vector
Interrupt Vector
CALL, RETURN
RETFIE, RETLW
Stack Level 2
0005h
On-chip
1FFFh
Program
Memory
Page 0
Page 1
07FFh
0800h
0FFFh
1000h
Page 2
Page 3
17FFh
1800h
2.0MEMORY ORGANIZATION
2.1Program Memory Organization
The PIC16F707/PIC16LF707 has a 13-bit program
counter capable of addressing an 8K x 14 program
memory space. The Reset vector is at 0000h and the
interrupt vector is at 0004h.
FIGURE 2-1:PROGRAM MEMORY MAP
AND STACK FOR THE
PIC16F707/PIC16LF707
2.2Data Memory Organization
The data memory is partitioned into multiple banks
which contain the General Purpose Registers (GPRs)
and the Special Function Registers (SFRs). Bits RP0
and RP1 are bank select bits.
RP1
Each bank extends up to 7Fh (128 bytes). The lower
locations of each bank are reserved for the Special
Function Registers. Above the Special Function
Registers are the General Purpose Registers,
implemented as static RAM. All implemented banks
contain Special Function Registers. Some frequently
used Special Function Registers from one bank are
mirrored in another bank for code reduction and
quicker access.
2.2.1GENERAL PURPOSE REGISTER
The register file is organized as 363 x 8 bits. Each
register is accessed either directly or indirectly through
the File Select Register (FSR), (Refer to Section 2.5“Indirect Addressing, INDF and FSR Registers”).
RP0
00Bank 0 is selected
01Bank 1 is selected
10Bank 2 is selected
11Bank 3 is selected
FILE
2.2.2SPECIAL FUNCTION REGISTERS
The Special Function Registers are registers used by
the CPU and peripheral functions for controlling the
desired operation of the device (refer to Table 2-2).
These registers are static RAM.
The Special Function Registers can be classified into
two sets: core and peripheral. The Special Function
Registers associated with the “core” are described in
this section. Those related to the operation of the
peripheral features are described in the section of that
peripheral feature.
PIC16F707/PIC16LF707
Legend:= Unimplemented data memory locations, read as ‘0’,
*= Not a physical register
File Address
Indirect addr.
(*)
00hIndirect addr.
(*)
80hIndirect addr.
(*)
100hIndirect addr.
(*)
180h
TMR001hOPTION81hTMR0101hOPTION181h
PCL02hPCL82hPCL102hPCL182h
STATUS03hSTATUS83hSTATUS103hSTATUS183h
FSR04hFSR84hFSR104hFSR184h
PORTA05hTRISA85hTACON105h
ANSELA
185h
PORTB06hTRISB86h
CPSBCON0
106h
ANSELB
186h
PORTC07hTRISC87h
CPSBCON1
107hANSELC187h
PORTD08hTRISD88h
CPSACON0
108h
ANSELD
188h
PORTE09hTRISE89h
CPSACON1
109h
ANSELE
189h
PCLATH0AhPCLATH8AhPCLATH10AhPCLATH18Ah
INTCON0BhINTCON8BhINTCON10BhINTCON18Bh
PIR10ChPIE18ChPMDATL10ChPMCON118Ch
PIR20DhPIE28DhPMADRL10Dh
Reserved18Dh
TMR1L0EhPCON8EhPMDATH10Eh
Reserved18Eh
TMR1H0FhT1GCON8FhPMADRH10Fh
Reserved18Fh
T1CON10hOSCCON90hTMRA110h
General
Purpose
Register
16 Bytes
190h
TMR211hOSCTUNE91hTBCON111h191h
T2CON12hPR292hTMRB112h192h
SSPBUF13hSSPADD/SSPMSK 93hDACCON0113h193h
SSPCON14hSSPSTAT94hDACCON1114h194h
CCPR1L15hWPUB95h
General
Purpose
Register
11 Bytes
115h195h
CCPR1H16hIOCB96h116h196h
CCP1CON17hT3CON97h117h197h
RCSTA18hTXSTA98h118h198h
TXREG19hSPBRG99h119h199h
RCREG1AhTMR3L9Ah11Ah19Ah
CCPR2L1BhTMR3H9Bh11Bh19Bh
CCPR2H1ChAPFCON9Ch11Ch19Ch
CCP2CON1DhFVRCON9Dh11Dh19Dh
ADRES
1EhT3GCON9Eh11Eh19Eh
ADCON01FhADCON19Fh11Fh19Fh
General
Purpose
Register
96 Bytes
20h
7Fh
General
Purpose
Register
80 Bytes
A0h
EFh
General
Purpose
Register
80 Bytes
120h
16Fh
General
Purpose
Register
80 Bytes
1A0h
1EFh
Accesses
70h – 7Fh
F0h
FFh
Accesses
70h – 7Fh
170h
17Fh
Accesses
70h – 7Fh
1F0h
1FFh
BANK 0BANK 1BANK 2BANK 3
TABLE 2-1:DATA MEMORY MAP FOR PIC16F707/PIC16LF707
DS41418A-page 18Preliminary 2010 Microchip Technology Inc.
PIC16F707/PIC16LF707
TABLE 2-2:SPECIAL FUNCTION REGISTER SUMMARY
AddressNameBit 7Bit 6Bit 5Bit 4Bit 3Bit 2 Bit 1Bit 0
Bank 0
(2)
00h
01hTMR0Timer0 Module Register0000 0000 0000 0000
02h
03h
04h
05hPORTAPORTA Data Latch when written: PORTA pins when readxxxx xxxx uuuu uuuu
06hPORTBPORTB Data Latch when written: PORTB pins when readxxxx xxxx uuuu uuuu
07hPORTCPORTC Data Latch when written: PORTC pins when readxxxx xxxx uuuu uuuu
08hPORTDPORTD Data Latch when written: PORTD pins when readxxxx xxxx uuuu uuuu
Legend:x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, read as ‘0’, r = reserved.
Note 1: The upper byte of the program counter is not directly accessible. PCLATH is a holding register for the PC<12:8>, whose contents are transferred to the
INDFAddressing this location uses contents of FSR to address data memory (not a physical register)xxxx xxxx xxxx xxxx
(2)
PCLProgram Counter (PC) Least Significant Byte0000 0000 0000 0000
(2)
STATUSIRPRP1RP0TOPDZDCC0001 1xxx 000q quuu
(2)
FSRIndirect Data Memory Address Pointerxxxx xxxx uuuu uuuu
(1),(2)
PCLATH———Write Buffer for the upper 5 bits of the Program Counter---0 0000 ---0 0000
9AhTMR3LHolding Register for the Least Significant Byte of the 16-bit TMR3 Registerxxxx xxxx uuuu uuuu
9BhTMR3HHolding Register for the Most Significant Byte of the 16-bit TMR3 Registerxxxx xxxx uuuu uuuu
9ChAPFCON
9DhFVRCONFVRRDYFVREN
9EhT3GCONTMR3GET3GPOLT3GTMT3GSPMT3GGO/
9FhADCON1
Legend:x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, read as ‘0’, r = reserved.
Note 1: The upper byte of the program counter is not directly accessible. PCLATH is a holding register for the PC<12:8>, whose contents are transferred to the
INDFAddressing this location uses contents of FSR to address data memory (not a physical register)xxxx xxxx xxxx xxxx
(2)
PCLProgram Counter (PC) Least Significant Byte0000 0000 0000 0000
(2)
STATUSIRPRP1RP0TOPDZDCC0001 1xxx 000q quuu
(2)
FSRIndirect Data Memory Address Pointerxxxx xxxx uuuu uuuu
(1),(2)
PCLATH———Write Buffer for the upper 5 bits of the Program Counter---0 0000 ---0 0000
Legend:x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, read as ‘0’, r = reserved.
Note 1: The upper byte of the program counter is not directly accessible. PCLATH is a holding register for the PC<12:8>, whose contents are transferred to the
INDFAddressing this location uses contents of FSR to address data memory (not a physical register)xxxx xxxx xxxx xxxx
(2)
PCLProgram Counter’s (PC) Least Significant Byte0000 0000 0000 0000
(2)
STATUSIRPRP1RP0TOPDZDCC0001 1xxx 000q quuu
(2)
FSRIndirect Data Memory Address Pointerxxxx xxxx uuuu uuuu
Legend:x = unknown, u = unchanged, q = value depends on condition, - = unimplemented, read as ‘0’, r = reserved.
Note 1: The upper byte of the program counter is not directly accessible. PCLATH is a holding register for the PC<12:8>, whose contents are transferred to the
INDFAddressing this location uses contents of FSR to address data memory (not a physical register)xxxx xxxx xxxx xxxx
(2)
PCLProgram Counter (PC) Least Significant Byte0000 0000 0000 0000
(2)
STATUSIRPRP1RP0TOPDZDCC0001 1xxx 000q quuu
(2)
FSRIndirect Data Memory Address Pointerxxxx xxxx uuuu uuuu
(1),(2)
PCLATH———Write Buffer for the upper 5 bits of the Program Counter---0 0000 ---0 0000
DS41418A-page 22Preliminary 2010 Microchip Technology Inc.
PIC16F707/PIC16LF707
2.2.2.1STATUS Register
The STATUS register, shown in Register 2-1, contains:
• the arithmetic status of the ALU
• the Reset status
• the bank select bits for data memory (SRAM)
The STATUS register can be the destination for any
instruction, like any other register. If the STATUS
register is the destination for an instruction that affects
the Z, DC or C bits, then the write to these three bits is
disabled. These bits are set or cleared according to the
device logic. Furthermore, the TO
writable. Therefore, the result of an instruction with the
STATUS register as destination may be different than
intended.
and PD bits are not
For example, CLRF STATUS will clear the upper three
bits and set the Z bit. This leaves the STATUS register
as ‘000u u1uu’ (where u = unchanged).
It is recommended, therefore, that only BCF, BSF,SWAPF and MOVWF instructions are used to alter the
STATUS register, because these instructions do not
affect any Status bits. For other instructions not
affecting any Status bits (Refer to Section 23.0
“Instruction Set Summary”).
Note 1: The C and DC bits operate as Borrow and
Digit Borrow
subtraction.
out bits, respectively, in
REGISTER 2-1:STATUS: STATUS REGISTER
R/W-0R/W-0R/W-0R-1R-1R/W-xR/W-xR/W-x
IRPRP1RP0TOPDZDC
bit 7bit 0
Legend:
R = Readable bitW = Writable bitU = Unimplemented bit, read as ‘0’
-n = Value at POR‘1’ = Bit is set‘0’ = Bit is clearedx = Bit is unknown
(1)
(1)
C
bit 7IRP: Register Bank Select bit (used for indirect addressing)
1 = Bank 2, 3 (100h-1FFh)
0 = Bank 0, 1 (00h-FFh)
bit 6-5RP<1:0>: Register Bank Select bits (used for direct addressing)
00 = Bank 0 (00h-7Fh)
01 = Bank 1 (80h-FFh)
10 = Bank 2 (100h-17Fh)
11 = Bank 3 (180h-1FFh)
bit 4TO
bit 3PD
bit 2Z: Zero bit
bit 1DC: Digit Carry/Digit Borrow
bit 0C: Carry/Borrow
: Time-out bit
1 = After power-up, CLRWDT instruction or SLEEP instruction
0 = A WDT time-out occurred
: Power-down bit
1 = After power-up or by the CLRWDT instruction
0 = By execution of the SLEEP instruction
1 = The result of an arithmetic or logic operation is zero
0 = The result of an arithmetic or logic operation is not zero
bit (ADDWF, ADDLW,SUBLW,SUBWF instructions)
1 = A carry-out from the 4th low-order bit of the result occurred
0 = No carry-out from the 4th low-order bit of the result
(1)
bit
(ADDWF, ADDLW, SUBLW, SUBWF instructions)
1 = A carry-out from the Most Significant bit of the result occurred
0 = No carry-out from the Most Significant bit of the result occurred
(1)
(1)
Note 1:For Borrow
second operand. For rotate (RRF, RLF) instructions, this bit is loaded with either the high-order or low-order
bit of the source register.
The Program Counter (PC) is 13 bits wide. The low
byte comes from the PCL register, which is a readable
and writable register. The high byte (PC<12:8>) is not
directly readable or writable and comes from
PCLATH. On any Reset, the PC is cleared. Figure 2-2
shows the two situations for the loading of the PC. The
upper example in Figure 2-2 shows how the PC is
loaded on a write to PCL (PCLATH<4:0> PCH).
The lower example in Figure 2-2 shows how the PC is
loaded during a CALL or GOTO instruction
(PCLATH<4:3> PCH).
FIGURE 2-2:LOADING OF PC IN
DIFFERENT SITUATIONS
2.3.1COMPUTED GOTO
A computed GOTO is accomplished by adding an offset
to the program counter (ADDWF PCL). When
performing a table read using a computed GOTO
method, care should be exercised if the table location
crosses a PCL memory boundary (each 256-byte
block). Refer to Application Note AN556,
“Implementing a Table Read” (DS00556).
Note 1: There are no Status bits to indicate stack
overflow or stack underflow conditions.
2: There are no instructions/mnemonics
called PUSH or POP. These are actions
that occur from the execution of the CALL,RETURN, RETLW and RETFIE instructions or the vectoring to an interrupt
address.
2.4Program Memory Paging
All devices are capable of addressing a continuous 8K
word block of program memory. The CALL and GOTO
instructions provide only 11 bits of address to allow
branching within any 2K program memory page. When
doing a CALL or GOTO instruction, the upper 2 bits of
the address are provided by PCLATH<4:3>. When
doing a CALL or GOTO instruction, the user must ensure
that the page select bits are 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 POPed off the stack. Therefore,
manipulation of the PCLATH<4:3> bits is not required
for the RETURN instructions (which POPs the address
from the stack).
Note:The contents of the PCLATH register are
unchanged after a RETURN or RETFIE
instruction is executed. The user must
rewrite the contents of the PCLATH register for any subsequent subroutine calls or
GOTO instructions.
Example 2-1 shows the calling of a subroutine in
page 1 of the program memory. This example assumes
that PCLATH is saved and restored by the Interrupt
Service Routine
EXAMPLE 2-1:CALL OF A SUBROUTINE
(if interrupts are used).
IN PAGE 1 FROM PAGE 0
2.3.2STACK
All devices have an 8-level x 13-bit wide hardware
stack (refer to Figure 2-1). 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 affected by a PUSH or POP
operation.
The stack operates as a circular buffer. This means that
after the stack has been PUSHed eight times, the ninth
PUSH overwrites the value that was stored from the
first PUSH. The tenth PUSH overwrites the second
PUSH (and so on).
DS41418A-page 26Preliminary 2010 Microchip Technology Inc.
INCFFSR;inc pointer
BTFSSFSR,4 ;all done?
GOTONEXT;no clear next
CONTINUE;yes continue
Note:For memory map detail, refer to Table 2-2.
Data
Memory
Indirect AddressingDirect Addressing
Bank SelectLocation Select
RP1RP06
0
From Opcode
IRPFile Select Register
7
0
Bank Select
Location Select
00011011
180h
1FFh
00h
7Fh
Bank 0Bank 1Bank 2Bank 3
2.5Indirect Addressing, INDF and
FSR Registers
The INDF register is not a physical register. Addressing
the INDF register will cause indirect addressing.
Indirect addressing is possible by using the INDF
register. Any instruction using the INDF register
actually accesses data pointed to by the File Select
Register (FSR). Reading INDF itself indirectly will
produce 00h. Writing to the INDF register indirectly
results in a no operation (although Status bits may be
affected). An effective 9-bit address is obtained by
concatenating the 8-bit FSR register and the IRP bit of
the STATUS register, as shown in Figure 2-3.
A simple program to clear RAM location 020h-02Fh
using indirect addressing is shown in Example 2-2.
DS41418A-page 28Preliminary 2010 Microchip Technology Inc.
PIC16F707/PIC16LF707
MCLR/VPP
VDD
OSC1/
WDT
Module
POR
OST/PWRT
WDTOSC
WDT
Time-out
Power-on Reset
OST
10-bit Ripple Counter
PWRT
Chip_Reset
11-bit Ripple Counter
Reset
Enable OST
Enable PWRT
Sleep
Brown-out
(1)
Reset
BOREN
CLKIN
Note 1: Refer to the Configuration Word Register 1 (Register 8-1).
MCLRE
3.0RESETS
Most registers are not affected by a WDT wake-up
since this is viewed as the resumption of normal
The PIC16F707/PIC16LF707 differentiates between
various kinds of Reset:
a)Power-on Reset (POR)
b)WDT Reset during normal operation
c)WDT Reset during Sleep
d)MCLR
e)MCLR
Reset during normal operation
Reset during Sleep
f)Brown-out Reset (BOR)
operation. TO
and PD bits are set or cleared differently
in different Reset situations, as indicated in Table 3-3.
These bits are used in software to determine the nature
of the Reset.
A simplified block diagram of the On-Chip Reset Circuit
is shown in Figure 3-1.
The MCLR
Reset path has a noise filter to detect and
ignore small pulses. See Section 25.0 “ElectricalSpecifications” for pulse width specifications.
Some registers are not affected in any Reset condition;
their status is unknown on POR and unchanged in any
other Reset. Most other registers are reset to a “Reset
state” on:
• Power-on Reset (POR)
•MCLR
•MCLR
Reset
Reset during Sleep
•WDT Reset
• Brown-out Reset (BOR)
FIGURE 3-1:SIMPLIFIED BLOCK DIAGRAM OF ON-CHIP RESET CIRCUIT
Reset during Sleep or interrupt wake-up from Sleep
(1)
(2)
STATUS
Register
uuu1 0uuu---- --uu
PCON
Register
TABLE 3-2:RESET CONDITION FOR SPECIAL REGISTERS
Condition
Power-on Reset0000h0001 1xxx---- --0x
MCLR Reset during normal operation0000h000u uuuu---- --uu
Reset during Sleep0000h0001 0uuu---- --uu
MCLR
WDT Reset0000h0000 1uuu---- --uu
WDT Wake-upPC + 1uuu0 0uuu---- --uu
Brown-out Reset0000h0001 1uuu---- --u0
Interrupt Wake-up from SleepPC + 1
Legend: u = unchanged, x = unknown, - = unimplemented bit, reads as ‘0’.
Note 1: When the wake-up is due to an interrupt and global enable bit (GIE) is set, the return address is pushed on
the stack and PC is loaded with the interrupt vector (0004h) after execution of PC + 1.
2: If a Status bit is not implemented, that bit will be read as ‘0’.
Program
Counter
DS41418A-page 30Preliminary 2010 Microchip Technology Inc.
Loading...
+ 254 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.