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


Browsing this Thread:   1 Anonymous Users






Re: 中斷high level 與 low level使用的問題
#5
高級會員
高級會員


查看用戶資訊
版大修改還是有問題:
有幾個要請教的事:
我修改了:
#pragma interrupt high_interrupt_service_routine nosave = section(".tmpdata")
#pragma interrupt low_interrupt_service_routine nosave = section(".tmpdata")
High跟low都修改了、還是會出問題。
這樣改對嗎?
還有一個就是我將在low的timer0改到主程式沒有發生當機。
將timer0原在low改到high測了一天還沒發生問題。

pragma interrupt high_interrupt_service_routine save=section("mydata") 儲存自訂變數節區 mydata 的變數
的使用方法是?
會有錯誤出現。

發表於: 2009/6/29 13:37
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 中斷high level 與 low level使用的問題
#4
版主
版主


查看用戶資訊
在中斷裡有計算的部份會使用到 Temp Data 所以有可能你在做加法的動作時動到了Temp Data 而影響到其它的程式。
看一下以前的討論是否可以解決:

http://www.microchip.com.tw/modules/n ... t_id=19706#forumpost19706

User 自行定義的變數 :
#pragma interrupt high_interrupt_service_routine save=myint 儲存自訂的 myint 變數
pragma interrupt high_interrupt_service_routine save=section("mydata") 儲存自訂變數節區 mydata 的變數

#pragma interrupt high_interrupt_service_routine nosave=section(".tmpdata") 儲存 temp data 區的資料

發表於: 2009/6/26 12:02
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 中斷high level 與 low level使用的問題
#3
高級會員
高級會員


查看用戶資訊
版主你好:
一、我使用的是C語言。
二、Low Priority Interrupt 與 High Priority Interrupt 沒有相同的變數。
三、low priority Interrupt內的timer0有使用的計count的功能是32bit的變數做加一的動作。
有那些是要注意的呢?

發表於: 2009/6/26 11:27
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 中斷high level 與 low level使用的問題
#2
版主
版主


查看用戶資訊
1. 你用 C or Assembly 寫?
2. Low Priority Interrupt 有沒有與 High Priority Interrupt 使用相同的變數?
3. 如果是用 C 寫,中斷裡有沒有使用到計算的功能 (Temp_Data)?

發表於: 2009/6/24 10:08
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


中斷high level 與 low level使用的問題
#1
高級會員
高級會員


查看用戶資訊
如題:
我使用的是18f8622
我在low設定了timer0、中斷間隔是10ms
4MHZ、四倍頻
TMR0H = 0xFF;
TMR0L = 0x62;
將timer0一直開著。
high level上接收uart1 的接收資料。
感覺在high level接收uart資料的時候、
接收到timer0的中斷、在low未執行完又收到high level的中斷之後的程式梁程時很容易造成reset 或當機(整個資料都亂掉)
請問一下high low level 的中斷在用的時候有什麼要注意的嗎?

發表於: 2009/6/23 15:34
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... ]

教育訓練中心

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