#include<reg51.h>
#define uint unsigned int
#define uchar unsigned char
uchar num,tt;
uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,
0x7d,0x07,0x7f,0x6f,0x77,0x7c,
0x39,0x5e,0x79,0x71};
void main()
{
TMOD=0x01;
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
EA=1;
ET0=1;
TR0=1;
P0=0x00;
}
while(1)
{
if(tt==20)
{
tt=0;
num++;
if(num==16)
num=0;
P1=table[num];
}
}
void extero() interrupt 1
{
TH0=(65536-50000)/256;
TL0=(65536-50000)%256;
tt++;
}
Build target '目標 1'assembling STARTUP.A51...compiling dsk01-1.c...DSK01-1.C(18): error C141: syntax error near 'while'DSK01-1.C(18): error C141: syntax error near '1'DSK01-1.C(20): error C141: syntax error near '==', expected ')'DSK01-1.C(23): error C129: missing ';' before '++'目標未創建
|