程序是这样的
#include <pic.h>
#include <pic16f877a.h>
main()
{
TRISD=0X00; /*TRISD寄存器被赋值,PORTD每一位都为输出*/
while(1); /*循环执行点亮发光二极管的语句*/
{
PORTD=0XF0; /*向PORTD送数据,点亮LED(由实验模板*/
/*的设计决定相应位置低时LED点亮)。*/
}
}
/////////////////////////////////////////////////////////////////////////////////////////
Building B.HEX...
Compiling B.C:
Command line: "C:\HT-PIC\BIN\PICC.EXE -E -ASMLIST -16F877 -C -IC:\HT-PIC\INCLUDE C:\HT-PIC\SAMPLES\INTRPT\B.C"
C:\HT-PIC\SAMPLES\INTRPT\B.C: 2: Cannot open include file "pic16f877a.h" (error)
Enter PICC -HELP for help
Serial number: HCPIC-38748
Licensed to : URUPIC URUGUAY
MPLAB is unable to find output file "B.OBJ". This may be due to a compile, assemble, or link process failure.
Build failed.
显示的错误信息找不到PIC16F877的头文件.作者: winnie 时间: 2009-3-27 14:48
#include <pic.h>就行了