I working in a school project and I need to print two informations on the LCD.
First line: TARGET: (value entered by the user) PSI
Second line: MEASURED (value measured) PSI.
The code is working as desired when I use the putty to check the results. However, when I connect the LCD, the text keep scrolling and I can't read it properly. I found at the LCD manual the control character and commands to set the cursor position. My question is, how I can tell to the LCD microcontroller the information is a command and not a data to display? The printByte does not work.
I'm using the ATMEGA328P and LCD serial enabled 09395.
Follow a piece of my code:
printByte(0xFE); //control character from LCD manual
printByte(0x80); //Set cursor position from LCD manual
printInt(pressure); //Pressure read PSI
printByte(0xFE); //control character
printByte(0xC0); //Set cursor position 1,0
printInt(pressureSet); //User pressure set
Thanks a lot for your attention.