/********************************************
OLED屏测试程序-STC&89C52
淘宝:http://cecsaler.taobao.com
*********************************************************/
#include "REG51.h"
#include "intrins.h"
#include "codetab.h"
#include "LQ12864.h"
/********************(STC12C5608AD 11MHZ z=1时精确延时1ms)*******************/
void delayms(unsigned int z)
{
unsigned int x,y;
for(x=z; x>0; x--)
for(y=1848; y>0; y--);
}
/*********************主函数************************************/
void main(void)
{
unsigned char i;
LCD_Init(); //oled 初始化
while(1)
{
Draw_BMP(0,0,64,8,BMP); //图片显示
LCD_P16x161Ch(64,3,0);
LCD_P16x161Ch(80,3,1);
LCD_P16x161Ch(96,3,2);
LCD_P16x161Ch(112,3,3);
LCD_P6x8Str(66,6,"MyDigit.cn");
delayms(3000);
LCD_CLS();
for(i=0; i<8; i++)
{LCD_P16x16Ch(i*16,0,i); //点阵显示
LCD_P16x16Ch(i*16,2,i+8);
LCD_P16x16Ch(i*16,4,i+16);
LCD_P16x16Ch(i*16,6,i+24);
}
delayms(3000);
LCD_CLS();
LCD_P8x16Str(44,2,"O K!");
LCD_P8x16Str(20,0,"OLEDDISPLAY");
LCD_P8x16Str(24,4,"QQ:568983008");
LCD_P8x16Str(34,6,"2015-01-26");
delayms(3000);
LCD_CLS();
}
}