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

PIC18F4550 ECCP PWM

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



Joined: 15 Feb 2012
Posts: 11

View user's profile Send private message

PIC18F4550 ECCP PWM
PostPosted: Tue Mar 06, 2012 10:41 am     Reply with quote

If i just set the CCP1CON to full bridge forward/reverse, it will automatically configure the pins P1A, P1B, P1C,P1D ?

for example :
Quote:
setup_ccp1(CCP_PWM_FULL_BRIDGE | CCP_PWM_H_H);
delay_ms(5000);

// Run in reverse for 5 seconds.
setup_ccp1(CCP_PWM_FULL_BRIDGE_REV | CCP_PWM_H_H);
delay_ms(5000);


can this simple code run forward in first 5 second then run reverse in next 5 second?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Mar 06, 2012 2:54 pm     Reply with quote

Yes, that should work OK.
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

Be careful
PostPosted: Tue Mar 06, 2012 5:50 pm     Reply with quote

The data sheet outlines the precautions you may need to take when attempting to reverse direction.

Mike
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