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

CCS PCM error messages

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



Joined: 06 Nov 2012
Posts: 1
Location: India

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

CCS PCM error messages
PostPosted: Tue Nov 06, 2012 3:40 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Nov 06, 2012 3:55 am     Reply with quote

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: 19513

View user's profile Send private message

PostPosted: Tue Nov 06, 2012 4:24 am     Reply with quote

#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
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