Arduino Mega 2560 + MAX 323 send command problem

Hi, all

I use Mega 2560+MAX323 to send command to control LCD monitor.
I send a "Turn On" command, code was listed below:

void setup()
{
Serial.begin(115200);
pinMode(13, OUTPUT);
}

void loop()
{
Serial.print(119, BYTE);
Serial.print(177, BYTE);
Serial.print(128, BYTE);
Serial.print(0, BYTE);
Serial.print(0, BYTE);
Serial.print(70, BYTE);
delay(10000);
}

I has a problem....
Command is working, but only under Mega2560 plugging USB to computer first time....
It's not working even if I press "Reset" button.

Is my coding syntax wrong?
BTW, if command is successful, LCD monitor will return 6 bytes message.
Should I clean the buffer?

Thank you.

Greg Lu

That code send characters to the PC over the USB connection.

Where is it that you talk to an LCD?


Rob

but only under Mega2560 plugging USB to computer first time...

That seems crucial to your problem but the words make no sense.
Do you mean it works with a PC monitor but not standalone?
How are you powering it stand alone?