|
Tài trợ cho PIC Vietnam |
dsPIC - Bộ điều khiển tín hiệu số 16-bit Theo dự kiến của Microchip, vào khoảng năm 2011 dsPIC sẽ có doanh số lớn hơn PIC |
|
Ðiều Chỉnh | Xếp Bài |
10-01-2012, 06:20 PM | #1 |
Đệ tử 2 túi
Tham gia ngày: Aug 2009
Bài gửi: 36
: |
mplab c30
các bác xem giùm nó báo lỗi gì???
#include <p30F2020.h> _FOSC(CSW_FSCM_OFF & FRC_PLL4); _FWDT(WDT_OFF); _FBORPOR(PBOR_OFF & MCLR_EN); _FGS(CODE_PROT_OFF); //------------------------------------------------------------------------------ #define Fcy 8000000 //Tan so thuc thi lenh #define Fpwm 100000 //Tan so PWM = 100 kHz //Chuong trinh con khoi tao module PWM void Init_MCPWM(void) { PTPER = Fcy/Fpwm - 1; //Dat thanh ghi chu ky voi tan so PWM = 100 kHz SEVTCMP = PTPER; PWMCON1 = 0x0111; //Chi dung cac chan PxL, mot cach doc lap DTCON = 0x0032; OVDCON = 0xFF00; //Khong dung overdrive PDC1 = 0x0064; //Khoi tao PWM1, 2 la 25% PWMCON2 = 0x0F00; //Postscale = 1:16 PTCON = 0x8000; //Kich hoat module PWM } int main(void) { Init_MCPWM(); } lỗi báo là: Debug build of project `D:\ve mach\dspic\2020.mcp' started. Language tool versions: pic30-as.exe v3.30, pic30-ld.exe v3.30, pic30-ld.exe v3.30, pic30-ar.exe v3.30 Preprocessor symbol `__DEBUG' is defined. Tue Jan 10 17:11:13 2012 ---------------------------------------------------------------------- Clean: Deleting intermediary and output files. Clean: Done. Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-ld.exe" -mcpu=30F2020 -x c -c "dsp.c" -o"dsp.o" -D__DEBUG -g -Wall C:\Program Files\Microchip\MPLAB C30\bin\bin/pic30-coff-ld.exe: unrecognised emulation mode: cpu=30F2020 Supported emulations: pic30_coff Halting build on first failure as requested. ---------------------------------------------------------------------- Debug build of project `D:\ve mach\dspic\2020.mcp' failed. Language tool versions: pic30-as.exe v3.30, pic30-ld.exe v3.30, pic30-ld.exe v3.30, pic30-ar.exe v3.30 Preprocessor symbol `__DEBUG' is defined. Tue Jan 10 17:11:19 2012 ---------------------------------------------------------------------- BUILD FAILED
__________________
cao thủ không bằng tranh thủ |
Ðiều Chỉnh | |
Xếp Bài | |
|
|