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

v 5.108 typo in processor header file (PIC18F24Q10)

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



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

v 5.108 typo in processor header file (PIC18F24Q10)
PostPosted: Sun Jul 09, 2023 9:42 am     Reply with quote

I alerted CCS to this issue. Not sure if it exists in the latest version or not.

In PIC18F24Q10.h, line 961:
#define CWG_INPUT_PMW4 0x4000

Obviously it should be PWM4. Only reason I found this is that I migrated existing code developed on a different processor to this one, and the compiler complained about CWG_INPUT_PWM4 being undefined.
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Sun Jul 09, 2023 10:24 am     Reply with quote

No, that isn't an error.
What makes you think 'it should be PWM4'?.

This is to setup the waveform generator input to _use_ this PWM.

Understand that unlike most of the older chips where you setup the CCP
to generate the PWM's, this chip has a dedicated PWM module. Needs to
be setup with setup_pwm3 and setup_pwm4 (or with #use).
The chip only has PWM1 and PWM2 available with the CCP's.
PWM3 and 4 use the dedicated module. These are only PWM's, not CCP's,
so doesn't need to be told to be a PWM.

There are some configuration entries missing for PWM4 on your compiler,
so for example the timer gates and resets, and not all the DSM settings
are actually there, but the one you are pointing to is not an error.
newguy



Joined: 24 Jun 2004
Posts: 1907

View user's profile Send private message

PostPosted: Sun Jul 09, 2023 11:46 am     Reply with quote

No it's definitely an error. The line above it is:
#define CWG_INPUT_PWM3 0x3000

Those 2 lines from the other processor have both spelled as PWM.

....I think I know now where the confusion lays....

I'm not saying that the define should become solely PWM4, I'm saying they should correct the spelling to:

CWG_INPUT_PWM4 from CWG_INPUT_PMW4

Note the WM / MW order.
Ttelmah



Joined: 11 Mar 2010
Posts: 19495

View user's profile Send private message

PostPosted: Mon Jul 10, 2023 12:21 am     Reply with quote

Fair enough. PMW, not PWM.
Honestly just add your own define till they fix it.
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