PIC16F688-I/P Microchip Technology Inc., PIC16F688-I/P Datasheet - Page 124

no-image

PIC16F688-I/P

Manufacturer Part Number
PIC16F688-I/P
Description
14 PIN, 7 KB FLASH, 256 RAM, 12 I/O
Manufacturer
Microchip Technology Inc.
Datasheet

Specifications of PIC16F688-I/P

A/d Inputs
8-Channel, 10-Bit
Comparators
2
Cpu Speed
5 MIPS
Eeprom Memory
256 Bytes
Input Output
12
Interface
USART
Memory Type
Flash
Number Of Bits
8
Package Type
14-pin PDIP
Programmable Memory
7K Bytes
Ram Size
256 Bytes
Speed
20 MHz
Timers
1-8-bit, 1-16-bit
Voltage, Range
2-5.5 V
Lead Free Status / Rohs Status
RoHS Compliant part Electrostatic Device

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16F688-I/P
Manufacturer:
MICROCHIP
Quantity:
26
Part Number:
PIC16F688-I/P
Manufacturer:
MOT
Quantity:
61
Part Number:
PIC16F688-I/P
0
Company:
Part Number:
PIC16F688-I/P
Quantity:
10 000
PIC16F688
11.4
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.
Since the lower 16 bytes of all banks are common in the
PIC16F688 (see Figure 2-2), temporary holding
registers, W_TEMP and STATUS_TEMP, should be
placed in here. These 16 locations do not require
banking and therefore, make it easier to context save
and restore. The same code shown in Example 11-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 11-1:
DS41203C-page 122
Note:
MOVWF
SWAPF
MOVWF
:
:(ISR)
:
SWAPF
MOVWF
SWAPF
SWAPF
Context Saving During Interrupts
The PIC16F688 normally does not require
saving
computed GOTO’s are used in the ISR and
the main code, the PCLATH must be
saved and restored in the ISR.
W_TEMP
STATUS,W
STATUS_TEMP
STATUS_TEMP,W
STATUS
W_TEMP,F
W_TEMP,W
the
SAVING STATUS AND W REGISTERS IN RAM
PCLATH.
;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
However,
if
© 2006 Microchip Technology Inc.

Related parts for PIC16F688-I/P