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

Using program memory as NVR

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



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

Using program memory as NVR
PostPosted: Tue Jun 29, 2010 6:48 am     Reply with quote

Hi,

I was wondering if anyone has implemented a set of functions to write and read data to/from program memory on byte basis.

The values will be initially set using the #rom directive at a specific address let's say 0x10000 on PIC18F87J11 (erase block = 1024, write block = 64)

I just don't wanna re-invent the wheel.
I tried to search for something similar, I couldn't find any.

Thanks
Ttelmah



Joined: 11 Mar 2010
Posts: 19498

View user's profile Send private message

PostPosted: Tue Jun 29, 2010 8:23 am     Reply with quote

CCS has basic I/O functions for the program memory (read/write_program_memory).
There are also functions to allow variables to be directly handled from a memory source like this (addressmod).
Remember the write life is very limited (you can 'kill' a typical chip in under a minute, by repeatedly writing...). The EEPROM, has longer write life (typically at least 10*). Still the same problem, but 'better'.
So, provided the data is only changed very rarely, this is a perfectly reasonable thing. otherwsie though 'look elsewhere'. Things like external FRAM, can be implemented with only a couple of pins, and are much faster on write, with almost infinite life...

Best Wishes
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Tue Jun 29, 2010 10:29 am     Reply with quote

Have a look at Microchip AN1095. I implemented it for PIC24, it's working fine.
PICoHolic



Joined: 04 Jan 2005
Posts: 224

View user's profile Send private message

PostPosted: Wed Jun 30, 2010 2:00 am     Reply with quote

Hi

I've seen the built-in functions.
I'm aware of the limited write life of the flash.
The PIC18F87J11 does not have EEPROM.

I'll be probably adding an external EEPROM 24FC512 instead.
But it's worth trying the program memory as well.

Thanks
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