您当前的位置:五五电子网电子知识单片机-工控设备STC单片机(STC12C5410AD AD的测试LCD12864显示程序 正文
STC12C5410AD AD的测试LCD12864显示程序

STC12C5410AD AD的测试LCD12864显示程序

点击数:7178 次   录入时间:03-04 11:54:00   整理:http://www.55dianzi.com   STC单片机(

STC12C5410AD AD的测试LCD12864显示程序 
#include <STC12C5410AD.H>   
#include "stdio.h" 
#include "stdlib.h" 
#include "math.h" 
#include "absaCC.h" 
#include "intrins.h" 
#include "string.h"     
 
#define Rssp_On 0x3f
#define Rssp_Off 0x3e
#define Col_Add 0x40
#define Page_Add 0xb8
#define Start_Line 0xc0

sbit Rs = P1^7; //Data or Instrument Select
sbit RW = P1^5; //Write or Read
sbit Ce = P1^6; //6800 mode Enable single
#define Lcd_Bus P2
sbit Cs1 = P1^3; //Master Chip enable
sbit Cs2 = P1^4; //Slave chip enable

unsigned char adbuf;

unsigned char code han[]=
{
/*--  文字:  值  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x80,0x40,0xF0,0x2F,0x02,0x04,0xE4,0xA4,0xB4,0xAF,0xA6,0xA4,0xE4,0x04,0x00,0x00,
0x00,0x00,0xFF,0x00,0x40,0x40,0x7F,0x4A,0x4A,0x4A,0x4A,0x4A,0x7F,0x40,0x40,0x00,
/*--  文字:  电  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0xF8,0x48,0x48,0x48,0x48,0xFF,0x48,0x48,0x48,0x48,0xF8,0x00,0x00,0x00,
0x00,0x00,0x0F,0x04,0x04,0x04,0x04,0x3F,0x44,0x44,0x44,0x44,0x4F,0x40,0x70,0x00,

/*--  文字:  压  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0xFE,0x02,0x42,0x42,0x42,0x42,0xFA,0x42,0x42,0x42,0x62,0x42,0x02,0x00,
0x20,0x18,0x27,0x20,0x20,0x20,0x20,0x20,0x3F,0x20,0x21,0x2E,0x24,0x20,0x20,0x00,

/*--  文字:  专  --*/
/*--  宋体-方正超大字符集11;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0x80,0x90,0x90,0xF0,0x9C,0x90,0x90,0x90,0x90,0x88,0x40,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0x02,0x12,0x22,0x72,0x0A,0x06,0x02,0x00,0x00,0x00,0x00,

/*--  文字:  注  --*/
/*--  宋体-方正超大字符集11;  此字体下对应的点阵为:宽x高=16x16   --*/
0x20,0x40,0x84,0xE8,0x20,0x20,0x20,0x22,0x24,0xE8,0x20,0x20,0x20,0x00,0x00,0x00,
0x00,0x38,0x46,0x01,0x00,0x42,0x42,0x42,0x42,0x7F,0x42,0x42,0x42,0x42,0x00,0x00,

/*--  文字:  于  --*/
/*--  宋体-方正超大字符集11;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x80,0x84,0x84,0x84,0x84,0x84,0xFC,0x84,0x84,0x84,0x84,0x84,0x80,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x40,0x40,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

/*--  文字:  消  --*/
/*--  宋体-方正超大字符集11;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x20,0x40,0x84,0x60,0x00,0xC8,0x30,0x40,0x3E,0x40,0x30,0x48,0xC0,0x00,0x00,
0x00,0x00,0x7C,0x03,0x00,0x00,0x7F,0x09,0x09,0x09,0x09,0x89,0x89,0x7F,0x00,0x00,

/*--  文字:  费  --*/
/*--  宋体-方正超大字符集11;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x00,0xE8,0xA8,0xA8,0xE8,0x9C,0xA8,0xA8,0xFC,0xA8,0xA8,0xB8,0x80,0x00,0x00,
0x00,0x80,0x84,0x9E,0x85,0x44,0x24,0x1C,0x24,0x25,0x24,0x5E,0x42,0x01,0x00,0x00,

/*--  文字:  类  --*/
/*--  宋体-方正超大字符集11;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x20,0x20,0x20,0xA8,0x50,0x20,0xFC,0x20,0x50,0xAC,0xA0,0x20,0x00,0x00,0x00,
0x80,0x82,0x8A,0x49,0x48,0x28,0x19,0x06,0x18,0x28,0x28,0x48,0x49,0x84,0x00,0x00,

/*--  文字:  控  --*/
/*--  宋体-方正超大字符集11;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x20,0x20,0xFC,0x20,0x20,0x30,0x90,0x54,0x1C,0x10,0x50,0xB0,0x10,0x00,0x00,
0x00,0x44,0x82,0x7F,0x01,0x01,0x81,0x84,0x84,0x7C,0x84,0x84,0x84,0x41,0x00,0x00,

/*--  文字:  制  --*/
/*--  宋体-方正超大字符集11;  此字体下对应的点阵为:宽x高=16x16   --*/
0x00,0x60,0x9C,0x90,0x90,0xFC,0x90,0x90,0x50,0x80,0xF8,0x00,0x00,0xFC,0x00,0x00,
0x00,0x00,0x3E,0x02,0x02,0x7F,0x22,0x3E,0x02,0x00,0x0F,0x40,0x40,0x3F,0x00,0x00,
};

unsigned char code shuzi[]={
/*--  文字:  0  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00, //0

/*--  文字:  1  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,   //1

/*--  文字:  2  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,  //2

/*--  文字:  3  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00, //3

/*--  文字:  4  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,

/*--  文字:  5  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,

/*--  文字:  6  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,

/*--  文字:  7  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,

/*--  文字:  8  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,

/*--  文字:  9  --*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,

/*--  文字:  a  --10*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20, //10

/*--  文字:  b  --11*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/
0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,  //11

/*--  文字:  c  --12*/
/*--  宋体12;  此字体下对应的点阵为:宽x高=8x16   --*/

[1] [2] [3] [4]  下一页


本文关键字:程序  STC单片机(单片机-工控设备 - STC单片机(