单片机编程中遇到点小问题 待解救
时间:10-02
整理:3721RD
点击:
#include<reg52.h>
#define uint unsigned int
#define uchar unsigned char
sbit d1=P0^0;
uchar num;
void main()
{
TMOD=0x01;
TH0=(65536-45872)/256;
TL0=(65536-45872)%256;
EA=1;
ET0=1;
TR0=1;
while(1);
}
void T0_time()interrupt 1
{
TH0=(65536-45872)/256£?
TL0=(65536-45872)%256;
num=++;
if(num==20)
{
num=0;
d1=~d1;
}
}
dan4.c(19): error C141: syntax error near 'TL0'
dan4.c(20): error C141: syntax error near ';'
Target not created
#define uint unsigned int
#define uchar unsigned char
sbit d1=P0^0;
uchar num;
void main()
{
TMOD=0x01;
TH0=(65536-45872)/256;
TL0=(65536-45872)%256;
EA=1;
ET0=1;
TR0=1;
while(1);
}
void T0_time()interrupt 1
{
TH0=(65536-45872)/256£?
TL0=(65536-45872)%256;
num=++;
if(num==20)
{
num=0;
d1=~d1;
}
}
dan4.c(19): error C141: syntax error near 'TL0'
dan4.c(20): error C141: syntax error near ';'
Target not created
用了中文符号的分号
TH0=(65536-45872)/256£?