|
Tài trợ cho PIC Vietnam |
Những câu hỏi thường gặp Những lỗi cơ bản thường gặp khi làm việc với PIC hoặc những vấn đề cơ bản nhất thường được hỏi trong những năm qua |
|
Ðiều Chỉnh | Xếp Bài |
17-10-2006, 12:59 AM | #1 |
Nhập môn đệ tử
Tham gia ngày: May 2005
Bài gửi: 9
: |
Lỗi thường gặp - 628A
Anh Hiệp ơi, em copy cái code của anh viết ở diễn đàn vào Mplab IDE rồi nhấn Alt + F10, sao no hiện nhiều lỗi vậy ?
Code mà em copy là: ;================================================= ======= ; Ten chuong trinh : Mach test den LED_1 ; Nguoi thuc hien : Falleaf ; Ngay thuc hien : 23/05/2005 ; Phien ban : 1.0 ; Mo ta phan cung : Dung PIC16F628A - thach anh 10MHz ; : LED giao tiep voi PORTB ; : Cuc am cua LED noi voi GND ; : RB0 - RB7 la cac chan output ;---------------------------------------------------------------- ; Ngay hoan thanh : 23/05/2005 ; Ngay kiem tra : 23/05/2005 ; Nguoi kiem tra : Doan Hiep ;---------------------------------------------------------------- ; Chu thich : Mo ta cac diem khac nhau cua cac phien ban khac nhau ; : hoac cac chu thich khac ; : vd, dung che do Power On Reset, PORTB = 00000000 ; : hoac, chuong trinh viet cho PIC Tutorial ; : hoac, chuong trinh nay hoan toan mien phi va co the dung cho ; : moi muc dich khac nhau ;================================================= ======= ;================================================= ====== TITLE "Mach test LED_1" PROCESSOR P16F628A INCLUDE <P16F628A.inc> __CONFIG _CP_OFF & _PWRTE_ON & _WDT_OFF &_HS_OSC ;================================================= ============================== ;================================================= ============================== ORG 0x0000 GOTO MAIN ORG 0x0005 MAIN BANKSEL TRISB ; bank select CLRF TRISB ; trisb = 00000000 ; portb = output BANKSEL PORTB BSF PORTB, 0 ; rb0 = 1 ; RB0 = 5V GOTO $ ; dung chuong trinh tai day ; vong lap tai cho^~ ; khong bao gio ket thuc END. ; lenh bat buoc de ket thuc ;================================================= =============================== Roi em Alt + F10, nó hiện errors như sau: Quote:" Clean: Deleting intermediary and output files. Clean: Done. Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p18F452 "Test 1.asm" /l"Test 1.lst" /e"Test 1.err" Warning[215] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 25 : Processor superseded by command line. Verify processor symbol. Message[301] C:\PROGRAM FILES\MICROCHIP\MPASM SUITE\P16F628A.INC 35 : MESSAGE: (Processor-header file mismatch. Verify selected processor.) Warning[230] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 27 : __CONFIG has been deprecated for PIC18 devices. Use directive CONFIG. Error[126] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 27 : Argument out of range (not a valid config register address) Warning[226] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 32 : Destination address must be word aligned Error[157] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 35 : ORG at odd address Warning[226] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 44 : Destination address must be word aligned Warning[207] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 47 : Found label after column 1. (END.) Error[129] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 49 : Expected (END) Error[173] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 49 : Source file path exceeds 62 characters (C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM) Halting build on first failure as requested. BUILD FAILED: Mon Oct 16 12:32:54 2006 ". Có ai biết gì thêm thì chi mình với, đọc 1 hồi rồi mù, hixhix. Em vào Configure -> Select Device -> rồi chọn Pic16F628A. rồi quay lại cái code của anh, em nhấn Alt + F10, thì nó chỉ còn chưng này errors à: Clean: Deleting intermediary and output files. Clean: Done. Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F628A "Test 1.asm" /l"Test 1.lst" /e"Test 1.err" Warning[215] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 25 : Processor superseded by command line. Verify processor symbol. Message[302] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 39 : Register in operand not in bank 0. Ensure that bank bits are correct. Error[173] C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM 48 : Source file path exceeds 62 characters (C:\DOCUMENTS AND SETTINGS\JIMMY LEDUC\MY DOCUMENTS\MY WORKS\MECHTRONICS ENGINEERING\PRACTICING\MPLAB IDE\TEST 1.ASM) Halting build on first failure as requested. BUILD FAILED: Mon Oct 16 13:09:18 2006 thay đổi nội dung bởi: namqn, 17-10-2006 lúc 06:37 PM. Lý do: Updating |
|
|