L298驱动步进电机
上传时间: 2014-12-26
上传用户:sssl
AT89C2051驱动步进电机的电路和源码:AT89C2051驱动步进电机的电路和源码 程序:stepper.c stepper.hex/* * STEPPER.C * sweeping stepper's rotor cw and cww 400 steps * Copyright (c) 1999 by W.Sirichote */#i nclude c:\mc5151io.h /* include i/o header file */ #i nclude c:\mc5151reg.hregister unsigned char j,flag1,temp; register unsigned int cw_n,ccw_n;unsigned char step[8]={0x80,0xc0,0x40,0x60,0x20,0x30,0x10,0x90} #define n 400/* flag1 mask byte 0x01 run cw() 0x02 run ccw() */main(){ flag1=0; serinit(9600); disable(); /* no need timer interrupt */ cw_n = n; /* initial step number for cw */ flag1 |=0x01; /* initial enable cw() */while(1){ { tick_wait(); /* wait for 10ms elapsed */energize(); /* round-robin execution the following tasks every 10ms */ cw(); ccw(); } }}cw(){ if((flag1&0x01)!=0) { cw_n--; /* decrement cw step number */ if (cw_n !=0) j++; /* if not zero increment index j */ else {flag1&=~0x01; /* disable cw() execution */ ccw_n = n; /* reload step number to ccw counter */ flag1 |=0x02; /* enable cww() execution */ } }
上传时间: 2013-11-21
上传用户:boyaboy
51单片机驱动步进电机(含电路图和源程序代码) 源程序:stepper.c stepper.hex /* * STEPPER.C * sweeping stepper's rotor cw and cww 400 steps * Copyright (c) 1999 by W.Sirichote */ #i nclude c:\mc5151io.h /* include i/o header file */ #i nclude c:\mc5151reg.h register unsigned char j,flag1,temp; register unsigned int cw_n,ccw_n; unsigned char step[8]={0x80,0xc0,0x40,0x60,0x20,0x30,0x10,0x90} #define n 400 /* flag1 mask byte 0x01 run cw() 0x02 run ccw() */
上传时间: 2013-11-09
上传用户:钓鳌牧马
51单片机驱动步进电机电路及程序
上传时间: 2013-11-16
上传用户:924484786
AT89C2051驱动步进电机的电路和源码
上传时间: 2013-10-13
上传用户:tonyshao
AT89C2051驱动步进电机
上传时间: 2013-11-25
上传用户:watch100
at89C2051驱动步进电机的原理图和源码
上传时间: 2015-04-16
上传用户:epson850
51单片机驱动步进电机的代码,还有相关说明
上传时间: 2014-01-19
上传用户:diets
89C2051驱动步进电机的源程序,希望能够给初学者提供帮助
上传时间: 2014-01-24
上传用户:小儒尼尼奥
单片机驱动步进电机代码(一) 适于各类单片机
上传时间: 2015-05-30
上传用户:haoxiyizhong