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

HEF???

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



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

HEF???
PostPosted: Mon Apr 27, 2015 8:31 am     Reply with quote

Hi Guys,

What in the world happened to EEPROM?

As i understand it this "HEF" is just plain program memory or is it something else?

i guess i have to separate a block to use it like an EEPROM?
How? how do i not select areas used by my program? how do i know how much is left? can i access single bytes? or do i need to write whole pages?

i have to use the regular predefined CCS program memory write/read instructions?

Examples?

WHY on earth would HEF be a better option than just EEPROM

Thanks
G.
_________________
CCS PCM 5.078 & CCS PCH 5.093
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

quoting Microchip
PostPosted: Mon Apr 27, 2015 10:43 am     Reply with quote

Quote:

FLASH VS. EEPROM
Both the high-endurance Flash and the regular Flash
memory arrays differ from a data EEPROM module in
two important ways:
a) Data must be manually erased before a
write and this can be performed only in
blocks (referred to as rows) of a fixed size
determined by the Flash array inner design.
b) Writing to Flash stalls the MCU for a few
milliseconds (see parameter D123 in
Table 1).
By contrast, true data EEPROMs are designed to allow
byte-by-byte erase and do not stall the MCU execution
during a write cycle, although, for simplicity reasons,
most applications will include a delay loop to ensure a
(byte) write has been completed before the next one
can be initiated.


the main benefit is faster write of blocks of data.
and you already know the main drawback. Very Happy Very Happy Very Happy
temtronic



Joined: 01 Jul 2010
Posts: 9243
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Apr 27, 2015 10:46 am     Reply with quote

I just had a quick read of the microchip appnote and do NOT like the 'stall during write' issue. Seem the PIC will 'STOP EVERYTHING' until a write to HEF is completed !
Um, that is NOT a good 'feature', in my opinion !!!

Bound to be other 'issues' though the 8bit bytes organization is nicer than the 14bit for EEPROM ..but.... STALLING !!!!

arrgh....

Maybe someone can post a VALID reason ??

Jay
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Mon Apr 27, 2015 11:40 am     Reply with quote

I think the key is that for most uses involving storing values, a lot more space is needed than the internal EEPROM offers, so the expectation is that people wanting to store very much, will add an external I2C EEPROM.

Internal EEPROM involves a lot of transistors, using slightly different structures to the rest of the PIC, so it is a lot cheaper to just increase the size of the flash. The HEF sections are implemented using the bulkier and slightly more expensive SLC technology, also with thicker substrate to increase the cycle life. The stall is the killer for many applications. I have posted a simplified 're-use' emulation to reduce the number of cycles used to emulate a small EEPROM area, and for something like calibration factors only updated at a known point in the code, where the stall can be lived with, this works OK.

Generally the key to PIC designs is that they are produced initially for a 'market'/customer, and for the lowest possible price. Unfortunately EEPROM inside the chip is not seen as very markettable. Most units allowing you to change settings are happy to stop for a few moments when the write takes place.
Gabriel



Joined: 03 Aug 2009
Posts: 1067
Location: Panama

View user's profile Send private message

PostPosted: Mon Apr 27, 2015 12:14 pm     Reply with quote

Im doing a simple logger function to add to my GSM code...
Basically im recording ONE DS18B20, ONCE an hour as per the application requirements... its "nice to have" feature.

But with this HEF stuff... i think im just gonna go with regular RAM and call it a day... and get battery backup for the system.

just when i started to like PIC18 stuff...i find this.

Thanks for all your input. im glad to see im not the only one not feeling so awesome about this.


G.
_________________
CCS PCM 5.078 & CCS PCH 5.093
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Mon Apr 27, 2015 1:15 pm     Reply with quote

On the PIC18's, a lot do have EEPROM. Look at chips like the x6K40, and the K22 chips.

The parametric tool at Microchip is your friend. Select all PIC18's, and the 'All parametric chart features', then select the 256EEPROM, or the 256EEPROM/HEF options, and whatever else you want in the chip. There are models where the only option is HEF, but for 99% of applications something similar is available with EEPROM.

Looking at your original post, I see you are using the Ethernet chips. These are about the only ones where an EEPROM version is not available.

On your questions about how to use the flash, search back here. As I said, I posted routines to use a sub page of FLASH, and automatically put multiple ones into a single page of flash memory, only a few weeks ago. These routines also show how you handle the memory (in terms of telling the compiler not to use it etc..).

It's here: <http://www.ccsinfo.com/forum/viewtopic.php?t=53690>

Just select the page that supports HEF to use. Be aware that the high endurance feature is usually only the low byte in the word, and if you are not updating at all often, you may need a larger area than this.
dyeatman



Joined: 06 Sep 2003
Posts: 1934
Location: Norman, OK

View user's profile Send private message

PostPosted: Mon Apr 27, 2015 3:32 pm     Reply with quote

Why not FRAM?
_________________
Google and Forum Search are some of your best tools!!!!
Ttelmah



Joined: 11 Mar 2010
Posts: 19539

View user's profile Send private message

PostPosted: Tue Apr 28, 2015 1:08 am     Reply with quote

I too love FRAM, but it means adding an external chip.

The point being asked, was about the internal options.
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