OP7100
74
s
Graphics Programming
Initialization
The OP7100, unlike most other Z-World controllers, uses the maximum
I/O and memory wait states when
main()
gets control. The wait states can
be reduced to improve performance. The following statement sets up the
proper wait states for the standard OP7100 (using a 90 ns flash memory).
outport(DCNTL,(inport(DCNTL)&0xf)|0x60);
The graphic LCD can be set up by a simple function call to
op71Init();
This function initializes and starts the LCD controller before supplying
voltage to the LCD screen.
The backlight is controlled by
op71BackLight(int isOn)
. Pass zero to
turn off the backlight (default) or a non-zero value to turn on the backlight.
If you have an OP7100 equipped with software contrast control, call
op71SetContrast(unsigned level)
to change contrast. The range
of
level
is from 0 to 63. A level of 30 usually yields reasonable contrast
at room temperature.
Drawing Primitives
You can draw various objects on the LCD. Before doing any drawing,
specify the type of the "brush" by calling
op71SetBrushType(int
type)
. Four brush macros are supported:
GL_SET
sets the pixels as specified by the plot commands, but leaves
other pixels alone;
GL_CLEAR
clears the pixels as specified by the plot commands, but
leaves other pixels alone;
GL_XOR
toggles the pixels as specified by the plot command, but
leaves other pixels alone;
GL_BLOCK
forces the value of pixels in groups of eight vertical
pixels.
GL_BLOCK
is useful when speed is important, the current
pixels need to be overwritten, and the overwriting pixels are
aligned in eight-pixel rows.
Plot a Pixel
int op71PlotDot(int x, int y);
x
and
y
are the coordinates, the upper left corner is (0,0).
Figure 3-8 shows the coordinate system for the LCD pixels.
$
Содержание OP7100
Страница 1: ...OP7100 Serial Graphic Display User s Manual 019 0065 020418 J ...
Страница 10: ...OP7100 x s About This Manual ...
Страница 16: ...OP7100 16 s Overview ...
Страница 50: ...OP7100 50 s Hardware ...
Страница 51: ...OP7100 Software s 51 CHAPTER 4 SOFTWARE Chapter 4 describes the Dynamic C functions used with the OP7100 ...
Страница 72: ...OP7100 72 s Software ...
Страница 80: ...OP7100 80 s Graphics Programming ...
Страница 86: ...OP7100 86 s Installation ...
Страница 96: ...OP7100 96 s Specifications ...
Страница 110: ...110 s Serial Interface Board 2 OP7100 ...
Страница 111: ...OP7100 Backup Battery s 111 APPENDIX E BACKUP BATTERY ...
Страница 114: ...OP7100 114 s Backup Battery ...
Страница 122: ...OP7100 122 s Index ...