View previous topic :: View next topic |
Author |
Message |
TYSCSTOM
Joined: 03 Jun 2010 Posts: 8 Location: Houston
|
INTERNAL EEPROM EXAMPLE |
Posted: Thu Jun 03, 2010 2:07 pm |
|
|
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
|
|
Posted: Thu Jun 03, 2010 5:27 pm |
|
|
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
|
|
Posted: Fri Jun 04, 2010 1:01 pm |
|
|
I have done the same, but still have compiler issues.
I am not using MPLAB though. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Fri Jun 04, 2010 2:25 pm |
|
|
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
|
|
Posted: Sun Jun 06, 2010 6:33 pm |
|
|
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
|
|
Posted: Sun Jun 06, 2010 7:24 pm |
|
|
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
|
|
Posted: Mon Jun 07, 2010 12:17 pm |
|
|
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
|
|
Posted: Mon Jun 07, 2010 12:51 pm |
|
|
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. |
|
|
|