It looks like you are using the PICAXE 'Test program' on page 8 of the manual in your link as the basis for your program. Why did you leave out the first step?
init:pause 500 ‘ wait for display to initialise
main:serout 7,N2400,(254,128) ‘ move to start of first line
serout 7,N2400,(“Hello!123”) ‘ output text
end
Hi,
This thread was really helpful in solving the same problem for me, but there's a few key bits of info missing. So here goes..
I used an Arduino Mega 2560 and AXE033 16x2 Serial LCD
I used the "TX 18" pin on the Arduino Mega which is 'Serial1' (Serial 1,2,3 aren't available on all Ardunio boards)
You need an inverter on the Serial TX line between the Arduino and LCD (I used a 74LS04N that I had on hand) - The LCD is 2400, N, 8, 1 so the correct serial setup on the Arduino is 'Serial1.begin(2400,SERIAL_8N1);' which is also the default.
I put in a jumper bridging the RST connections on the LCD - not sure if it was necessary in the end
The LCD does not have any input buffering. This means the 1st char will get through and most of the rest will be rubbish. Solve this by sending a byte and then a 5msec+ delay. It means that you cant use the serial print commands to send a text string and have to use the serial write command to send it and individual bytes. This includes sending control commands. I didn't try the ability of the LCD to use stored strings. That may make a few things easier.
eg.
// For the AXE033 Serial LCD (16x2) you have to use an inverter (eg. 74LS04N) between the Arduino output and the LCD serial input pin.
const int comm_delay = 5; // the AXE033 Serial LCD doesn't have input buffering and needs a delay between bytes ... 5 msec or higher
int i;
String stringOne = "Hello";
int stringlength;
// clear screen
Serial1.write(254);
delay(comm_delay); // the AXE033 Serial LCD doesn't have input buffering and needs a delay between bytes
Serial1.write(1);
delay(comm_delay);
stringOne = "Hello There";
}
void loop() {
// move to 1st line
Serial1.write(254);
delay(comm_delay);
Serial1.write(128);
delay(comm_delay);
stringlength = stringOne.length();
for (int i=0; i <= stringlength-1; i++){
Serial1.write(stringOne.charAt(i));
delay(comm_delay);
}
}