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

16F877A eeprom problem

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



Joined: 28 May 2009
Posts: 2

View user's profile Send private message

16F877A eeprom problem
PostPosted: Wed Jun 03, 2009 5:03 pm     Reply with quote

Hello everyone,
I have been focusing on a simple project that gets the values from the keypad and saves them to the eeprom. However, when the value reaches decimal 255, I can not save the value. Do you recommend any way?
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Wed Jun 03, 2009 5:20 pm     Reply with quote

A value of 255 shouldn't be a problem, see also the example program ex_intee.c

Values larger than 255 don't fit into a byte and here you have to cast the address pointer to an int8 pointer. See the chapter 'How do I write variables to EEPROM that are not a byte?' in the CCS manual, page 306.
mucittin



Joined: 28 May 2009
Posts: 2

View user's profile Send private message

PostPosted: Wed Jun 03, 2009 5:52 pm     Reply with quote

Thanks in advance...
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