View previous topic :: View next topic |
Author |
Message |
medielectro
Joined: 06 Nov 2012 Posts: 1 Location: India
|
CCS PCM error messages |
Posted: Tue Nov 06, 2012 3:40 am |
|
|
With CCS PCM I have written a program for 16F1823. A portion of the code is as below:
Code: |
typedef union
{
_SetupValues values;
unsigned char pointer[sizeof(_SetupValues)];
} SetupValues;
SetupValues setupValues;
|
It give an error message:
*** Error 31 "main.c" Line 49(13,24): Identifier is already used in this scope
The bit declaration
Code: | bit convertPanel, panelGood, timeOut, newAdcResult, doPanelOnly; |
is giving error message:
*** Error 48 "main.c" Line 63(5,8): Expecting a (
The internal SFRs are also not recognized.
*** Error 12 "main.c" Line 109(7,12): Undefined identifier EEADR
I have included the following lines in my code:
Code: |
#device PIC16F1823
#include <16F1823.h>
|
_________________ Medi
39/2067 Manikiri Cross Road
Cochin. INDIA |
|
|
Mike Walne
Joined: 19 Feb 2004 Posts: 1785 Location: Boston Spa UK
|
|
Posted: Tue Nov 06, 2012 3:55 am |
|
|
Post the SHORTEST possible complete compilable code which gives the same errors.
Don't forget compiler version No.
Error codes don't always relate to the line No. they pick out. Often the error is being caused by something earlier in the code.
Mike
EDIT See CCS forum guidelines. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
|
|
Posted: Tue Nov 06, 2012 4:24 am |
|
|
#case
By default CCS is set to be case insensitive. So 'SetupValues' is the same as 'setupValues'.
The SFR's are only identified if you tell it to load them. So (for instance):
#byte EEADR=("SFR:EEADR")
Reason is that there is almost no need to ever use these in CCS. You have pre-written functions (in the case of the eeprom, read_eeprom, and write_eeprom), which do all the work for you.
On the bit declaration, almost certainly an earlier problem.
Best Wishes |
|
|
|