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

INTERNAL EEPROM EXAMPLE

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



Joined: 03 Jun 2010
Posts: 8
Location: Houston

View user's profile Send private message

INTERNAL EEPROM EXAMPLE
PostPosted: Thu Jun 03, 2010 2:07 pm     Reply with quote

This is my first time using the internal eeprom functions in CCS.
I have tried the EX_INTEE and tried to compile with the following errors.

Undefined identifier read_eeprom
Undefined identifier write_eeprom

I am using PCD 4.083 with target PIC18F4610

Any ideas?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jun 03, 2010 5:27 pm     Reply with quote

I installed vs. 4.083 and made a new project called Ex_intee in MPLAB
and added the Ex_intee.c file to the project. It compiled with no errors.
TYSCSTOM



Joined: 03 Jun 2010
Posts: 8
Location: Houston

View user's profile Send private message

PostPosted: Fri Jun 04, 2010 1:01 pm     Reply with quote

I have done the same, but still have compiler issues.
I am not using MPLAB though.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Jun 04, 2010 2:25 pm     Reply with quote

I'm not sure I understand. Do you still have a problem ?
If you do, then post the details on it.
TYSCSTOM



Joined: 03 Jun 2010
Posts: 8
Location: Houston

View user's profile Send private message

PostPosted: Sun Jun 06, 2010 6:33 pm     Reply with quote

Yes, I still have a problem compiling.

This only happens when I change the target from 18f452 to 18F4610.

Just as you have done I copied and saved the EX_INTEE file under a new name and tried different targets with it.

I am running PCD 4.083

The following errors still occur when I change target to 18f4610..

*** Error 12 "TY_EX_INTEE.c" Line 74(42,43): Undefined identifier -- read_eeprom
*** Error 12 "TY_EX_INTEE.c" Line 83(21,22): Undefined identifier -- write_eeprom
2 Errors, 0 Warnings.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Jun 06, 2010 7:24 pm     Reply with quote

I changed the #include for the PIC to 18F4610 and compiled it with
vs. 4.083. It compiles with no errors:
Quote:

Executing: "C:\Program Files\PICC\Ccsc.exe" "ex_intee.c" +FH +DF +LN +T -A +M +Z +Y=9 +EA
Memory usage: ROM=2% RAM=1% - 1%
0 Errors, 0 Warnings.
Loaded C:\Program Files\PICC\Examples\ex_intee.cof.
BUILD SUCCEEDED: Sun Jun 06 18:24:46 2010

I suggest that you re-install the compiler.
TYSCSTOM



Joined: 03 Jun 2010
Posts: 8
Location: Houston

View user's profile Send private message

PostPosted: Mon Jun 07, 2010 12:17 pm     Reply with quote

Silly Me,

The 18F4610 has no intermal eeprom!

So how could you have compiled with no eeprom for the read and write functions to point to????

The data EE start is still valid, there is just no bytes available.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 07, 2010 12:51 pm     Reply with quote

I just discovered my mistake. The Ex_intee.c file has several #if defined
statements, to select the correct PIC based on the compiler that is
selected. Somehow when the project was setup on my PC, it was set
for the PCM compiler. So even though I typed in 18F4610, and it
appeared to compile OK, it was really compiling for the 16F877, and I
just didn't notice it. That was my mistake. I'm going to watch that in the
future.
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