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

function erase_eeprom() in PIC18F4680

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



Joined: 02 Feb 2011
Posts: 4

View user's profile Send private message

function erase_eeprom() in PIC18F4680
PostPosted: Wed Feb 02, 2011 4:11 pm     Reply with quote

Hi!!
I am doing a program for PIC18F4680 and need to erase storage addresses of the EEPROM, I want to use the function erase_eeprom (address) but the PIC COMPILER C does not recognize me.

And it shows me the following mistake: Error 12 "can_rutinasCCS.c" Line 169(13,14): Undefined identifier -- erase_eeprom

Why does this happen? And How does it solve?

Thanks!!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 02, 2011 4:56 pm     Reply with quote

It doesn't apply to the 18F4680. The CCS manual says it only works
with PICs that are supported by the PCB compiler (18F4680 uses the
PCH compiler). From the manual:
Quote:

erase_eeprom( )

Syntax: erase_eeprom (address);
Parameters: address is 8 bits on PCB parts.
Returns: undefined
Function: This will erase a row of the EEPROM or Flash Data Memory.
Availability: PCB devices with EEPROM like the 12F519
Requires: Nothing
Examples: erase_eeprom(0); // erase the first row of the EEPROM (8
bytes)
Ttelmah



Joined: 11 Mar 2010
Posts: 19504

View user's profile Send private message

PostPosted: Thu Feb 03, 2011 3:27 am     Reply with quote

On the smaller devices, the EEPROM, is effectively a standard 'external' EEPROM, built onto the die, and has a row erase. The EEPROM on the larger chips, does an automatic erase on write, and doesn't have a separate erase instruction. It is also byte orientated (erasing just one byte), rather than having a row architecture.
So, no erase option, since the hardware doesn't offer it.
If you want to clear a location, you just have to write a null value to it. Remember though that it is the erase/write, which uses up a life cycle of the cell....

Best Wishes
proyectanteATE



Joined: 02 Feb 2011
Posts: 4

View user's profile Send private message

PostPosted: Thu Feb 03, 2011 4:36 am     Reply with quote

Thank you very much for the information!!!
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