Hi!
sorry for my newbie question!
It is possible to use the serial LCD display with the uart3 of the adk board?
Is there some example?
Thank you
Hi!
sorry for my newbie question!
It is possible to use the serial LCD display with the uart3 of the adk board?
Is there some example?
Thank you
this should answer my question!
But I have another question:
Why I have to put the delay(150) even if the init is done?
If I remove that delay the display stay off.
[code]//Initialization Commands or Responses
#define SLCD_INIT 0xA3
#define SLCD_INIT_ACK 0xA5
#define SLCD_INIT_DONE 0xAA
//WorkingMode Commands or Responses
#define SLCD_CONTROL_HEADER 0x9F
#define SLCD_CHAR_HEADER 0xFE
#define SLCD_CURSOR_HEADER 0xFF
#define SLCD_CURSOR_ACK 0x5A
#define SLCD_RETURN_HOME 0x61
#define SLCD_DISPLAY_OFF 0x63
#define SLCD_DISPLAY_ON 0x64
#define SLCD_CLEAR_DISPLAY 0x65
#define SLCD_CURSOR_OFF 0x66
#define SLCD_CURSOR_ON 0x67
#define SLCD_BLINK_OFF 0x68
#define SLCD_BLINK_ON 0x69
#define SLCD_SCROLL_LEFT 0x6C
#define SLCD_SCROLL_RIGHT 0x72
#define SLCD_NO_AUTO_SCROLL 0x6A
#define SLCD_AUTO_SCROLL 0x6D
#define SLCD_LEFT_TO_RIGHT 0x70
#define SLCD_RIGHT_TO_LEFT 0x71
#define SLCD_POWER_ON 0x83
#define SLCD_POWER_OFF 0x82
#define SLCD_INVALIDCOMMAND 0x46
#define SLCD_BACKLIGHT_ON 0x81
#define SLCD_BACKLIGHT_OFF 0x80
void setup() {
Serial3.begin(9600);
Serial.begin(9600);
Serial3.write(SLCD_CONTROL_HEADER);
Serial3.write(SLCD_POWER_OFF);
Serial3.write(SLCD_CONTROL_HEADER);
Serial3.write(SLCD_POWER_ON);
Serial3.write(SLCD_INIT_ACK);
do
{
Serial.println(“init…”);
} while ((Serial3.available()>0)&&(Serial3.read()==SLCD_INIT_DONE));
Serial.println(“init done”);
delay(150);
Serial3.write(SLCD_CONTROL_HEADER);
Serial3.write(SLCD_BACKLIGHT_ON);
Serial3.write(SLCD_CHAR_HEADER);
Serial3.write(“Hello, World!”);
}
void loop() {
Serial3.write(SLCD_CONTROL_HEADER);
Serial3.write(SLCD_CURSOR_ON);
delay(1000);
Serial3.write(SLCD_CONTROL_HEADER);
Serial3.write(SLCD_CURSOR_OFF);
delay(1000);
}
[/code]
Hi,
Normally,we need some time to reset LCD.So the order “delay(150)” is used to reset.