[s1mp3-dev] RES: LCD Port from FW
Chris Double
chris.double at double.co.nz
Mon Sep 18 21:52:26 CDT 2006
On 9/19/06, Mateus Del Bianco <mateus at delbianconet.com.br> wrote:
> what you need is the port, the other lcd pin to set the lcd to accept the
> incoming byte as a command or as data...
So if the port is F4, and the bit controlling whether it is data or
cmd is bit 2 then the following tells the LCD that it should be in
command mode:
in a,(0xf4)
and 0xfb
out (0xf4),a
the 'and 0xfb' sets bit 2 to 0 = command mode. To set to data mode:
in a,(0xf4)
or 0x04
out (0xf4),a
This sets bit 2 to 1 = data mode.
In command mode, you write to memory address 0x8000 with the command:
ld a,0x00
ld (0x8000),a
In data mode you write to memory adress 0x8001 with the data:
ld a,0x00
ld (0x8001),a
I assume the cursor position that the data is displayed at is
automatically updated when 0x8001 is written to?
Does that sound right?
Chris.
--
http://www.bluishcoder.co.nz
More information about the s1mp3-dev
mailing list