• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
  • slider image 488
  • slider image 491
:::


Browsing this Thread:   1 Anonymous Users






Re: 中斷含式_ISR與_ISRFAST有何差別
#4
版主
版主


查看用戶資訊
需要最快速的中斷反應時間的就用此 Shadow 的功能,記住只能用一次 (層) 用兩次會出現錯亂, 其餘的中斷就使用ㄧ般的模式就可以了, C30 會自動儲存 constant 到堆疊裡。

發表於: 2006/8/11 16:52
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 中斷含式_ISR與_ISRFAST有何差別
#3
中級會員
中級會員


查看用戶資訊
那也就是說PWM的中斷建議用嚕~~~因為他的中斷優先權要最快是嗎???

因為我還是有點看不懂

我現在有的中斷有IC7,Timer3,Timer2,UART1,ADC,PWM

可以告訴我哪些要用_ISR
哪些要用_ISRFAST

發表於: 2006/8/11 14:17
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 中斷含式_ISR與_ISRFAST有何差別
#2
管理員
管理員


查看用戶資訊
參考以下由 dsPIC30F family reference manual 2.2.2.1 所節錄下的說明 . 使用 _ISRFAST 屬性宣告的中斷服務程式 , 會將 W0 .. W3 和 SR 暫存器利用 PUSH.S & POP.S 做單一指令周期的快速儲存與還原 ( context switch ). 而 _ISR 宣告的中斷服務程式只會用傳統的 push & pop.

但請記得 shadow register 只有一層喔 !

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

The PUSH.and POP.S instructions are useful for fast context save/restore during a function call
or Interrupt Service Routine (ISR). The PUSH.S instruction will transfer the following register
values into their respective shadow registers
:
&
#8226; W0...W3
• SR (N, OV, Z , C, DC bits only)
The POP.S instruction will restore the values from the shadow registers into these register
locations
A code example using the PUSH.and POP.S instructions is shown below:
MyFunction:
PUSH.Save W registersMCU status
MOV 
#0x03,W0 ; load a literal value into W0
ADD RAM100 add W0 to contents of RAM100
BTSC SR
,#Z ; is the result 0?
BSET Flags,#IsZero ; Yes, set a flag
POP.Restore W regsMCU status
RETURN

發表於: 2006/8/11 1:22
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


中斷含式_ISR與_ISRFAST有何差別
#1
中級會員
中級會員


查看用戶資訊
void _ISR _INT0Interrupt(void)
{
.
.
.
}

void _ISRFAST _INT0Interrupt(void)
{
.
.
.
}
有啥差別阿

發表於: 2006/8/8 13:54
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------