1 Replies - 1246 Views - Last Post: 26 March 2012 - 05:48 AM Rate Topic: -----

#1 sobriquet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 26-March 12

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?

Is This A Good Question/Topic? 0
  • +

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

#2 blackcompe  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1159
  • View blog
  • Posts: 2,547
  • Joined: 05-May 05

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.

This post has been edited by blackcompe: 26 March 2012 - 05:54 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1