How to control a step motor using c?

Posted 26 March 2012 - 04:45 AM

Hello to all,

I am a student and i have just started learning C programming language. Today my professor asked me if i knew how to write a code which could control the movement of a step motor. The C code should be used with a FPGA circuit to start a small step motor which spins a wheel. The code is needed to rotate the wheel in a certain time and a certain number of spins.
I am very interested in learning so can you guys send me in the right direction? Maybe you could tell me about a book/site where i can read about ? or maybe you can tell me a few commands?

Replies To: How to control a step motor using c?

Re: How to control a step motor using c?

Posted 26 March 2012 - 05:48 AM

I've never done this, but I can tell you what I think is the right way to go about this. Usually a microcontroller in bundled with a development environment that compiles a high-level language (usually C like) into the native language. Arduino is one example. You write Arduino programs in C/C++. To move a step motor it's simply a matter of sending a signal through the analog output pin. Here it is pretty much done.

I don't know much about FPGAs, but I think using them might be overkill for moving a step motor. But if you're still interested Altera is a popular manufacturer of development boards. These too can be programmed with C. Texas Instruments is another good one.