1967| 3
|
[控制类] 怎么测试舵机? |
3贡献
最佳答案用这个程序看哈
#include
#define uint unsigned int
unsigned char count;
unsigned char jd;
sbit pwm=P2^0;
sbit jia=P3^6;
sbit jian=P3^7;
void delay(uint SB)
{
uint i,j;
for(i=SB;i>0;i--)
for(j=125;j>0;j--);
}
void Time0_Init()
{
TMOD=0x01;
IE=0x82;
TH0=(65536-92)/256;//100us
TL0=(65536-92)%256;
TR0=1;
}
void Time0_Int() interrupt 1
{
TH0=(65536-92)/256;
...
| ||
| ||
| ||
| ||
关于我们|联系我们|小黑屋|智能车制作 ( 黑ICP备2022002344号 )
GMT+8, 2025-1-8 22:57 , Processed in 0.084824 second(s), 31 queries , Gzip On.
Powered by Discuz! X3.2
© 2001-2013 Comsenz Inc.