View Full Version : Reading/writing arrays from eeprom to variables to lcdout
DDDvvv
- 29th August 2010, 01:55
Hi fellas. another salvo of questions if i may;
how do you write an array of 15 bytes onto eeprom memory? is there any other way other than the "for.....next" command?
is it possible to read this same array, and load it onto an lcd with a "lcdout" statement?
im trying to create an array of ascii characters that a user can change, to change the name of a menu item
thanks for reading.
Kamikaze47
- 29th August 2010, 15:30
how do you write an array of 15 bytes onto eeprom memory? is there any other way other than the "for.....next" command?
That depends if you need to change it during run time, or just set it at compile time.
If you want to change it during the running of the program you need a for..next and use the WRITE command. To set it at compile time you can just use the DATA command:
DATA @0,"s","t","r","i","n","g"," ","o","f"," ","a","s","c","i","i"
is it possible to read this same array, and load it onto an lcd with a "lcdout" statement?
Yes, with another for..next:
for address=0 to 14
READ address,asciichar
LCDOUT asciichar
next address
DDDvvv
- 29th August 2010, 17:28
thanks for the reply. i need to write at program time and to change the name at runtime.
for address=0 to 14
READ address,asciichar
LCDOUT asciichar
next address
is the variable "asciichar" an array, or just a single byte?
i was browsing around the forum and came across this line of code:
lcdout str variable\15
is this possible? and what about arrayread and arraywrite?
mackrackit
- 29th August 2010, 18:51
You may find these interesting
http://www.picbasic.co.uk/forum/showthread.php?t=544
http://www.picbasic.co.uk/forum/showthread.php?t=2444
And LCDOUT uses the same syntax as SEROUT2, check it out in the manual.
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.