CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Stepper motor with motor driver coding problems

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Guest








Stepper motor with motor driver coding problems
PostPosted: Wed Aug 22, 2007 7:26 pm     Reply with quote

Hi all, I'm like a new born baby in PIC world.

I have a 5 phase Stepper Motor with Motor Driver, previously I controlled it by using PLC, simply include the function of motor in the ladder diagram will do. However, I have a problem with PIC16F877a coding, the motor driver have 2 inputs for stepper, 1st input is clockwise movement, 2nd input for counter-clockwise.

I have referred to the examples like ex_pwm.c, ex_ccpmp.c, ex_ccp1s.c, ex_step.c and other solutions provided in this forum. I would like to know for sure:
1)Does " setup_ccp1(CCP_PWM)" means enabling the pin17, which is RC2/CCP1 to become CCP1 instead of standard I/O pin?
2)If yes, then how's the coding is going to be? I've tried to measure the outpin with oscilloscope using the code as above, but what i get is noise....
3)Does i mean, i only need to plug in output from CCP1 and CCP2 pins to CW and CCW input of the motor driver? Because, all i need is pulse...

Thanks a lot for answering my question.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Aug 22, 2007 10:33 pm     Reply with quote

Quote:
I have a 5 phase Stepper Motor with Motor Driver.

Post the manufacturer, part number, and website for the stepper motor.
windz



Joined: 19 Aug 2007
Posts: 7

View user's profile Send private message

PostPosted: Thu Aug 23, 2007 12:38 am     Reply with quote

Micro step MC-7514 5 phase stepping motor driver.

http://translate.google.com/translate?hl=en&sl=ja&u=http://www.ipros.jp/products/037450013/&sa=X&oi=translate&resnum=2&ct=result&prev=/search%3Fq%3Dmc-7514%2B%26hl%3Den%26rls%3Dcom.microsoft:en-us:IE-SearchBox%26rlz%3D1I7WZPA Japanese site... headache...

in case the page seems blurred, i made some clarifications here, there are 2 main inputs for this driver, which is CW/pulse and CCW/direction, other is for stepper motor and power supply, which is not concerned in PIC.

o-------------------CW+
CW/Pulse
0-------------------CW-


0-------------------CCW+
CCW/direction
0-------------------CCW-


Thanks for helping.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Aug 23, 2007 12:46 am     Reply with quote

See this CCS example file:
Quote:
c:\Program Files\PICC\Examples\Ex_Step.c
windz



Joined: 19 Aug 2007
Posts: 7

View user's profile Send private message

PostPosted: Thu Aug 23, 2007 2:23 am     Reply with quote

Actually, i dont really understand all the coding in the example, but at least now i can get the square wave output on the oscilloscope. I'm playing around with the coding now...

thanks for your help. Very Happy
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group