规格
Ps
屏幕所有的单个像素点没有灰度
但整体亮度可以调节
通过如上的流程图
用汇编语言的对应指令写入
void OLED_DISPLAY_ON (void)
{
u8 buf[28] = {
0xae,//0xae is on, while 0xaf is off
0x00,0x10,//initial settings configuration(in double byte)
0xd5,0x80,//set the refresh rate Hz(display clock divide ratio that's set by setting oscillator frequency)
0xa8,0x3f,//set multiplex ratio,复用率?
0xd3,0x00,//set display offset,偏移?
0xb0,//写入行的位置(本显示器上对应的1到8行分别是0xb0 to 0xb7)
0x40,//在64*128的128中的哪一行开始
0xad,0x8b,//set charge pump,设置VCC电源
0xa1,//segment re-map
0xc8,//set command output scan direction
0xda,0x12,//set command pin hardware configuration
0x81,0xff,//set contrast ratio(对比度)
0xd9,0xf1,//set pre-charge period
0xdb,0x30,//设置VCC电压输出
//for some reason,VPP is neglect
0x20,0x00,//水平寻址
0xa4,//a4正常显示,a5全部点亮
0xa6,//a6正常显示,a7反色显示
//on this step, the chip will automatically clear the device
0xaf//directly turn the screen on or off, af is on ae is off};
I2C_SEND_BUFFER(OLED0561_ADD,COM,buf,28);//发送指令集
}
}