Retrieving data from LCDX EEPROM

Started by merogman2004 November 12, 2011
I have been trying to put and retrieve data into the LCDX Eeprom. I have looked at many examples, guides and programs for doing that.
I have tried the Put/Get Eeprom, Persistent Peek/Poke and the NewPersistentType approach and nothing seems to work for the LCDX.
The following method is what I am currently using at module level:

Public Rt0 As New PersistentByte = 70
Dim Rt as Byte
Rt = RT0 ------ Compiler Syntax Error right here

I can't get past the Compiler
Can someone show me simple statements for accomplishing that goal on the LCDX?

Any help will be appreciated. Thanks

> ... Public Rt0 As New PersistentByte = 70

That's illegal syntax. Instead, use /If FirstTime/ to initialize the byte.

public Rt0 As new persistentbyte
sub main()
if FirstTime then
Rt0 = 70
end if
debug.print cstr(Rt0)
Rt0 = Rt0 + 1
end sub

The first execution should display 70 and each subsequent restart or
power cycle should increment it. Remember that persistent vars are
limited to 100000 or so, maybe 1million, writes - but reads are