程序一:
#include 程序二: #include 因为上边顺序的不同,造成编译时出错不断, Clean: Deleting intermediary and output files.
__CONFIG(WDTDIS);
#define delay_i 4
#define delay_j 10000
void delays()
{
int i=0;
int j=0;
for(i=0;i<=delay_i;i++)
{
for(j=0;j<=delay_j;j++)
;
}
}
void main(void)
{
int i=0;
char NUM[]={0b00111111,0b00000110,0b01011011,0b01001111,0b01100110,0b01101101,0b01011111,0b00000111,0b01111111,0b01101111};
TRISC=0;
while(1)
{
for(i=0;i<=9;i++)
{
delays();
PORTC=NUM[i];
}
}
}
__CONFIG(WDTDIS);
#define delay_i 4
#define delay_j 10000
void delays()
{
int i=0;
int j=0;
for(i=0;i<=delay_i;i++)
{
for(j=0;j<=delay_j;j++)
;
}
}
void main(void)
{
TRISC=0;
int i=0;
char NUM[]={0b00111111,0b00000110,0b01011011,0b01001111,0b01100110,0b01101101,0b01011111,0b00000111,0b01111111,0b01101111};
while(1)
{
for(i=0;i<=9;i++)
{
delays();
PORTC=NUM[i];
}
}
}
Clean: Deleted file "F:PICC04S044S044.obj".
Clean: Deleted file "F:PICC04S044S044.cce".
Clean: Deleted file "S044.cof".
Clean: Done.
Executing: "C:Program FilesHI-TECH SoftwarePICC9.50binpicc.exe" -C -E"S044.cce" "S044.C" -O"S044.obj" -Zg9 -O -ASMLIST -Q -MPLAB -16F877A
Advisory[1209] : An old MPLAB tool suite plug-in was detected. Some options may not work correctly
Advisory[1210] : Visit www.htsoft.com or contact support@htsoft.com for an update
Warning[176] F:PICC04S044S044.C 37 : missing newline
Warning[349] F:PICC04S044S044.C 11 : non-prototyped function declaration for "delays"
Error[249] F:PICC04S044S044.C 26 : probable missing "}" in previous block
Error[285] F:PICC04S044S044.C 29 : no identifier in declaration
Warning[374] F:PICC04S044S044.C 29 : missing basic type; int assumed
Error[314] F:PICC04S044S044.C 29 : ";" expected
Warning[374] F:PICC04S044S044.C 31 : missing basic type; int assumed
Error[314] F:PICC04S044S044.C 31 : ";" expected
Warning[374] F:PICC04S044S044.C 31 : missing basic type; int assumed
Error[314] F:PICC04S044S044.C 31 : ";" expected
Warning[374] F:PICC04S044S044.C 34 : missing basic type; int assumed
Error[983] F:PICC04S044S044.C 34 : storage class redeclared
Error[984] F:PICC04S044S044.C 34 : type redeclared
Error[239] F:PICC04S044S044.C 34 : identifier "PORTC" redefined (from line 26)
Error[188] F:PICC04S044S044.C 34 : constant expression required
Error[285] F:PICC04S044S044.C 35 : no identifier in declaration
Warning[374] F:PICC04S044S044.C 35 : missing basic type; int assumed
Error[314] F:PICC04S044S044.C 35 : ";" expected
Error[285] F:PICC04S044S044.C 36 : no identifier in declaration
Warning[374] F:PICC04S044S044.C 36 : missing basic type; int assumed
Error[314] F:PICC04S044S044.C 36 : ";" expected
Warning[337] F:PICC04S044S044.C 36 : line does not have a newline on the end
Error[285] F:PICC04S044S044.C 37 : no identifier in declaration
Warning[374] F:PICC04S044S044.C 37 : missing basic type; int assumed
Error[314] F:PICC04S044S044.C 37 : ";" expected
Halting build on first failure as requested.
BUILD FAILED: Mon Sep 26 11:58:20 2011
找了很久都找不出问题所在,只好挨条删除测试,最后终于发现问题所在,是由于引脚初始化与定义变量顺序的问题,写出来以供参考。
上一篇:PICC编译错误undefined symbo
下一篇:PIC16F887 串口 LCD1602 按键
推荐阅读
史海拾趣
关于S3C6410三星提供的2009年4月份的包重启启动不了的问题! 最近移植三星2009年4月份的BSP包,第一次下到NAND FLASH里面可以正常启动,但是,我重启系统就死掉了,每次都一样。 不知道移植过4月份的BSP包的人有没有遇到过这种现象。 等待大家的指点ing...… 查看全部问答∨ |
请教 老板让做个PDA串口通讯射频的东西 C#代码 1、测量仪器空闲时不断向串口发送READY信号(02H+01H+AAH+03H+A8H),同时串口读取数据检查手持机是否发送启动命令(02H+01H+55H+03H+57H)。 2、手持机检测到设备发出的READY信号后,向仪器发送启 ...… 查看全部问答∨ |
请教各位高手,我发现在ce6里,ce6桌面窗口的创建以及消息处理函数是放在 \\WINCE600\\public\\wceshellfe\\oak\\TASKMAN\\mindeskt.cpp这个目录下面. 消息处理函数是 LRESULT CALLBACK Desktop_WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM l ...… 查看全部问答∨ |
|
高分提问,Platform Builder 5.0为什么不能生成eboot.nb0文件?但是Platform Builder 4.2却可以生成? Platform Builder 5.0为什么不能生成eboot.nb0文件?但是Platform Builder 4.2却可以生成?我要把nb0文件烧到设备上,可是却得不到这个文件,急急急!… 查看全部问答∨ |
使用的CPU是支持MMU功能的 bsp目录下syslib.c中 sysPhysMemDesc[]数组进行内存地址转换和内存属性的配置 在5.5的版本中上面数组变量内存属性一般为:cash,可写,以及buffer或unbuffer属性 疑惑的是这里buffer属性起个什么作用?特别是CPU写外存 ...… 查看全部问答∨ |