![]() |
|
|
#1 |
|
Đệ tử 1 túi
Tham gia ngày: Jul 2006
Bài gửi: 11
: |
Giúp e sửa lỗi này trong Mikro C với ạ.
e có viết chương trình này nhưng khi biên dịch báo lỗi Main function is not defined.
Anh chị xem giùm e với, Cảm ơn nhiều. Code:
ANSEL=0; // All I/O pins are configured as digital
ANSELH=0;
PORTB=0xFF; // Reset port B
TRISB=0; // portB output
unsigned char code maled[]= {0x85,0xC0,0xE0,0xF0,0xF8,0xFC,0xFE,0xFF,0xFE,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x00};
void hienthi()
{
unsigned char j;
for(j=0;j<16;j++)
{
PORTB=maled[j];
Delay_ms(300);
}
}
void main()
{
unsigned char i;
for(i=0;i<3;i++) hienthi();
while(1);
}
|
|
|
|
|
|