it is a simple task. especially when using the UART.
- first of all , make your M8 slave controlling the LCD.
- then you need to have some protocol to control the LCD. For example to clear the screen with CLS you need to send some character that you would not use.
- use buffered serial input with some buffer in order not to loose data or use some handshake.
simple sample:
[code:1:16bb64fcfa]dim b as byte
do
b=waitkey() 'wait till master send data
select case b
case 2 : CLS ' master send chr(2) to clear screen
case 3 : HOME ' master send chr(3) for home
case else 'normal data
lcd (chr(b)) 'just send data
end select
'if you want a handshake you could send some confirmation back like : print "#" ;
loop
[/code:1:16bb64fcfa]
you could also use SPI (see spi slave) or TWI.
↧