Re: PIC16 組合語言: 中斷程式與主程式不同Page
|
||||
---|---|---|---|---|
新會員
|
謝謝shpeng:
如你所說, ORG 0x0004 _PushAll <--- 一定要放在0x0004,不可直接 lgoto. 我 直接先 lgoto 才 _PushAll 了, :) 謝謝你的解答!!
發表於: 2009/8/27 21:15
|
|||
|
Re: PIC16 組合語言: 中斷程式與主程式不同Page
|
||||
---|---|---|---|---|
資深會員
|
_PushAll macro
主程式有 RUN PAGE1,2,3,中斷程式要存 PCLATH. 祝順心
發表於: 2009/8/27 17:09
|
|||
|
Re: PIC16 組合語言: 中斷程式與主程式不同Page
|
||||
---|---|---|---|---|
資深會員
|
參考一下這裏
http://www.microchip.com.tw/modules/w ... lefile.php?cid=18&lid=304 原始提供者:劉文昱jack@jaeger.com.tw 標題:靈活使用PIC16C57的PROGRAM MEMORY 當您使用Microchip公司的PIC16C57在設計程式時,是否被它的PROGRAM MEMORY需分PAGE使用,而PAGE之設定又影響到goto、call、addwf 2、movwf 2四個指令之執行結果而困擾不已呢?以下是小弟領悟出來的一點心得,在此野人獻曝,與大家分享。 .....
發表於: 2009/8/27 17:01
|
|||
|
PIC16 組合語言: 中斷程式與主程式不同Page
|
||||
---|---|---|---|---|
新會員
|
如果主程式在Page 1 (ORG H'800'), 中斷程式在Page 0,
在中斷情況發生時中斷程式執行完畢(RETFIE)後應該仍會處於Page0而導致錯誤(應該是要返回主程式段本來位址才對). 請問該如何做才能避免此問題?
發表於: 2009/8/27 15:19
|
|||
|