Nguyên văn bởi viboyth.haui
Xem bài viết
#include <REGX52.H> // khai bao chip AT89C52
unsigned char x;
void delay(long time) //chuong trinh taoj thoi gian tre
{
while(time--);
}
void main()
{
while(1)
{
P2=0xfe;
delay(10000);
P2=0xfc;
delay(10000);
void hoa(void) (lỗi ở đây)
{
for(x=0;x<2;x++)
{
P2=0x00;
delay(10000);
P2=0x01;
delay(10000);
P2=0x02;
delay(10000);
}
}
P2=0x00;
delay(10000);
P2=0x03;
delay(10000);
hoa();
delay(10000);
}
}
unsigned char x;
void delay(long time) //chuong trinh taoj thoi gian tre
{
while(time--);
}
void main()
{
while(1)
{
P2=0xfe;
delay(10000);
P2=0xfc;
delay(10000);
void hoa(void) (lỗi ở đây)
{
for(x=0;x<2;x++)
{
P2=0x00;
delay(10000);
P2=0x01;
delay(10000);
P2=0x02;
delay(10000);
}
}
P2=0x00;
delay(10000);
P2=0x03;
delay(10000);
hoa();
delay(10000);
}
}
Comment