On the CNC equipment I use Allegro driver chips to handle the motors as they have the Transistor bridge built in and all it takes is one pin of your pic to set direction and one pin to pulse for each step and a enable pin to make it run or make it ignore the inputs. So you could do this
1 - Set pin for direction
2 - Enable it (this order is for safety)
3 - set a timer for pause between pulse
4 - on each interupt of timer send a step pulse to chip
5 - either change direction, reset pulse timer period, or do nothing
6 - repeat.
This way it take changing one pin to change direction and one value for the timer to change speed depending on you DMX values.
The interupt and timer will take care of running the motor for you in the direction and speed you set.
You can not build the transistor bridge for what the chip cost and they save space. They make them for Unipolar and Bipolar steppers in different power outputs.
RJ
Hi RJ,
I found this page that shows how easy it is to run a stepper http://www.instructables.com/id/EP4OIQNL5LEV0FB8YX/
I have now download AVR Studio so I can try do my first code for Hennes DMX tranciver card. 😛
Make sure you are using a small low draw motor like that. I thought you wanted to run a larger more powerful motor. That is where the driver chip is helpful.
RJ
It is easy to let a stepper spin at slow speeds.
The problem is a smooth accelaration of multiple axes with one mcu...
@MacTommy: I wrote a firmware for your problem based on dc-Motors and posted the link already.
