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 support@ccsinfo.com

# PULSE OUT Help?????

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







# PULSE OUT Help?????
PostPosted: Tue Sep 09, 2003 11:46 am     Reply with quote

Hi:

I use PWM to pulse out a square wave signal to drive a stepper motors. The # PULSE will control the step of the motor. Can I control the # of PULSE out?

I use the CCS DEMO board which is PIC16F877.

Anyone written a route to share? :?:
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 09, 2003 12:10 pm     Reply with quote

Look at the CCS example file, EX_PWM.C, which is available here:

http://www.cc.puv.fi/~t0101190/projekti/source/Examples/
cxiong



Joined: 09 Sep 2003
Posts: 52

View user's profile Send private message MSN Messenger

PostPosted: Tue Sep 09, 2003 12:53 pm     Reply with quote

PCM programmer wrote:
Look at the CCS example file, EX_PWM.C, which is available here:

http://www.cc.puv.fi/~t0101190/projekti/source/Examples/


I used the EX_PWM.C for reference on my pwm. But this example only run on different frequencies, it does not generate # of pulse.

Is it generate # of pulse?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 09, 2003 1:21 pm     Reply with quote

Sorry. I didn't read your original post closely enough.

The hardware PWM module of the PIC doesn't have
the ability to control the number of pulses out.
It runs continuously.

I think you will have to do it in software.


See the CCS example file, EX_STEP.C, which is in this folder
c:\Program Files\Picc\Examples
and is also available online here:
http://www.cc.puv.fi/~t0101190/projekti/source/Examples/
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