November 2015 19
SHARPENING YOUR TOOLS OF CREATIVITY
the ASCII “end of text” character
(etx), which has an ASCII value
of 3. The if/then statement
tests each retrieved character. If
it’s the etx character, then the
exit command immediately
terminates the do/loop. We can
actually use any value we want
for this purpose, as long as it’s
between 0 and 31. The reason is
that ASCII values 32 and above
represent printable characters. If
we were to use a value greater
than 31, a character in our
text string could prematurely
terminate the retrieval process.
There’s one final point (unrelated
to our upcoming data-logging
project) that I want to mention.
We’re currently focusing on storing
and retrieving real time data so that
it can be charted in Excel on a PC.
However, the technique we just
discussed in the final example of the
FRAMtest.bas program can also
be used to transmit stored data to
an LCD. As a result, FRAM storage
can be a powerful technique for any
PICAXE project that relies heavily on
displaying data on an LCD.
For example, we could write a
PICAXE program that stores every
phrase we could conceivably want to
display on the LCD (terminated with
an “end of text” marker) in the FRAM,
and note the starting location of each
phrase. A fairly complex program
could require a significant amount
of stored data, so including a FRAM
in such a project would free up a
considerable amount of memory in
the PICAXE processor.
We’re once again out of space,
so that’s it for now. Next time,
we’ll use what we’ve learned about
PICAXE-PC communication and
FRAM data storage to develop an
08M2-based data-logging project.
See you then … NV
n FIGURE 10. Complete eight-bit FRAM address.