[caption id="attachment_1183" align="alignnone" width="1108"]

LCD1602A接线图(4位)[/caption]
[codesyntax lang="cpp"]
/**
* VSS GND
* VDD 5V
* V0 GND
* RS 12
* RW 11
* E 10
* D4 9
* D5 8
* D6 7
* D7 6
* A V5
* K GND
* from http://surenpi.com
* created 2015/3/23
*/
int LCD1602_RS=12;
int LCD1602_RW=11;
int LCD1602_EN=10;
int DB[] = { 6, 7, 8, 9};
char str1[]="Welcome to";
char str2[]="surenpi";
char str3[]="find me";
char str4[]="surenpi.com";
void LCD_Command_Write(int command)
{
int i,temp;
digitalWrite( LCD1602_RS,LOW);
digitalWrite( LCD1602_RW,LOW);
digitalWrite( LCD1602_EN,LOW);
temp=command & 0xf0;
for (i=DB[0]; i <= 9; i++)
{
digitalWrite(i,temp & 0x80);
temp <<= 1;
}
digitalWrite( LCD1602_EN,HIGH);
delayMicroseconds(1);
digitalWrite( LCD1602_EN,LOW);
temp=(command & 0x0f)<<4;
for (i=DB[0]; i <= 9; i++)
{
digitalWrite(i,temp & 0x80);
temp <<