1500256ET01ET11EA1
voidTimer_0i
terrupt1通过2个定时器来实现左右2个电机占空比的输出
staticuchartemp10t10
TH0500256
TL0500256
ift10
temp1speed1
每个pwm输出完成后再接受新的速度值。
ift1temp1
INA1else
通过定时器来实现左边电机PWM占空比的输出。
fINA0
t1t11100
voidTimer_1i
terrupt3
staticuchartemp20t20
TH1500256
TL1500256
ift20
一个周期后才改变temp的值
temp2speed2
ift2temp2
通过定时器实现右边电机PWM占空比的输出。
INB1
else
INB0
t2t21100
mai
c
i
clude