OP7100
76 Graphics Programming
Initialization
The OP7100, unlike most other Rabbit Semiconductor 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.
Summary of Contents for OP7100
Page 1: ...OP7100 Serial Graphic Display User s Manual 019 0065 070831 O ...
Page 10: ...OP7100 x About This Manual ...
Page 16: ...OP7100 16 Overview ...
Page 74: ...OP7100 74 Software ...
Page 82: ...OP7100 82 Graphics Programming ...
Page 88: ...OP7100 88 Installation ...
Page 98: ...OP7100 98 Specifications ...
Page 108: ...OP7100 108 Memory I O Map and Interrupt Vectors ...
Page 112: ...112 Serial Interface Board 2 OP7100 ...
Page 113: ...OP7100 Backup Battery 113 APPENDIX E BACKUP BATTERY ...
Page 116: ...OP7100 116 Backup Battery ...
Page 124: ...OP7100 124 Index ...
Page 126: ...XX0000 Schematics ...