SGX-120L User Manual, rev2.0
Page 14 of 21
http://www.seetron.com/sgxmnl.htm
2002-11-13
(X)fer Screen to EEPROM (ESC X n)
Transfer the current screen contents to EEPROM screen n, where n is in the range 0-16. This instruction
may be disabled by the EEPROM-protect configuration setting, written by ESC W above. If this is the
case, ESC X has no effect. To display a screen that has previously been stored in EEPROM, use ESC E.
Be careful with XFERS since EEPROM screens 0 and 1 contain the font bitmaps used to display text. If
you accidentally overwrite these images, text may change to hieroglyphics! You will have to restore the
fonts from the included starter disk.
Note:
The G12032's EEPROM can be rewritten at least 1 million times, and read an unlimited number of
times.
Painless Graphics Primer
Here is a quick rundown on the operating principles of the display.
Digital Ink.
The LCD is a visible piece of memory. Each pixel is a bit in memory. The color of a pixel is
controlled by the state of the corresponding bit:
0 = white 1 = black
Coordinate System.
Memory starts at the upper-lefthand corner of the display with memory address 0.
Byte addresses are numbered sequentially from 0 to 479 left to right and top to bottom. The figure below
shows how rows of bytes in address order correspond to four horizontal stripes of 120 bytes apiece. The
magnified portion of the drawing shows the byte located at xy coordinate 0,0. (In keeping with
mathematical tradition, x is the horizontal coordinate and y is the vertical.) That byte contains 10011111
binary or 159 decimal.
Figure 5. Screen Layout.
The other way to look at the screen is as individual pixels. The only difference from the byte point of view
is the vertical (y) coordinate ranges from 0-31 instead of 0-3. In other words, the screen coordinates for
individual pixels ranges from 0,0 at the upper left corner to 119,31 at the lower right.
The ESC V instruction allows you to flip the vertical coordinates upside down, so that coordinate 0,0 is at
the lower left corner of the screen and 119,31 is at the upper right. ESC V does not affect the byte
coordinate system used with ESC A and ESC B.
Mode Logic.
When the G12032 plots points or lines on the screen, it be asked to draw over previously
drawn pixels. Using the mode command you can set the logic it uses to determine how to combine new
and old pixels:
OR (mode 0) Turns white pixels black; black pixels remain black.
XOR (mode 1) Turns white pixels black; black pixels white.
Creating and Downloading Bitmap Fonts and Graphics
The G12032 lets you create and download your own text font and graphics screens. Its 8kB of EEPROM