Data (words) from eeprom

Rickg1

New Member
In the datalog building software it puts "data" in the eeprom memory ( light,temp, and name of program). I can get the letters of these words out and display them a letter at a time. How do I get the whole word out to display the whole thing. I have no idea on how to do this. Thanks Guys
 

westaust55

Moderator
I believe you are talking about strings of characters (as opposed to word variables).

You want to retrieve “Hello” as a word rather than “H”, then “e”, “l”, “l” and finally “o”.

The PICAXE variant of BASIC does not include support for string variables.

I suspect the closest you could get is to have each word start on a given boundary, say every 8 bytes/characters and then have a subroutine that when passed a value (e.g. 7) would then go to that word boundary/start and read out the 8 byte group of characters one at a time for display on a screen.
 

AllyCat

Senior Member
Hi,

Yes, in many computer languages your "Words" are called a "String" or "Array" (of ASCII characters) but as Westy says, these are not supported directly by PICaxe Basic. Except within "printing" commands such as SERTXD and SEROUT where the string can be written within Quotation marks, e.g. SERTXD("Light").

However, it's easy to write a Subroutine to send the individual (ASCII) characters to the display. The subroutine needs a "pointer" (variable) to the address of the first character, and also an indicator of how many characters to send! That might be another variable specifying the length (or the end address) or by a "Terminator" byte placed between the separate strings, for example a zero byte (not the ASCII character for zero) or CR, LF, TAB, etc.. Then the subroutine loop would read and send characters to the display until the Terminator is encountered and then RETURN.

Cheers, Alan.
 
Top