• 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: 急救一下 compile沒辦法成功\
#5
資深會員
資深會員


查看用戶資訊
bsf PORTC,3
reture ;;;return 這裡打錯字

;;;;;;;;;;AD_Convert Subroutine;;;;;;;;;;


其它只要不是LABEL 都按一個TAB或按幾個空白,就OK了

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


Re: 急救一下 compile沒辦法成功\
#4
資深會員
資深會員


查看用戶資訊
Project -> Quickbuild
針對單一asm 的,不過用不用這沒差


主要問題: 未到 Config -> Select Device 選對型號

次要問題: 組譯指令(虛指令) list, include 不要放在第一個字

程式本身的問題:
這樣之後雖然沒有 error , 不過你有個指令打錯字,會被誤當成 label, 這留給你自己囉


發表於: 2008/1/21 18:46
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 急救一下 compile沒辦法成功\
#3
初級會員
初級會員


查看用戶資訊
請問一下你是怎麼用的
Quickbuild是什麼

發表於: 2008/1/21 16:47
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 急救一下 compile沒辦法成功\
#2
資深會員
資深會員


查看用戶資訊
用 Quickbuild 測試,assemble OK

你是如何作的? 錯誤訊息是什麼?

發表於: 2008/1/21 14:13
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


急救一下 compile沒辦法成功\
#1
初級會員
初級會員


查看用戶資訊
各位下面是我寫的程式,可是compile沒辦法成功,請各位可以幫我解決一下嗎
list p=16f877,R=DEC
include "p16f877.inc"

;;;;;;;;;;User Variables;;;;;;;;;;

AD_Status EQU 0X20

;;;;;;;;;;PIC Restet Vector;;;;;;;;;;

org 0x00
nop
goto MainLine

;;;;;;;;;;Main Program;;;;;;;;;;
MainLine
call Initial
MainLoop
call AD_Convert
call PWM_Out
goto MainLoop

;;;;;;;;;;Initial Subroutine;;;;;;;;;;
Initial
banksel TRISC
movlw B'00000000'
movwf TRISC
banksel PORTC
movlw B'00000000'
movwf PORTC
movlw 0xff
movwf PR2
banksel TMR2
clrf TMR2
movlw 0x80
movwf CCPR1L
movlw 0x0C
movwf CCP1CON
movlw 0x00
movwf T2CON
bsf T2CON,TMR2ON
banksel ADCON1
movlw B'00000110'
movwf ADCON1
bsf TRISA,0
bcf STATUS,RP0
movlw B'10000001'
movwf ADCON0
banksel PORTC
bsf PORTC,3
reture

;;;;;;;;;;AD_Convert Subroutine;;;;;;;;;;

AD_Convert
banksel ADCON0
bsf ADCON0,GO
AD_Wait
Btfsc ADCON0,GO
goto AD_Wait
movf ADRESH,W
movwf AD_Status
return

;;;;;;;;;;PWM_Out Subroutine;;;;;;;;;;

PWM_Out
movf AD_Status,W
banksel CCPR1L
movwf CCPR1L
return

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

END
我是用MPLAB IDE v7.50顯示以下錯誤
Clean: Deleting intermediary and output files.
Clean: Deleted file "xxx.err".
Clean: Deleted file "C:\Program Files\Microchip\D\xxx.cod".
Clean: Deleted file "C:\Program Files\Microchip\D\xxx.hex".
Clean: Deleted file "xxx.lst".
Clean: Done.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F84 "xxx.asm" /l"xxx.lst" /e"xxx.err"
Warning[205] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 1 : Found directive in column 1. (list)
Warning[215] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 1 : Processor superseded by command line. Verify processor symbol.
Warning[205] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 2 : Found directive in column 1. (include)
Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F72.INC 35 : MESSAGE: (Processor-header file mismatch. Verify selected processor.)
Message[302] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 26 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 31 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 43 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 44 : Register in operand not in bank 0. Ensure that bank bits are correct.
Warning[207] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 50 : Found label after column 1. (reture)
Error[113] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 60 : Symbol not previously defined (ADRESH)
Warning[205] C:\PROGRAM FILES\MICROCHIP\D\XXX.ASM 74 : Found directive in column 1. (END)
Halting build on first failure as requested.
BUILD FAILED: Mon Jan 21 16:42:42 2008



發表於: 2008/1/20 18:06
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... ]

教育訓練中心

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