LCD Control
The LCD control operates on 2 addresses...
The second is used soully for writting data to the LCD driver, the first
is used to latch the address, as WELL as write data to the controller.
| Control code |
Description |
| 0x81 |
Set contrast, 64 possible values. 0x3F = black on
black 0x1F = black on white, 0x00 = white on white.
|
Example of using the LCD Driver to set
the contrast to 'optimal' color.
Example 1: mov XI, 0
mov X, 0x20FE
mov
X, 0x81
inc X
mov
X,
0x1F''
Example 2: (fast, but possibly unsafe method)
mov XI, 0
mov X, 0x20FE
mov
X, 0x81
mov
X, 0x1F
As you can see by the second example, writting a value to the
control address register also writes data. What ever address was last
latched will be written, so you can chain them. This is useful if you know
EXACTLY what the values will be, otherwise you can clobber LCD values. I'm
assuming that the driver only accepts commands from 0x80 and on, so be
careful when using this mode. The first example is is great for doing
things like LCD fades since you do not have to reload the address register
each time you want to change the contrast.
Return to
Pokemon
Mini specifications, or
Hardware
Registers.