View previous topic :: View next topic |
Author |
Message |
goranst
Joined: 13 Mar 2011 Posts: 4 Location: Skopje, Macedonia
|
problem with #FUSES CCP2E7 |
Posted: Sun Mar 13, 2011 5:29 pm |
|
|
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
|
|
Posted: Mon Mar 14, 2011 11:38 am |
|
|
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
|
|
Posted: Mon Mar 14, 2011 6:17 pm |
|
|
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
|
|
Posted: Mon Mar 14, 2011 6:59 pm |
|
|
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 |
|
|
|
|