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
}
}