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

pwm compile error

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



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

pwm compile error
PostPosted: Mon Oct 30, 2017 2:02 pm     Reply with quote

the compiler is reporting an error on the "set_compare_time(2, OCR_2, OCRS_2); " saying:
error 58, expenting a close paren

to make shure, i tried to compile 2 or 3 examples from the PICC library, with same result, always on the set_compare_time, highlighting the last operand;

the example I am testing right now is the C:\Program Files (x86)\PICC\Examples\ex_power_pwm

any hint?
jujoba
Ttelmah



Joined: 11 Mar 2010
Posts: 19541

View user's profile Send private message

PostPosted: Mon Oct 30, 2017 2:14 pm     Reply with quote

What chip?.

Does your chip have the secondary compare registers?.
jujoab



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

PostPosted: Mon Oct 30, 2017 3:21 pm     Reply with quote

Ttelmah wrote:
What chip?.

Does your chip have the secondary compare registers?.

Hi Ttelmah

I am testing with the 18f4420.
I think I have a definition problem, will report when I get a solution.

Thanks
jujoba
Ttelmah



Joined: 11 Mar 2010
Posts: 19541

View user's profile Send private message

PostPosted: Tue Oct 31, 2017 2:26 am     Reply with quote

Your chip does not have the power PWM module.....

The power_pwm functions only work on chips that have the power PWM module.
Yours has a standard CCP, and an ECCP.

The only PIC18's with this module are the 2431 and 4431 I think.
jujoab



Joined: 05 Aug 2017
Posts: 41
Location: brazil

View user's profile Send private message

PostPosted: Tue Oct 31, 2017 8:38 am     Reply with quote

Ttelmah wrote:
Your chip does not have the power PWM module.....

The power_pwm functions only work on chips that have the power PWM module.
Yours has a standard CCP, and an ECCP.

The only PIC18's with this module are the 2431 and 4431 I think.


got it
thanks a lot

Right now experimenting with your superb example on
http://www.ccsinfo.com/forum/viewtopic.php?t=54739&highlight=1msec

thanks again
jujoba
Ttelmah



Joined: 11 Mar 2010
Posts: 19541

View user's profile Send private message

PostPosted: Tue Oct 31, 2017 9:07 am     Reply with quote

You can also do multiple servos 'sequentially' using this approach.

I did a version using the CCP interrupt here:

<http://www.ccsinfo.com/forum/viewtopic.php?t=50914&highlight=servo>
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