- #include<reg51.h>
- #include"st7565.h"
- //---存一个图片--//
- unsigned char code pic[]={
- /*-- 宽度x高度=128x64 --*/
- 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,
- 0x57,0x53,0x57,0x07,0xFF,0x0F,0xE3,0x0F,0xEF,0xFF,0xEF,0xEF,0xEF,0x03,0xEF,0xEF,
- 0xEF,0x0F,0xE3,0x0F,0xEF,0xFF,0x77,0x77,0x17,0x57,0x57,0x53,0x57,0x57,0x17,0x77,
- 0x77,0xFF,0xFB,0x8B,0xAB,0x83,0xAB,0x83,0xAB,0x8B,0xFF,0x37,0xDB,0xFF,0xFF,0xFF,
- 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,
- 0x57,0x53,0x57,0x07,0xFF,0x0F,0xE3,0x0F,0xEF,0xFF,0xEF,0xEF,0xEF,0x03,0xEF,0xEF,
- 0xEF,0x0F,0xE3,0x0F,0xEF,0xFF,0x77,0x77,0x17,0x57,0x57,0x53,0x57,0x57,0x17,0x77,
- 0x77,0xFF,0xFB,0x8B,0xAB,0x83,0xAB,0x83,0xAB,0x8B,0xFF,0x37,0xDB,0xFF,0xFF,0xFF,
- 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xEE,0xF5,
- 0xFB,0xF4,0xEF,0xE0,0xFF,0xF4,0xFB,0xF4,0xEF,0xFF,0xE0,0xEE,0xEE,0xEE,0xEE,0xE0,
- 0xFF,0xF4,0xFB,0xF5,0xEC,0xFF,0xE2,0xEF,0xEF,0xE1,0xFD,0xFD,0xFD,0xF9,0xF7,0xEF,
- 0xEE,0xFF,0xEB,0xF2,0xFA,0xE2,0xEA,0xFA,0xF2,0xEB,0xFF,0xE0,0xFD,0xFF,0xFF,0xFF,
-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xC1,0xC8,0xDC,
- 0xFF,0xF8,0xF7,0xEF,0xDF,0xF8,0xF2,0xF2,0xF8,0xFC,0xFE,0xFC,0xFC,0xFE,0xFC,0xF8,
- 0xF2,0xD2,0xE8,0xF7,0xF8,0xFF,0xDC,0xC8,0xC1,0xC3,0xC7,0xFF,0xFF,0xFF,0xFF,0xFF,
- };
- /*******************************************************************************
- * 函 数 名 : main
- * 函数功能 : 主函数
- * 输 入 : 无
- * 输 出 : 无
- *******************************************************************************/
- void main(void)
- {
- uchar i , j;
- uint n;
- Lcd12864_Init(); //初始化
- Lcd12864_ClearScreen(); //清屏
- for (i=0;i<8;i++)
- {
- //--设置初始显示开始位置--//
- LcdSt7565_WriteCmd(0x40);
- //--设置Y坐标--//
- LcdSt7565_WriteCmd(0xB0+i);
-
- //--设置X坐标--//
- LcdSt7565_WriteCmd(0x10);
- LcdSt7565_WriteCmd(0x04);
- for(j=0; j<128; j++)
- {
- LcdSt7565_WriteData(~pic[n]);
- n=n+1;
- }
- }
- while (1)
- {
- }
- }
复制代码
|