SSD1963示例程序
data=sdata<8;
sdata|=DataPortL;
SetSSD1963RD();
SetSSD1963CS();
SFRPAGE = CONFIG_PAGE;
P1MDOUT=0xff;//设置为 上拉 输出 。
P2MDOUT=0xff;
SFRPAGE = SFRPAGE_save; // Restore the SFRPAGE
return sdata;
}
uint GetPixel(uint Col,uint Page)
{
uint temp;
uint color;
SSD1963Command_8(0x2a); //设置行开始和结束的位置
SSD1963Da
SSD1963Da
temp=Col;
SSD1963Da
SSD1963Da
SSD1963Command_8(0x2b);
SSD1963Da
SSD1963Da
temp=Page;
SSD1963Da
SSD1963Da
SSD1963Command_8(0x2E);
color=GetSSD1963Da
return color;
}
void SetPixel(uint Col,uint Page,uint color)
{
uint temp;
SSD1963Command_8(0x2a); //设置行开始和结束的位置
temp=Col;
SSD1963Da
SSD1963Da
temp=Col;
SSD1963Da
SSD1963Da
SSD1963Command_8(0x2b);
temp=Page;
SSD1963Da
SSD1963Da
temp=Page;
SSD1963Da
SSD1963Da
SSD1963Command_8(0x2c);
// for(i=0;i<9;i++)
// {
SSD1963Da
// }
}
//初始化程序
void SSD1963Init()
{
//software reset
SSD1963Command_8(0x01);
Delay_Ms(400);
SSD1963Command_8(0x01);
Delay_Ms(400);
//enable pll
SSD1963Command_8(0xe0);
Delay_Ms(400);
SSD1963Da
Delay_Ms(400);
SSD1963Command_8(0xe0);
Delay_Ms(400);
SSD1963Da
Delay_Ms(400);
//pll: n= 34 m= 3
SSD1963Command_8(0xe2);
SSD1963Da
SSD1963Da
SSD1963Da
//dotclk setting
SSD1963Command_8(0xe6);
SSD1963Da
SSD1963Da
SSD1963Da
//panel setting
SSD1963Command_8(0xb0);
Delay_Us(100);
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
//pixel format
SSD1963Command_8(0x3a);
SSD1963Da
//hsync setting
SSD1963Command_8(0xb4);
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
//vsync setting
SSD1963Command_8(0xb6);
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
//col start_end
SSD1963Command_8(0x2a);
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
//row start_end
SSD1963Command_8(0x2b);
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Command_8(0x36);
SSD1963Da
//MCU IF setting
//SSD1963Command_8(13);
SSD1963Command_8(0xf0);
SSD1963Da
//SSD1963Command_8(0x35);
//display on
SSD1963Command_8(0x29);
SSD1963Command_8(0xbe);//设置PWM
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Command_8(0xD4);//(Define the threshold value)
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Da
SSD1963Command_8(0xd0);
SSD1963Da
// ReadSSD1963Set();
}
SSD1963示例程 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)