PIC Vietnam

PIC Vietnam (http://www.picvietnam.com/forum/index.php)
-   PIC Việt Nam - Chuyên nghiệp (http://www.picvietnam.com/forum/forumdisplay.php?f=35)
-   -   Giúp lỗi khi viết code bằng mikroC for PIC (http://www.picvietnam.com/forum/showthread.php?t=33409)

npl.nguyenphi 21-03-2014 09:50 PM

Giúp lỗi khi viết code bằng mikroC for PIC
 
Khi viết code cho 16f887 e gặp lỗi vầy là sao vậy mọi người..

0 304 C:/Users/WIN7/Desktop/Test PIC/2/MyProject.c:15: error: Can't open include file "16f887.h"
Code của e..
#include <16f887.h> //khai bao chip cho trinh dich biet
#fuses HS, NOWDT, NOPROTECT,NOPUT, NOBROWNOUT, NODEBUG //config
#use delay (clock = 7.3728MHz) //khai bao nguon cap dao dong thach anh 7.3728MHz
#define LED PIN_D0 //dinh nghia Macro (ten thay the) cho pin RD0
void main (void)
{
while (true) //vong lap
{
output_low(LED); //xuat muc [0] ra pin RD0 (led off)
delay_ms(500); //lam tre 500ms
output_high(LED); //xuat muc [1] ra pin RD0 (led on)
delay_ms(500); //
}
}


Múi giờ GMT. Hiện tại là 10:41 PM.

Tên diễn đàn: vBulletin Version 3.8.11
Được sáng lập bởi Đoàn Hiệp.
Copyright © PIC Vietnam