最新免费av在线观看,亚洲综合一区成人在线,中文字幕精品无码一区二区三区,中文人妻av高清一区二区,中文字幕乱偷无码av先锋

PIC18F8490 Datasheet

  • PIC18F8490

  • 64/80-Pin Flash Microcontrollers with LCD Driver and nanoWat...

  • 414頁

  • Microchip   Microchip

掃碼查看芯片數(shù)據(jù)手冊

上傳產(chǎn)品規(guī)格書

PDF預(yù)覽

PIC18F6390/6490/8390/8490
16. 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: 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 8-1 in
the Device Data Sheet. Alternatively, 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.
2. C Language Programming: The exact work
around depends on the compiler in use. Please
refer to your C compiler documentation for
details.
If using the Microchip MPLAB
C18 C Compiler,
define both high and low priority interrupt
handler functions as 鈥渓ow priority鈥?by using the
pragma interruptlow
directive.
This
directive instructs the compiler to not use the
RETFIE FAST
instruction. If the proper high
priority interrupt bit is set in the IPRx register,
then the interrupt is treated as high priority in
spite of the
pragma interruptlow
directive.
The following code snippet demonstrates the
work around using the C18 compiler:
Date Codes that pertain to this issue:
All engineering and production devices.
#pragma interruptlow MyLowISR
void MyLowISR(void)
{
// Handle low priority interrupts.
}
// Although MyHighISR is a high priority interrupt, use interruptlow pragma so that
// the compiler will not use retfie FAST.
#pragma interruptlow MyHighISR
void MyHighISR(void)
{
// Handle high priority interrupts.
}
#pragma code highVector=0x08
void HighVector (void)
{
_asm goto MyHighISR _endasm
}
#pragma code /* return to default code section */
#pragma code lowVector=0x18
void LowVector (void)
{
_asm goto MyLowISR _endasm
}
#pragma code /* return to default code section */
DS80207B-page 6
2005 Microchip Technology Inc.

PIC18F8490相關(guān)型號PDF文件下載

您可能感興趣的PDF文件資料

熱門IC型號推薦

掃碼下載APP,
一鍵連接廣大的電子世界。

在線人工客服

買家服務(wù):
賣家服務(wù):
技術(shù)客服:

0571-85317607

網(wǎng)站技術(shù)支持

13606545031

客服在線時間周一至周五
9:00-17:30

關(guān)注官方微信號,
第一時間獲取資訊。

建議反饋
返回頂部

建議反饋

聯(lián)系人:

聯(lián)系方式:

按住滑塊,拖拽到最右邊
>>
感謝您向阿庫提出的寶貴意見,您的參與是維庫提升服務(wù)的動力!意見一經(jīng)采納,將有感恩紅包奉上哦!