DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

NHD-0420E2Z-FSW-GBW 데이터 시트보기 (PDF) - Unspecified

부품명
상세내역
제조사
NHD-0420E2Z-FSW-GBW
ETC
Unspecified ETC
NHD-0420E2Z-FSW-GBW Datasheet PDF : 12 Pages
1 2 3 4 5 6 7 8 9 10 Next Last
Example Initialization Program
8-bit Initialization:
/**********************************************************/
void command(char i)
{
P1 = i;
//put data on output Port
D_I =0;
//D/I=LOW : send instruction
R_W =0;
//R/W=LOW : Write
E = 1;
Delay(1);
//enable pulse width >= 300ns
E = 0;
//Clock enable: falling edge
}
/**********************************************************/
void write(char i)
{
P1 = i;
//put data on output Port
D_I =1;
//D/I=LOW : send data
R_W =0;
//R/W=LOW : Write
E = 1;
Delay(1);
//enable pulse width >= 300ns
E = 0;
//Clock enable: falling edge
}
/**********************************************************/
void init()
{
E = 0;
Delay(100);
//Wait >15 msec after power is applied
command(0x30);
//command 0x30 = Wake up
Delay(30);
//must wait 5ms, busy flag not available
command(0x30);
//command 0x30 = Wake up #2
Delay(10);
//must wait 160us, busy flag not available
command(0x30);
//command 0x30 = Wake up #3
Delay(10);
//must wait 160us, busy flag not available
command(0x38);
//Function set: 8-bit/2-line
command(0x10);
//Set cursor
command(0x0c);
//Display ON; Cursor ON
command(0x06);
//Entry mode set
}
/**********************************************************/
[10]

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]