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 support@ccsinfo.com

PIC16F84 -- saving data to memory?

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



Joined: 08 Jul 2005
Posts: 91

View user's profile Send private message

PIC16F84 -- saving data to memory?
PostPosted: Tue Jul 12, 2005 2:15 pm     Reply with quote

Hi all,

Just wondering if its possible to save data to a PIC16F84 for later viewing?

Thanks
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

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

PostPosted: Tue Jul 12, 2005 2:22 pm     Reply with quote

Yeah, it has a 64 byte eeprom. So yes.
weg22



Joined: 08 Jul 2005
Posts: 91

View user's profile Send private message

PostPosted: Tue Jul 12, 2005 2:46 pm     Reply with quote

I need to write 5 bytes of data (integers) to memory. Can you suggest a line of code to do so.

Also, how do you then view the data stored in memory? I'm guessing I just have to click on "read" in the MPLAB programmer interface?

Thanks again
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

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

PostPosted: Tue Jul 12, 2005 3:15 pm     Reply with quote

See the compiler manual for read_eeprom() and write_eeprom().

e.g.
unsigned int data_read;

data_read = read_eeprom(address);

Write:
write_eeprom(address, data);

Yeah you can read it with mplab's Read selection as well.
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