Electronic Components Datasheet Search
  English  ▼

X  

18F2420 Datasheet(PDF) 7 Page - Microchip Technology

Part # 18F2420
Description  28/40/44-Pin Enhanced Flash Microcontrollers with 10-Bit A/D and nanoWatt Technology
PDF  16 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  MICROCHIP [Microchip Technology]
Direct Link  http://www.microchip.com
Logo MICROCHIP - Microchip Technology

18F2420 Datasheet(HTML) 7 Page - Microchip Technology

Back Button 18F2420 Datasheet HTML 3Page - Microchip Technology 18F2420 Datasheet HTML 4Page - Microchip Technology 18F2420 Datasheet HTML 5Page - Microchip Technology 18F2420 Datasheet HTML 6Page - Microchip Technology 18F2420 Datasheet HTML 7Page - Microchip Technology 18F2420 Datasheet HTML 8Page - Microchip Technology 18F2420 Datasheet HTML 9Page - Microchip Technology 18F2420 Datasheet HTML 10Page - Microchip Technology 18F2420 Datasheet HTML 11Page - Microchip Technology Next Button
Zoom Inzoom in Zoom Outzoom out
 7 / 16 page
background image
© 2005 Microchip Technology Inc.
DS80209D-page 7
PIC18F2420/2520/4420/4520
23. Module: Interrupts
If an interrupt occurs during a two-cycle instruction
that modifies the STATUS, BSR or WREG register,
the unmodified value of the register will be saved
to the corresponding Fast Return (Shadow)
register and upon a fast return from the interrupt,
the unmodified value will be restored to the
STATUS, BSR or WREG register.
For example, if a high priority interrupt occurs
during the instruction, MOVFF TEMP, WREG, the
MOVFF
instruction will be completed and WREG
will be loaded with the value of TEMP before
branching to ISR. However, the previous value of
WREG will be saved to the Fast Return register
during ISR branching. Upon return from the
interrupt with a fast return, the previous value of
WREG in the Fast Return register will be written to
WREG. This results in WREG containing the value
it had before execution of MOVFF TEMP, WREG.
Affected instructions are:
MOVFF
Fs, Fd
where Fd is WREG, BSR or STATUS;
MOVSF
Zs, Fd
where Fd is WREG, BSR or STATUS; and
MOVSS
[Zs], [Zd]
where the destination is WREG, BSR or STATUS.
Work around
1. Assembly Language Programming:
a) If any two-cycle instruction is used to modify
the WREG, BSR or STATUS register, do not
use the RETFIE FAST instruction to return
from the interrupt. Instead, save/restore
WREG, BSR and STATUS via software per
Example 9-1 in the Device Data Sheet. Alter-
natively, in the case of MOVFF, use the MOVF
instruction to write to WREG instead. For
example, use:
MOVF
TEMP, W
MOVWF
BSR
instead of: MOVFF TEMP, BSR.
b) As another alternative, the following work
around shown in Example 2 can be used.
This example overwrites the Fast Return
register by making a dummy call to Foo with
the fast option in the high priority service
routine.
EXAMPLE 2:
ISR @ 0x0008
CALL
Foo, FAST
; store current value of WREG, BSR, STATUS for a second time
Foo:
POP
; clears return address of Foo call
:
; insert high priority ISR code here
:
RETFIE
FAST



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


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