Writing to serial LCD

Hi,

I’m trying to display data to a sparkfun Serial LCD. I’m using a HCS08 (sorry but there wasn’t a S08 group on sparkfun so posted here), running at 8Mhz on 3.6V.

The LCD is hooked up to a 5V supply but the RX pin is connected to the S08 at 3.6V directly.

I’ve set up the baud rate to be around 9600 and am trying to send the 0x01 command to the lcd to clear the screen but nothing seems to happen, the screen shows a bunch of test characters all the time.

The LCD works because I can see the splash screen while it starts up!

I also try to write a ‘hello’ string to the LCD and everyonce in a while I see it, but for the most part I get 5 junk chars whose position keeps changing everytime. I’m not writing any control chars for changing position so I don’t know why thats happening.

I also know that the data going across is valid because I can see it on a logic analyzer that is decoding serial data at 9600 baud.

Any idea what might be up?

here’s the code:

SCIStartTransmit(0x01);
delay_sec(1);
SCIStartTransmit('h');
SCIStartTransmit('e');
SCIStartTransmit('l');
SCIStartTransmit('l');
SCIStartTransmit('o');


void SCIStartTransmit(char cData)
{
	while (!SCIS1_TDRE) { // ensure Tx data buffer empty
	}
	SCID = cData; // load data to SCI2 register
	while (!SCIS1_TC) { // wait for Tx complete
	}
}

Okay… solved part of the problem…

I hadn’t tied the two grounds together, once I did that I started getting the exact output strings I was sending.

However : if I send control chars to the LCD i.e.

0xFE and 0x01 (to clear the screen, I just get some junk chars, it doesn’t clear the screen)

same thing for 0x80 + 0x01 (to print the string at a given position.)

any ideas?

Well…I’m pretty sure you need 5v on the LCD. 3.6v is pushing it.

well i am using 5v to power the thing, just rx is driven by a 3.6v source which is well above the 2.5v threashold.

also it obviously works because I do get data across only can’t format it exactly right.

Hi,

I’m getting back to this problem after a while… I’m still having problems showing data on the serial LCD.

to recap briefly :

HCS08 serial port, TX line, sending data at 38000 baud. I see data on the LCD but it doesn’t seem to persist, as soon as that instruction (SerialTransmit) is through the data dissapears from the screen, also the data doesn’t seem to get displayed on the right coordinates and just randomly appears anywhere.

Any idea how to solve this?