[9]?
?
Example?Initialization?Program?
??
/*************************************************************/?
/*************************************************************/?
void?write_command(unsigned?char?datum)?
{?
?A0=0;??????/*Instruction?register*/?
?E=1;??????/*Read?inactive*/?
?bus=datum;?????/*put?data?on?port?1*/?
?CSB=0;??????/*Chip?select?active*/?
?RW=0;??????/*Write?active*/?
?RW=1;??????/*Write?inactive;?latch?in?data*/?
?CSB=1;??????/*Chip?select?inactive*/?
}?
/*************************************************************/?
void?write_data(unsigned?char?datum)?
{?
?A0=1;??????/*DDRAM?data?register*/?
?E=1;??????????
?bus=datum;?
?CSB=0;?
?RW=0;?
?RW=1;?
?CSB=1;?
}?
/*************************************************************/?
void?lcd_init(void){????????????????????
????????write_command(0xA2);????????//ICON??OFF;?
????????write_command(0xAE);????????//Display?OFF?
?
????????write_command(0x48);????????//Set?Duty?ratio?
????????write_command(0x80);????????//No?operation?
????????write_command(0xa0);????????//Set?scan?direction?
????????write_command(0xc8);????????//SHL??select?
????????write_command(0x40);????????//Set?START?LINE?
????????write_command(0x00);?
????????write_command(0xab);????????//OSC?on?
?
????????write_command(0x64);????????//3x?
????????delay(2000);?
????????write_command(0x65);????????//4x?
????????delay(2000);?
????????write_command(0x66);????????//5x?
????????delay(2000);?
????????write_command(0x67);????????//6x?
????????delay(2000);?
?
????????write_command(Ra_Rb);???????//RESISTER?SET?
????????write_command(0x81);????????//Set?electronic?volume?register?
????????write_command(vopcode);?????//n=0~3f?
?
?
????????write_command(0x57);????????//1/12bias?
????????write_command(0x92);????????//FRC?and?pwm?
?
?
????????write_command(0x2C);?????????
????????delay(20000);//200ms?
????????write_command(0x2E);?????????
????????delay(20000);//200ms?
????????write_command(0x2F);?????????
相关PDF资料
NHD-C128128CZ-FN-GBW LCD MOD GRAPH 128X128 TRANSFL
NHD-C12832A1Z-FSB-FBW-3V3 LCD COG GRAPH 128X32 BLUE BKLT
NHD-C12832A1Z-FSR-FBW-3V3 LCD COG GRAPH 128X32 RED BKLT
NHD-C12832A1Z-FSW-FBW-3V3 LCD COG GRAPHIC 128X32
NHD-C12832A1Z-NSW-BBW-3V3 LCD COG GRAPHIC 128X32
NHD-C12864A1Z-FSB-FBW-HTT LCD COG GRAPH 128X64 BLUE BKLT
NHD-C12864A1Z-FSR-FBW-HTT LCD COG GRAPH 128X64 RED BKLT
NHD-C12864AZ-FSY-YBW-HT LCD COG GRAPH 128X64 Y/G TRANSFL
相关代理商/技术参数
NHD-C-128128BZ-FSW-GBW-3V-L 功能描述:LCD COG GRAPH 128X128 WH TRANSFL RoHS:是 类别:光电元件 >> 显示器模块 - LCD,OLED,图形 系列:NHD-C-128128BZ-F 标准包装:1 系列:* 其它名称:Q7143510
NHD-C-128128CZ-FN-GBW 功能描述:LCD COG GRAPH 128X128 NO TRANSFL RoHS:是 类别:光电元件 >> 显示器模块 - LCD,OLED,图形 系列:NHD-C-128128CZ-F 标准包装:1 系列:* 其它名称:Q7143510
NHD-C128128CZ-FN-GBW 功能描述:LCD 图形显示模块和配件 128 x 128 STN-GRAY 84.0 x 87.0 x 2.80 RoHS:否 制造商:ELECTRONIC ASSEMBLY 产品: 分辨率:128 x 64 流体类型:FSTN Positive 接口: 背光: 背景色:White 工作温度范围:- 20 C to + 70 C 封装:Bulk
NHD-C12832A1Z-FSB-FBW-3V3 功能描述:LCD 图形显示模块和配件 FSTN+ Blue 128x32 Transflective 3V RoHS:否 制造商:ELECTRONIC ASSEMBLY 产品: 分辨率:128 x 64 流体类型:FSTN Positive 接口: 背光: 背景色:White 工作温度范围:- 20 C to + 70 C 封装:Bulk
NHD-C12832A1Z-FSR-FBW-3V3 功能描述:LCD 图形显示模块和配件 FSTN+ Red 128x32 Transflective 3V RoHS:否 制造商:ELECTRONIC ASSEMBLY 产品: 分辨率:128 x 64 流体类型:FSTN Positive 接口: 背光: 背景色:White 工作温度范围:- 20 C to + 70 C 封装:Bulk
NHD-C12832A1Z-FSW-FBW-3V3 功能描述:LCD 图形显示模块和配件 FSTN (+) Transfl 41.4 x 24.3 x 4.0 RoHS:否 制造商:ELECTRONIC ASSEMBLY 产品: 分辨率:128 x 64 流体类型:FSTN Positive 接口: 背光: 背景色:White 工作温度范围:- 20 C to + 70 C 封装:Bulk
NHD-C12832A1Z-NSW-BBW-3V3 功能描述:LCD 图形显示模块和配件 STN-BLUE Transm 41.4 x 24.3 x 4.0 RoHS:否 制造商:ELECTRONIC ASSEMBLY 产品: 分辨率:128 x 64 流体类型:FSTN Positive 接口: 背光: 背景色:White 工作温度范围:- 20 C to + 70 C 封装:Bulk
NHD-C12832AR-FSW-FBW-HTKP4 制造商:Newhaven Display International 功能描述: