这段单片机程序该怎么改呢?总显示未定义和等号旁边语法错误

这段单片机程序该怎么改呢?总显示未定义和等号旁边语法错误,#include<reg52.h> sbitLeft_moto_pwm=P1^6; sbitRight_mot…

这段单片机程序该怎么改呢?总显示未定义和等号旁边语法错误,#include<reg52.h>
sbitLeft_moto_pwm=P1^6;
sbitRight_moto_pwm=P1^7;
sbitLeft_1_led=P1^0;
sbitLeft_2_led=P1^1;
sbitRight_1_led=P1^2;
sbitRight_2_led=P1^3;

#defineLeft_moto_go{P3^4=0,P3^5=1;}
#defineLeft_moto_back{P3^4=1,P3^5=0;}
#defineLeft_moto_stp{P3^4=1,P3^5=1;}
#defineRight_moto_go{P3^6=0,P3^7=1;}
#defineRight_moto_back{P3^6=1,P3^7=0;}
#defineRight_moto_stp{P3^6=1,P3^7=1;}
unsigned char pwm_val_left=0; unsigned char push_val_left=0;
unsigned char pwm_val_right=0; unsigned char push_val_right=0;
bit Right_moto_stop=1;bit Left_moto_stop=1;
unsigned int time=0;,大哥 sbit,define是关键字,后面要空格分开

作者: soufei

为您推荐


Fatal error: Can't use function return value in write context in /www/wwwroot/www.qianrushi.com.cn/wp-content/themes/news/footer.php on line 115