• 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: 請教16F84A 霹靂燈[組語] Build failed!
#7
新會員
新會員


查看用戶資訊
Alecfox 感謝啦!! 原來GOTO LEFT 下面的GOTO MAIN要取消掉~~

難怪 我一直在一個方向!! 多謝你的指導!

發表於: 2009/9/30 19:55
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教16F84A 霹靂燈[組語] Build failed!
#6
資深會員
資深會員


查看用戶資訊
MAIN:
MOVLW 0x07
MOVWF COUNT

LEFT:
RLF 06H,1
CALL DELAY
DECFSZ COUNT,1
GOTO LEFT

MOVLW 0x07
MOVWF COUNT

RIGHT:
RRF 06H,1
CALL DELAY
DECFSZ COUNT,1
GOTO RIGHT


GOTO MAIN

發表於: 2009/9/30 13:11
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教.此程式如何修改成 左移完 右移 ??
#5
新會員
新會員


查看用戶資訊
請教.此程式如何修改成 左移完 右移?? 重複此動作!

組合語言看不太懂~~修改又失敗啦!! 麻煩前輩指導!!感謝!!


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;霹靂燈
;基本Output實驗
;by xuan 2008/12/18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

COUNT SET 0x0A ;設定變數
DLY1 SET 0x0B
DLY2 SET 0x0C
DLY3 SET 0x0D

LIST P=16F84A

ORG 00H ;設定成是起始位置
BSF 03H,5 ;切換到BANK1
BCF 03H,6
MOVLW 0x00 ;將PORTB全設為輸出
MOVWF 06H
BCF 03H,5 ;切換回BANK0

MOVLW 0x01 ;給定初始值
MOVWF 06H
CALL DELAY

MAIN:
MOVLW 0x07
MOVWF COUNT

LEFT:
RLF 06H,1
CALL DELAY
DECFSZ COUNT,1
GOTO LEFT
GOTO MAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;DELAY副程式
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DELAY:
MOVLW 0x05
MOVWF DLY1
DEL:
MOVLW 0xFA
MOVWF DLY2
DEC1:
MOVLW 0x19
MOVWF DLY3
DEC2:
DECFSZ DLY3,1;
GOTO DEC2
DECFSZ DLY2,1
GOTO DEC1
DECFSZ DLY1,1
GOTO DEL
RETURN

END //結束

發表於: 2009/9/30 11:59
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 感謝Ryang~~解決了!!
#4
新會員
新會員


查看用戶資訊
唉 @@....果然是大師ㄧ出手~~便知有沒有~~

之前以為 組語 要配 HI TECH~~~

感謝啦~~~沒有你的指教 我可能早就放棄學習了!!開心!!!呵呵!

發表於: 2009/9/28 14:15
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教16F84A 霹靂燈[組語] Build failed!
#3
版主
版主


查看用戶資訊
這這這明明就是組合語言,應該用 MAPSM 去組譯的,你用Hi-Tech PICC 當然會錯的。在Project下設定語言工具為MPASM 吧!

建議先看一下 W100 (ASP 101) 的教材。

http://www.microchip.com.tw/modules/w ... nglefile.php?cid=4&lid=24

發表於: 2009/9/28 10:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請教16F84A 霹靂燈[組語] Build failed!
#2
資深會員
資深會員


查看用戶資訊
MPLAB IDE在Configure-->Select Device...-->選擇PIC16F84A,再組譯一次試試看

發表於: 2009/9/28 8:49
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請教16F84A 霹靂燈[組語] Build failed!
#1
新會員
新會員


查看用戶資訊
這程式 從網頁 http://www.xuan.idv.tw 参考的~~

想運用16F84A 來做霹靂燈(自用機車)~~成本 比較實惠!!

但是16F 好像只能用 HI TECH~~我學C的 組語又不懂!!

按照 程式 BUILD完 出現以下問題~~是不是 我的MPLAB 設定有問題??
有什麼需要注意的設定??

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;霹靂燈
;基本Output實驗
;by xuan 2008/12/18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

COUNT SET 0x0A ;設定變數
DLY1 SET 0x0B
DLY2 SET 0x0C
DLY3 SET 0x0D

LIST P=16F84A

ORG 00H ;設定成是起始位置
BSF 03H,5 ;切換到BANK1
BCF 03H,6
MOVLW 0x00 ;將PORTB全設為輸出
MOVWF 06H
BCF 03H,5 ;切換回BANK0

MOVLW 0x01 ;給定初始值
MOVWF 06H
CALL DELAY

MAIN:
MOVLW 0x07
MOVWF COUNT

LEFT:
RLF 06H,1
CALL DELAY
DECFSZ COUNT,1
GOTO LEFT
GOTO MAIN

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;DELAY副程式
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DELAY:
MOVLW 0x05
MOVWF DLY1
DEL:
MOVLW 0xFA
MOVWF DLY2
DEC1:
MOVLW 0x19
MOVWF DLY3
DEC2:
DECFSZ DLY3,1;
GOTO DEC2
DECFSZ DLY2,1
GOTO DEC1
DECFSZ DLY1,1
GOTO DEL
RETURN

END //結束


Build
------------------------------------------------------------------------
Build C:\pic16\pili_04\pili_04 for device 16F84A
Using driver C:\Program Files\HI-TECH Software\PICC\PRO\9.65\bin\picc.exe

Make: The target "C:\pic16\pili_04\a1.p1" is out of date.
Executing: "C:\Program Files\HI-TECH Software\PICC\PRO\9.65\bin\picc.exe" -C C:\pic16\pili_04\a1.asm -q --chip=16F84A -P --runtime=default,+clear,+init,-keep,+osccal,-download,-resetbits,+stackcall,+stackwarn,+clib --opt=default,+asm,9 --warn=0 -D__DEBUG=1 --double=24 --addrqual=ignore -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [223] C:\pic16\pili_04\a1.asm; 12. digit out of range
Error [876] C:\pic16\pili_04\a1.asm; 12. syntax error
Error [876] a1.pre; 32. syntax error
Error [876] a1.pre; 34. syntax error
Error [876] a1.pre; 51. syntax error
Error [876] a1.pre; 53. syntax error
Error [876] a1.pre; 55. syntax error
Error [840] C:\pic16\pili_04\a1.asm; 28. phase error
Error [840] C:\pic16\pili_04\a1.asm; 29. phase error
Error [840] C:\pic16\pili_04\a1.asm; 33. phase error
Error [840] C:\pic16\pili_04\a1.asm; 35. phase error
Error [840] C:\pic16\pili_04\a1.asm; 36. phase error
Error [840] C:\pic16\pili_04\a1.asm; 42. phase error
Error [840] C:\pic16\pili_04\a1.asm; 43. phase error
Error [840] C:\pic16\pili_04\a1.asm; 45. phase error
Error [840] C:\pic16\pili_04\a1.asm; 46. phase error
Error [840] C:\pic16\pili_04\a1.asm; 48. phase error
Error [840] C:\pic16\pili_04\a1.asm; 49. phase error
Error [840] C:\pic16\pili_04\a1.asm; 52. phase error
Error [840] C:\pic16\pili_04\a1.asm; 54. phase error
Error [840] C:\pic16\pili_04\a1.asm; 56. phase error
Advisory[1] too many errors (21)
Error [141] ; . can't open object file "a1.obj": No such file or directory

********** Build failed! **********

發表於: 2009/9/27 14:13
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... ]

教育訓練中心

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