#include <pic.h>
#define uchar unsigned char
#define uint unsigned int
__CONFIG(0x1cd4)
void delay(uint x)
{
uint a,b;
for(a=x;a>0;a--)
for(b=110;b>0;b--);
}
void main()
{
uchar = i;
TRISB = 0x00;
while(1)
{
PORTB =0x01;
for(i=6;i>0;i--)
{
delay(500);
PORTB = PORT <<1;
}
}
}
编译的时候出现:IDE: MPLAB IDE v8.20 ,编译器:picc-9.60
HI-TECH C PRO for the PIC10/12/16 MCU family (Lite) V9.60PL5
Copyright (C) 1984-2009 HI-TECH SOFTWARE
(1273) Omniscient Code Generation not available in Lite mode (warning)
Error [499] ; 0. undefined symbol:
_delay(pamadeng.obj)
此帖出自
小平头技术问答
PORTB = PORT <<1;
这句对嘛?
[ 本帖最后由 sjl2001 于 2009-12-3 19:09 编辑 ]
这句对嘛?
一周热门 更多>