Re: 請教16F84A 霹靂燈[組語] Build failed!
|
||||
---|---|---|---|---|
新會員
|
Alecfox 感謝啦!! 原來GOTO LEFT 下面的GOTO MAIN要取消掉~~
難怪 我一直在一個方向!! 多謝你的指導!
發表於: 2009/9/30 19:55
|
|||
|
請教.此程式如何修改成 左移完 右移 ??
|
||||
---|---|---|---|---|
新會員
|
請教.此程式如何修改成 左移完 右移?? 重複此動作!
組合語言看不太懂~~修改又失敗啦!! 麻煩前輩指導!!感謝!! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;霹靂燈 ;基本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
|
|||
|
Re: 感謝Ryang~~解決了!!
|
||||
---|---|---|---|---|
新會員
|
唉 @@....果然是大師ㄧ出手~~便知有沒有~~
之前以為 組語 要配 HI TECH~~~ 感謝啦~~~沒有你的指教 我可能早就放棄學習了!!開心!!!呵呵!
發表於: 2009/9/28 14:15
|
|||
|
Re: 請教16F84A 霹靂燈[組語] Build failed!
|
||||
---|---|---|---|---|
版主
|
這這這明明就是組合語言,應該用 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
|
|||
|
Re: 請教16F84A 霹靂燈[組語] Build failed!
|
||||
---|---|---|---|---|
資深會員
|
MPLAB IDE在Configure-->Select Device...-->選擇PIC16F84A,再組譯一次試試看
發表於: 2009/9/28 8:49
|
|||
|
請教16F84A 霹靂燈[組語] Build failed!
|
||||
---|---|---|---|---|
新會員
|
這程式 從網頁 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
|
|||
|