Re: 關於24FJ128GB106的問題
|
||||
---|---|---|---|---|
版主
|
參照:
1. PIC24 的組合語言相較 PIC16 而言是比較複雜的,看你寫的組語方式就知道還是停留在單一組語的基本架構下。須知PIC24 的組語是一定要使用 GLD 來做連結的,所採用的都是節區的觀念,而且你必須了解 PIC24 的記憶體架構。 2. 學 POIC24 的組語時要先將 MCU 的架構先了解,同時 ASM30 也是一蠻複雜的組語所以也要了解 ASM30 的使用方法,否則你來怎樣定節區都不曉得那怎樣使用 LINK30 來幫你配置記憶體的。 基於第一項& 第二項需求,建議看一下 dsPIC30F Architecture 的教育訓練教材。 http://www.microchip.com.tw/modules/w ... nglefile.php?cid=4&lid=39 3. 我會建議你用 C30 來寫你的程式不要用組語,除非你要自我挑戰...
發表於: 2010/1/26 13:04
|
|||
|
Re: 關於24FJ128GB106的問題
|
||||
---|---|---|---|---|
資深會員
|
C18的我會改 但是24的 要問RYANG大大了
發表於: 2010/1/26 11:12
|
|||
My name is jan,Jan是棒的
|
||||
|
Re: 關於24FJ128GB106的問題
|
||||
---|---|---|---|---|
新會員
|
如果我把.END改成
/* EOF */ 那就不會有Warning: end of file not at end of a line; newline inserted的出現 可是至於找不到路徑要怎麼改進呢? 謝謝
發表於: 2010/1/25 16:20
|
|||
|
關於24FJ128GB106的問題
|
||||
---|---|---|---|---|
新會員
|
我程式打完之後 PUTOUT出現這段字:
Clean: Deleting intermediary and output files. Clean: Deleted file "D:\PIC TXET\no1\new.o". Clean: Deleted file "D:\PIC TXET\no1\new.s.mcs". Clean: Done. Executing: "C:\Program Files\Microchip\MPLAB ASM30 Suite\bin\pic30-as.exe" "new.s" -o"new.o" -p=24FJ128GB106 --defsym=__DEBUG=1 -g new.s: Assembler messages: new.s:0: Warning: end of file not at end of a line; newline inserted Executing: "C:\Program Files\Microchip\MPLAB ASM30 Suite\bin\pic30-ld.exe" "new.o" -Tp24FJ128GB106.gld --defsym=__MPLAB_BUILD=1 --defsym=__MPLAB_DEBUG=1 -o"D:\PIC TXET\new.s.cof" -Map="D:\PIC TXET\new.s.map" --report-mem C:\Program Files\Microchip\MPLAB ASM30 Suite\bin\bin/pic30-coff-ld.exe: cannot open linker script file p24FJ128GB106.gld: No such file or directory Link step failed. 出現 BUILD FAILED 這是我的程式: .list p=p24fj128gb106 ;目錄控制 .include "p24fj128gb106.inc" ;存取設定之特殊暫存器 .org 0x00 ;將指令機器碼從0x00放起 mov 0xff, w0 ;將十六進制常數0x01載入暫存器W內 mov w0,TRISB ;將TRISB的第一隻接腳設定為輸入 (將W暫存器內容移至暫存器f中) mov #0x00,w0 ;將十六進制常數0x01載入暫存器Wb內 mov w0,TRISC ;將TRISC的所有接腳定為輸出 (將W暫存器內容移至暫存器f中) main: ;主要程式 btss PORTB,#0 ;檢查PORTB埠的第0支接腳是為側紅外線是否有接收到 (是否為1) call dark call bright dark: mov #0x00, w0 ;將0x00移到W0 mov w0,PORTC ;把W0移到f暫存器(PORTC=0x00) return bright: mov #0xff,w0 ;將0xff移到W0 mov w0,PORTC ;把W0移到f暫存器(PORTC=0xff) return .end 請問是路徑的問題還是,是我的程式指令有問題? 謝謝
發表於: 2010/1/25 15:32
|
|||
|