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

problem with #FUSES CCP2E7

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



Joined: 13 Mar 2011
Posts: 4
Location: Skopje, Macedonia

View user's profile Send private message Visit poster's website

problem with #FUSES CCP2E7
PostPosted: Sun Mar 13, 2011 5:29 pm     Reply with quote

Hello everybody,

I am using CCS 4.065 and having difficulties with setting PIN_E7 as ECCP2 pwm pin on PIC18F87J50.

As I have seen on the forum, the setting should be as simple as adding #fuses CCP2E7 in the code, but this does not work.

I am using the plugin for MPLAB (MPLAB version 8.20), and every time I recompile it sets the CONFIG3H to 0xFF instead of 0xFE!

This happens even if I chose to manually set the configuration bits! Every time I press Build, MPLAB automatically changes my configuration bit.

Does anyone know how to solve this problem?
_________________
Goran Stojanovski

www.atronika.com
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 14, 2011 11:38 am     Reply with quote

I got the same result. I'm not sure what to do about it, except to set the
correct fuses manually in the config window for your programmer.

If you have the full IDE version of the compiler, it's possible that you
can use the Device Editor to modify the fuses. This screenshot (click
to enlarge) shows the fuses can be modified in the upper right corner
of the Device Editor window:
http://www.ccsinfo.com/content.php?page=ideoverview#device
goranst



Joined: 13 Mar 2011
Posts: 4
Location: Skopje, Macedonia

View user's profile Send private message Visit poster's website

PostPosted: Mon Mar 14, 2011 6:17 pm     Reply with quote

Thank you very much for the answer.

I did what you have suggested and now everything works fine.

By the way, what is the official way for pointing out a bug to CCS? This is a obvious one because the fuses CCP2C1 and CCP2E7 had the same mask and the same value! That is way the compiler could not never set the E7 as CCP2 pwm output.
_________________
Goran Stojanovski

www.atronika.com
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Mar 14, 2011 6:59 pm     Reply with quote

Your compiler version (4.065) is over 3 years old. The latest version
(4.119) doesn't have the problem, as shown below:

CCP2 on pin E7:
Code:

#include <18F87J50.h>
#fuses HS,NOWDT,CCP2E7
#use delay(clock=4000000)

//======================================
void main(void)
{

while(1);
}

Configuration Fuses:
   Word  1: F7AE   NOWDT PLL1 STVREN NOXINST NODEBUG NOCPUDIV NOPROTECT
   Word  2: FFC4   HS FCMEN IESO WDT32768
   Word  3: FEF8   EASHFT MCU BW16 NOWAIT CCP2E7 ECCPE PMPEMB MSSPMSK7


CCP2 on pin C1:
Code:

#include <18F87J50.h>
#fuses HS,NOWDT,CCP2C1
#use delay(clock=4000000)

//======================================
void main(void)
{

while(1);
}


Configuration Fuses:
   Word  1: F7AE   NOWDT PLL1 STVREN NOXINST NODEBUG NOCPUDIV NOPROTECT
   Word  2: FFC4   HS FCMEN IESO WDT32768
   Word  3: FFF8   EASHFT MCU BW16 NOWAIT CCP2C1 ECCPE PMPEMB MSSPMSK7
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