September
1999, Issue 110
Get
Smart Media(Part
1):
What's
It All About?
FILL'N
IT UP
I
dont know about yours, but my concept of erasing
something is getting rid of everything. With memory
devices, however, erasing is filling each memory cell
with 1s.
This
is more like charging than it is erasing memory. And
when it comes to programming, you need only worry about
cells that need to be 0. Merely poke a hole in the bottom
of each appropriate cell and let the unwanted 1 drain
out.
Since
a block (16k) is the smallest portion of the SmartMedia
that can be erased at one time, only addresses A14Axx
are needed. Following the command byte 60H, only
two address bytes (or three for SmartMedia greater than
32 MB) need to be passed.
But
erasing will not commence automatically unless the command
0D0H follows the previous command and address bytes,
which prevents unintentional erases. You can read the
status to determine when the erasure has completed and
whether or not any erasure errors were discovered.
Writing
to the SmartMedia is similar to erasing a block. Writing,
however, is handled on a page basis. Like reading, you
may start anywhere within the page. The pointer is A0A7
(the first address byte) with the A8 bit being the least
significant bit of the command, in this case 80H (or
81H).
Following
the rest of the address, A9Axx (which selects
the page and block), there is an "are you sure"
command necessary as with erasing. This command byte,
10H, begins the page programming process. And,
as with erasing, you can read the status to determine
when the programming has completed and whether or not
any program errors were discovered.