PIC16F616-H/ST Microchip Technology, PIC16F616-H/ST Datasheet - Page 121

no-image

PIC16F616-H/ST

Manufacturer Part Number
PIC16F616-H/ST
Description
1.75KB Flash, 64B RAM, 6 I/O, 8MHz Internal Oscillator 14 TSSOP 4.4mm TUBE
Manufacturer
Microchip Technology
Series
PIC® 16Fr

Specifications of PIC16F616-H/ST

Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
11
Program Memory Size
3.5KB (2K x 14)
Program Memory Type
FLASH
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 8x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 150°C
Package / Case
14-TSSOP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Connectivity
-
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
12.5
During an interrupt, only the return PC value is saved
on the stack. Typically, users may wish to save key
registers during an interrupt (e.g., W and STATUS
registers). This must be implemented in software.
Temporary
STATUS_TEMP should be placed in the last 16 bytes
of GPR (see Figure 2-4). These 16 locations are
common to all banks and do not require banking. This
makes context save and restore operations simpler.
The code shown in Example 12-1 can be used to:
• Store the W register
• Store the STATUS register
• Execute the ISR code
• Restore the Status (and Bank Select Bit register)
• Restore the W register
EXAMPLE 12-1:
© 2009 Microchip Technology Inc.
Note:
MOVWF
SWAPF
MOVWF
:
:(ISR)
:
SWAPF
MOVWF
SWAPF
SWAPF
Context Saving During Interrupts
The PIC16F610/616/16HV610/616 does
not require saving the PCLATH. However,
if computed GOTO’s are used in both the
ISR and the main code, the PCLATH must
be saved and restored in the ISR.
holding
W_TEMP
STATUS,W
STATUS_TEMP
STATUS_TEMP,W
STATUS
W_TEMP,F
W_TEMP,W
SAVING STATUS AND W REGISTERS IN RAM
registers
W_TEMP
;Copy W to TEMP register
;Swap status to be saved into W
;Swaps are used because they do not affect the status bits
;Save status to bank zero STATUS_TEMP register
;Insert user code here
;Swap STATUS_TEMP register into W
;(sets bank to original state)
;Move W into STATUS register
;Swap W_TEMP
;Swap W_TEMP into W
PIC16F610/616/16HV610/616
and
DS41288F-page 121

Related parts for PIC16F616-H/ST