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

EEPROM/Flash-Reading PIC Offline

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



Joined: 14 Mar 2007
Posts: 12

View user's profile Send private message ICQ Number

EEPROM/Flash-Reading PIC Offline
PostPosted: Fri May 11, 2007 3:12 pm     Reply with quote

Hello

I have a question about PIC Flash Memory.

What I want to do is to save some measurements to an array during my
operation.

I want to be independent of the computer serial port and I use

write_program_eeprom (addr, volt[i]) ;

in a loop to save my array.

Now I want to read my array without re-programming my PIC.

Because my USB programmer always re-writes EEPROM.

So for example; adding a READ_PROGRAM_EEPROM command would

not work since I would need to re-program my PIC to do that.


So can you recommend a solution?
bfmitch



Joined: 21 Aug 2004
Posts: 8

View user's profile Send private message Send e-mail

PostPosted: Fri May 11, 2007 3:50 pm     Reply with quote

For a project with a similar requirement I use a Datakey. You can see them at www.datakeyelectronics.com It's basically an EEPROM in a plastic carrier.

You also might check out using an SD disk. I use the uALFAT from GHI Electronics (www.ghielectronics.com). The advantage to that is you can write the data to the SD disk with your PIC and then plug the SD disk into a PC and read the data directly.
RossJ



Joined: 25 Aug 2004
Posts: 66

View user's profile Send private message

PostPosted: Fri May 11, 2007 6:34 pm     Reply with quote

It is typical for a programmer to read out the flash after programming as a means of verifying that the flash was written correctly. Usually it is possible to instruct the programmer to read the flash and save it to a file on disk (typically as a .hex file). Of course for this to work you must not set the protection fuses of the PIC. You can then use a text editor or MPLAB or something to access the data from that file. Thus, you can access the data without the need to write a new program to the PIC.

An alternative is to use an externall EEPROM (eg. 24LC256 is an I2C connected 32KB EEPROM). Drivers for accessing these kinds of chips are included with PIC-C.

Another option is to simply include both the generator and consumer programs on the flash from the start (if you have room), and select which one executes somehow (e.g. with a switch or jumper).
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