网上不是很好找的资料哦,我们自己做的。这是C程序:#include#defineucharunsignedcharsbitP1_0=P1^0;sbitP1_1=P1^1;sbitP1_3=P1^3;sbitP1_4=P1^4;sbitP1_5=P1^5;sbitP1_6=P1^6;sbitP1_7=P1^7;ucharRRR,flg,KKK;//RRR用于调速控制;flg=0正转;flg=1反转;flg=2不转;KKK为P1的状态寄存ucharloop[2][4]={{0x0c,0x06,0x03,0x09},{0x09,0x03,0x06,0x0c}};voidloop