256128OLED屏USB串口屏测试程序
5寸低温液晶屏USB串口屏测试程序
#include
#include "sys.h"
#include "usart.h"
#include "spi.h"
#include "delay.h"
#include "lcd.h"
#include "TEST.h"
#include "CGRAM_TAB.h"
#include "zimo.h"
#include "picture1.h"
uc8 PLL=9; //系统时钟
/******************************************************************************************/
/***************************************** 主函数 *****************************************/
/******************************************************************************************/
void main()
{
u8 i;
u16 j;
u8 a,b;
Stm32_Clock_Init(PLL); //系统时钟设置
delay_init(8*PLL); //延时初始化
set(); //显示屏初始化
while(1)
{
clr(); //清屏
point(2,2,1);point(2,253,1);point(61,2,1);point(61,253,1); //绘点
matrix(16,16,16,63,1); //直线
matrix(32,40,56,40,1);
matrix(24,90,40,106,1); //方块
block(0,0,63,255,1); //方框
draw_circle(32,164,25,0,1); //空心圆
draw_circle(32,164,20,1,1); //实心圆
matrix(8,200,55,247,1); //方块
delay_ms(time); //*/
clr(); //清屏
show_line(0,0,63,255,1);
show_line(0,255,63,0,1);
block(0,0,63,255,1); //方框
delay_ms(time); //*/
clr(); //清屏
INTER_chhzes(0,0,16,16,16,0, "清达光电技术有限公司OLED模块");
INTER_chhzes(16,0,16,16,16,0," 256*64 DOT ");
INTER_chhzes(32,0,16,16,16,0,"012345+-*/。AHRUZ");
INTER_chhzes(48,0,16,8,32,0, " www.chinalcdmodule.com ");
/* for(i=0;i<32;i+=16) //光标显示
for(j=0;j<256;j+=16)
{
cursor(i+15,j,16,1);
delay_ms(c_time);
cursor(i+15,j,16,0);
} //*/
delay_ms(time); //*/
/*
for(j=0;j<0xff;j+=0x10) //对比度测试
{
write(0x52); //Set Contrast Current
write(j);
delay_ms(time/4);
}
write(0x52); //Set Contrast Current
write(0xff);
delay_ms(time/4);
write(0x52); //Set Contrast Current
write(0x80); //*/
clr(); //清屏
INTER_chhzes(0,0,16,8,32,0,CHHZ21);
INTER_chhzes(16,0,16,8,32,0,CHHZ22);
INTER_chhzes(32,0,16,8,32,0,CHHZ23);
delay_ms(time); //*/
clr(); //清屏
INTER_chhzes(0,0,8,8,32,0,CHHZ21);
INTER_chhzes(16,0,8,8,32,0,CHHZ22);
INTER_chhzes(32,0,8,8,32,0,CHHZ23);
delay_ms(time); //*/
clr(); //清屏
for(i=0;i
delay_ms(time); //*/
clr(); //清屏
for(i=0;i
for(i=0;i
for(i=0;i
delay_ms(time); //*/
clr(); //清屏
graph(4,20,28,88,picture8828); //图片
graph(32,21,28,88,picture8828);
delay_ms(time); //*/
/* clr(); //清屏
graph(0,0,64,255,picture25664); //图片
delay_ms(time); //*/
}
} //*/