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

Writting Strings to External EEPROM

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



Joined: 08 Sep 2003
Posts: 16

View user's profile Send private message

Writting Strings to External EEPROM
PostPosted: Wed Sep 10, 2003 10:50 am     Reply with quote

I need to make a menuing system to display on a 4x20 LCD. Instead of hard coding the menu I would like to store it on an external EEPROM. I have searched the group and have come up empty handed. As a test I would like to write "Hello World" to an External eeprom and read it back to a LCD. Is this possible?
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

Re: Writting Strings to External EEPROM
PostPosted: Wed Sep 10, 2003 11:41 am     Reply with quote

wmeade wrote:
I need to make a menuing system to display on a 4x20 LCD. Instead of hard coding the menu I would like to store it on an external EEPROM. I have searched the group and have come up empty handed. As a test I would like to write "Hello World" to an External eeprom and read it back to a LCD. Is this possible?


int8 String_Buffer[20]; // because is a x20 display
int8 String_Index; // because you want more than a single string
for(x=0;x<20;x++)
{ y=x+(String_Index*20)
String_Buffer[x] = read_EEPROM (y); // Move a byte from eeprom to RAM
}

I recomend using hard coding over this method because is saves parts.
wmeade



Joined: 08 Sep 2003
Posts: 16

View user's profile Send private message

Re: Writting Strings to External EEPROM
PostPosted: Wed Sep 10, 2003 1:21 pm     Reply with quote

Thanks for your reply. I am not worried as much about using more parts as I am about running out of memory when programming. The Menu is ratherextensive with three levels. This aproach seems simpler to incorporate that a hard coded menu system. I haven't been able to find any examples in the forum on setting up a menu system for an lcd in picc. I have done several in PBP, but C is a whole nother animal.

Neutone wrote:
wmeade wrote:
I need to make a menuing system to display on a 4x20 LCD. Instead of hard coding the menu I would like to store it on an external EEPROM. I have searched the group and have come up empty handed. As a test I would like to write "Hello World" to an External eeprom and read it back to a LCD. Is this possible?


int8 String_Buffer[20]; // because is a x20 display
int8 String_Index; // because you want more than a single string
for(x=0;x<20;x++)
{ y=x+(String_Index*20)
String_Buffer[x] = read_EEPROM (y); // Move a byte from eeprom to RAM
}

I recomend using hard coding over this method because is saves parts.
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