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
Re: Writting Strings to External EEPROM
Posted: Wed Sep 10, 2003 11:41 am
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
Re: Writting Strings to External EEPROM
Posted: Wed Sep 10, 2003 1:21 pm
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.
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