【51单片机快速入门指南】5.3:SPI控制晶联讯JLX12864G_08602 LCD屏幕

目录

  • 示例程序
    • JLX12864G_08602.c
    • JLX12864G_08602.h
    • JLX12864G_08602_Font.c
    • JLX12864G_08602_Font.h
    • 测试程序
      • main.c
      • 效果

STC12LE5A60S2 12MHz
Keil uVision V5.29.0.0
PK51 Prof.Developers Kit Version:9.60.0.0


示例程序

       stdint.h见【51单片机快速入门指南】1:基础知识和工程创建
       软件SPI程序见【51单片机快速入门指南】5:软件SPI
       SPI选择模式0。

       本例中所用单片机为STC12LE5A60S2 12MHz,屏幕部分接线如下,为了控制背光,LEDA由IO推挽控制,若要常亮,LEDA则可接到VCC。

1 P0.6 CS
2 P0.7 RST
3 P4.6 RS
4 P4.5 SDA
5 P4.4 SCK
6 3V3
7 GND
8 P2.5 LEDA

       根据接线情况修改Soft_SPI.h
在这里插入图片描述

JLX12864G_08602.c

/** JLX12864G_08602.c**  Created on: Apr 26, 2021*      Author: Royic*/#include "./Soft_SPI/Soft_SPI.h"
#include "JLX12864G_08602.h"
#include "JLX12864G_08602_Font.h"/*写指令到 LCD 模块*/
void transfer_command(uint8_t data1)
{JLX12864_CS_L;JLX12864_RS_L;SOFT_SPI_RW_MODE0(data1);JLX12864_CS_H;
}/*写数据到 LCD 模块*/
void transfer_data(uint8_t data1)
{JLX12864_CS_L;JLX12864_RS_H;SOFT_SPI_RW_MODE0(data1);JLX12864_CS_H;
}void lcd_address(uint8_t page, uint8_t column)
{column = column - 1; //我们平常所说的第 1 列,在 LCD 驱动 IC 里是第 0 列。所以在这里减去 1.page = page - 1;transfer_command(0xb0 + page); //设置页地址。每页是 8 行。一个画面的 64 行被分成 8 个页。我们平常所说的第 1 页,在 LCD驱动 IC 里是第 0 页,所以在这里减去 1*/transfer_command(((column >> 4) & 0x0f) + 0x10); //设置列地址的高 4 位transfer_command(column & 0x0f); //设置列地址的低 4 位
}/*全屏清屏*/
void clear_screen(void)
{uint8_t i, j;for (i = 0; i < 9; i++){lcd_address(i + 1, 1);for (j = 0; j < 132; j++){transfer_data(0x00);}}
}/*LCD 模块初始化*/
void initial_lcd(void)
{JLX12864_RST_L; /*低电平复位*/JLX12864_Delay_ms(100);JLX12864_RST_H; /*复位完毕*/JLX12864_Delay_ms(100);transfer_command(0xe2); /*软复位*/JLX12864_Delay_ms(5);transfer_command(0x2c); /*升压步骤 1*/JLX12864_Delay_ms(5);transfer_command(0x2e); /*升压步骤 2*/JLX12864_Delay_ms(5);transfer_command(0x2f); /*升压步骤 3*/JLX12864_Delay_ms(5);transfer_command(0x23); /*粗调对比度,可设置范围 0x20~0x27*/transfer_command(0x81); /*微调对比度*/transfer_command(0x28); /*0x1a,微调对比度的值,可设置范围 0x00~0x3f*/transfer_command(0xa2); /*1/9 偏压比(bias)*/transfer_command(0xc8); /*行扫描顺序:从上到下*/transfer_command(0xa0); /*列扫描顺序:从左到右*/transfer_command(0x40); /*起始行:第一行开始*/transfer_command(0xaf); /*开显示*/clear_screen();
}//==================display a piture of 128*64 dots================
void full_display()
{uint8_t i, j;for (i = 0; i < 8; i++){lcd_address(i + 1, 0);for (j = 0; j < 128; j++){transfer_data(0xff);}}
}//显示 128x64 点阵图像
void display_128x64(uint8_t *dp)
{uint8_t i, j;for (j = 0; j < 8; j++){lcd_address(j + 1, 1);for (i = 0; i < 128; i++){transfer_data(*dp); //写数据到 LCD,每写完一个 8 位的数据后列地址自动加 1dp++;}}
}/*显示 32x32 点阵图像、汉字、生僻字或 32x32 点阵的其他图标*/
void display_graphic_32x32(uint8_t page, uint8_t column, uint8_t *dp)
{uint8_t i, j;for (j = 0; j < 4; j++){lcd_address(page + j, column);for (i = 0; i < 31; i++){transfer_data(*dp); /*写数据到 LCD,每写完一个 8 位的数据后列地址自动加 1*/dp++;}}
}/*显示 16x16 点阵图像、汉字、生僻字或 16x16 点阵的其他图标*/
void display_graphic_16x16(uint8_t page, uint8_t column, uint8_t *dp)
{uint8_t i, j;for (j = 0; j < 2; j++){lcd_address(page + j, column);for (i = 0; i < 16; i++){transfer_data(*dp); /*写数据到 LCD,每写完一个 8 位的数据后列地址自动加 1*/dp++;}}
}/*显示 8x16 点阵图像、ASCII, 或 8x16 点阵的自造字符、其他图标*/
void display_graphic_8x16(uint8_t page, uint8_t column, uint8_t *dp)
{uint8_t i, j;for (j = 0; j < 2; j++){lcd_address(page + j, column);for (i = 0; i < 8; i++){transfer_data(*dp); /*写数据到 LCD,每写完一个 8 位的数据后列地址自动加 1*/dp++;}}
}void display_string_8x16(uint8_t page, uint8_t column, uint8_t *text)
{uint8_t i = 0, j, k, n;while (text[i] > 0x00){if ((text[i] >= 0x20) && (text[i] <= 0x7e)){j = text[i] - 0x20;for (n = 0; n < 2; n++){lcd_address(page + n, column);for (k = 0; k < 8; k++){transfer_data(ascii_table_8x16[j][k + 8 * n]);/*显示 5x7 的 ASCII 字到 LCD 上,y 为页地址,x 为列地址,最后为数据*/}}i++;column += 8;}elsei++;}
}void display_string_5x8(uint8_t page, uint8_t column, uint8_t *text)
{uint8_t i = 0, j, k;while (text[i] > 0x00){if ((text[i] >= 0x20) && (text[i] < 0x7e)){j = text[i] - 0x20;lcd_address(page, column);for (k = 0; k < 5; k++){transfer_data(ascii_table_5x8[j][k]);/*显示 5x8 的 ASCII 字到 LCD 上,y 为页地址,x 为列地址,最后为数据*/}i++;column += 6;}elsei++;}
}void JLX12864G_08602_Test(void)
{clear_screen(); //clear all dotsdisplay_128x64(bmp1);JLX12864_Delay_ms(2000);clear_screen(); //clear all dotsdisplay_graphic_32x32(1, 1, cheng1); /*在第 1 页,第 49 列显示单个汉字"成"*/JLX12864_Delay_ms(2000);clear_screen(); //clear all dotsdisplay_graphic_16x16(5, 1, zhuang1); /*在第 5 页,第 1 列显示单个汉字"状"*/display_graphic_16x16(5, (1 + 16), tai1); /*在第 5 页,第 17 列显示单个汉字"态"*/display_graphic_8x16(5, (1 + 16 * 2), mao_hao); /*在第 5 页,第 25 列显示单个字符":"*/display_graphic_16x16(5, (1 + 16 * 2 + 8), shi1); /*在第 5 页,第 41 列显示单个汉字"使"*/display_graphic_16x16(5, (1 + 16 * 3 + 8), yong1); /*在第 5 页,第 49 列显示单个汉字"用"*/display_graphic_8x16(5, (89), num0); /*在第 5 页,第 89 列显示单个数字"0"*/display_graphic_8x16(5, (89 + 8 * 1), num0); /*在第 5 页,第 97 列显示单个数字"0"*/display_graphic_8x16(5, (89 + 8 * 2), mao_hao); /*在第 5 页,第 105 列显示单个字符":"*/display_graphic_8x16(5, (89 + 8 * 3), num0); /*在第 5 页,第 113 列显示单个数字"0"*/display_graphic_8x16(5, (89 + 8 * 4), num0); /*在第 5 页,第 121 列显示单个数字"0"*/JLX12864_Delay_ms(2000);clear_screen();display_string_8x16(1, 1, "0123456789abcdef");/*在第 1 页,第 1 列显示字符串*/display_string_8x16(3, 1, "~`!@#$%^&*()_-+=");/*在第*页,第*列显示字符串*/display_string_5x8(5, 1, " ! #$%&'()*+,-./01234");display_string_5x8(6, 1, "56789:;<=>?@ABCDEFGHI");display_string_5x8(7, 1, "JKLMNOPQRSTUVWXYZ[\]^");display_string_5x8(8, 1, "_`abcdefghijklmnopqrs");JLX12864_Delay_ms(2000);
}

JLX12864G_08602.h

/** JLX12864G_08602.h**  Created on: Apr 26, 2021*      Author: Royic*/#ifndef JLX12864G_08602_JLX12864G_08602_H_
#define JLX12864G_08602_JLX12864G_08602_H_/* 包含头文件 ----------------------------------------------------------------*/
#include "stdint.h"
#include <STC12C5A60S2.H>void Delay_ms(int i);#define JLX12864_Delay_ms(n)   Delay_ms(n)/* 类型定义 --------------------------------------------------------------*/
#define JLX12864_CS_H          P06=1 // 输出高电平
#define JLX12864_CS_L          P06=0 // 输出低电平
#define JLX12864_RST_H         P07=1 // 输出高电平
#define JLX12864_RST_L         P07=0 // 输出低电平
#define JLX12864_RS_H          P46=1 // 输出高电平
#define JLX12864_RS_L          P46=0 // 输出低电平/* 宏定义 --------------------------------------------------------------------*//* 扩展变量 ------------------------------------------------------------------*/
/* 函数声明 ------------------------------------------------------------------*/
void initial_lcd(void);
void clear_screen(void);
void full_display();
void display_128x64(uint8_t *dp);
void display_graphic_32x32(uint8_t page, uint8_t column, uint8_t *dp);
void display_graphic_16x16(uint8_t page, uint8_t column, uint8_t *dp);
void display_graphic_8x16(uint8_t page, uint8_t column, uint8_t *dp);
void display_string_8x16(uint8_t page, uint8_t column, uint8_t *text);
void display_string_5x8(uint8_t page, uint8_t column, uint8_t *text);void JLX12864G_08602_Test(void);#endif /* JLX12864G_08602_JLX12864G_08602_H_ */

JLX12864G_08602_Font.c

/** JLX12864G_08602_Font.c**  Created on: Apr 26, 2021*      Author: Royic*/
#include "stdint.h"int8_t code cheng1[] =
{/*-- 文字: 成 --*//*-- 宋体 23; 此字体下对应的点阵为:宽 x 高=31x31 --*//*-- 高度不是 8 的倍数,现调整为:宽度 x 高度=32x32 --*/0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00, 0x0C, 0xFC, 0xFC, 0x88, 0x00, 0x00, 0x1C, 0x78, 0xF0, 0xE0,0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF,0xFF, 0x83, 0x83, 0x83, 0x83, 0x83, 0x83, 0xC3, 0xC3, 0x03, 0x1F, 0xFF,0xFF, 0x83, 0x03, 0x03, 0x03, 0xC3, 0xF3, 0xF3, 0x63, 0x03, 0x03, 0x00,0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x3F, 0x00, 0x80, 0x00, 0x00,0x80, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x03, 0x9F, 0xFF, 0xF8, 0xF8, 0xBE,0x1F, 0x07, 0x01, 0x00, 0x00, 0xE0, 0x20, 0x00, 0x00, 0x20, 0x38, 0x1F,0x07, 0x01, 0x00, 0x00, 0x01, 0x01, 0x07, 0x07, 0x23, 0x31, 0x18, 0x0C,0x0E, 0x07, 0x03, 0x01, 0x01, 0x01, 0x03, 0x07, 0x0F, 0x0E, 0x1C, 0x1F,0x3F, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00
};int8_t code zhuang1[] =
{/*-- 文字: 状 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=16x16 --*/0x08, 0x30, 0x00, 0xFF, 0x20, 0x20, 0x20, 0x20, 0xFF, 0x20, 0xE1, 0x26, 0x2C,0x20, 0x20, 0x00, 0x04, 0x02, 0x01, 0xFF, 0x40, 0x20, 0x18, 0x07, 0x00,0x00, 0x03, 0x0C, 0x30, 0x60, 0x20, 0x00
};int8_t code tai1[] =
{/*-- 文字: 态 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=16x16 --*/0x00, 0x04, 0x04, 0x04, 0x84, 0x44, 0x34, 0x4F, 0x94, 0x24, 0x44, 0x84, 0x84,0x04, 0x00, 0x00, 0x00, 0x60, 0x39, 0x01, 0x00, 0x3C, 0x40, 0x42, 0x4C,0x40, 0x40, 0x70, 0x04, 0x09, 0x31, 0x00
};int8_t code shi1[] =
{/*-- 文字: 使 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=16x16 --*/0x40, 0x20, 0xF0, 0x1C, 0x07, 0xF2, 0x94, 0x94, 0x94, 0xFF, 0x94, 0x94, 0x94,0xF4, 0x04, 0x00, 0x00, 0x00, 0x7F, 0x00, 0x40, 0x41, 0x22, 0x14, 0x0C,0x13, 0x10, 0x30, 0x20, 0x61, 0x20, 0x00
};int8_t code yong1[] =
{/*-- 文字: 用 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=16x16 --*/0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0xFE, 0x22, 0x22, 0x22, 0x22,0xFE, 0x00, 0x00, 0x80, 0x40, 0x30, 0x0F, 0x02, 0x02, 0x02, 0x02, 0xFF,0x02, 0x02, 0x42, 0x82, 0x7F, 0x00, 0x00
};int8_t code mao_hao[] =
{/*-- 文字: : (冒号) --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30,0x00, 0x00, 0x00
};int8_t code num0[]=
{/*-- 文字: 0 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00
};int8_t code num1[]=
{/*-- 文字: 1 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00
};int8_t code num2[]=
{/*-- 文字: 2 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00
};int8_t code num3[]=
{/*-- 文字: 3 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00
};int8_t code num4[]=
{/*-- 文字: 4 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00
};int8_t code num5[]=
{/*-- 文字: 5 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00
};int8_t code num6[]=
{/*-- 文字: 6 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00
};int8_t code num7[]=
{/*-- 文字: 7 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00
};int8_t code num8[]=
{/*-- 文字: 8 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00
};int8_t code num9[]=
{/*-- 文字: 9 --*//*-- 宋体 12; 此字体下对应的点阵为:宽 x 高=8x16 --*/0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00
};//纵向取模,适合 ST7565P,ST7565R,ST7567,UC1701X,KS0108 等驱动 IC 的液晶模块使用
int8_t code ascii_table_8x16[95][16]= {
//粗体 8x16 点阵的 ASCII 码的点阵数据,从"JLX-GB2312"型号的字库 IC 中读出来的国标的。0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //- -(即“空格”)ASCII 码:0X200x00,0x00,0x38,0xFC, 0xFC,0x38,0x00,0x00, 0x00,0x00,0x00,0x0D, 0x0D,0x00,0x00,0x00, //-!- ASCII 码:0X210x00,0x0E,0x1E,0x00, 0x00,0x1E,0x0E,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-"-0x20,0xF8,0xF8,0x20, 0xF8,0xF8,0x20,0x00, 0x02,0x0F,0x0F,0x02, 0x0F,0x0F,0x02,0x00, //-#-0x38,0x7C,0x44,0x47, 0x47,0xCC,0x98,0x00, 0x06,0x0C,0x08,0x38, 0x38,0x0F,0x07,0x00, //-$-0x30,0x30,0x00,0x80, 0xC0,0x60,0x30,0x00, 0x0C,0x06,0x03,0x01, 0x00,0x0C,0x0C,0x00, //-%-0x80,0xD8,0x7C,0xE4, 0xBC,0xD8,0x40,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-&-0x00,0x10,0x1E,0x0E, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-'-0x00,0x00,0xF0,0xF8, 0x0C,0x04,0x00,0x00, 0x00,0x00,0x03,0x07, 0x0C,0x08,0x00,0x00, //-(-0x00,0x00,0x04,0x0C, 0xF8,0xF0,0x00,0x00, 0x00,0x00,0x08,0x0C, 0x07,0x03,0x00,0x00, //-)-0x80,0xA0,0xE0,0xC0, 0xC0,0xE0,0xA0,0x80, 0x00,0x02,0x03,0x01, 0x01,0x03,0x02,0x00, //-*- ASCII 码:0X2A0x00,0x80,0x80,0xE0, 0xE0,0x80,0x80,0x00, 0x00,0x00,0x00,0x03, 0x03,0x00,0x00,0x00, //-+-0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x10,0x1E, 0x0E,0x00,0x00,0x00, //-,-0x80,0x80,0x80,0x80, 0x80,0x80,0x80,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //---0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x0C, 0x0C,0x00,0x00,0x00, //-.-0x00,0x00,0x00,0x80, 0xC0,0x60,0x30,0x00, 0x0C,0x06,0x03,0x01, 0x00,0x00,0x00,0x00, //-/-0xF8,0xF8,0x0C,0xC4, 0x0C,0xF8,0xF0,0x00, 0x03,0x07,0x0C,0x08, 0x0C,0x07,0x03,0x00, //-0- ASCII 码:0X300x00,0x10,0x18,0xFC, 0xFC,0x00,0x00,0x00, 0x00,0x08,0x08,0x0F, 0x0F,0x08,0x08,0x00, //-1-0x08,0x0C,0x84,0xC4, 0x64,0x3C,0x18,0x00, 0x0E,0x0F,0x09,0x08, 0x08,0x0C,0x0C,0x00, //-2-0x08,0x0C,0x44,0x44, 0x44,0xFC,0xB8,0x00, 0x04,0x0C,0x08,0x08, 0x08,0x0F,0x07,0x00, //-3-0xC0,0xE0,0xB0,0x98, 0xFC,0xFC,0x80,0x00, 0x00,0x00,0x00,0x08, 0x0F,0x0F,0x08,0x00, //-4- ASCII 码:0X340x7C,0x7C,0x44,0x44, 0x44,0xC4,0x84,0x00, 0x04,0x0C,0x08,0x08, 0x08,0x0F,0x07,0x00, //-5-0xF0,0xF8,0x4C,0x44, 0x44,0xC0,0x80,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-6-0x0C,0x0C,0x04,0x84, 0xC4,0x7C,0x3C,0x00, 0x00,0x00,0x0F,0x0F, 0x00,0x00,0x00,0x00, //-7-0xB8,0xFC,0x44,0x44, 0x44,0xFC,0xB8,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-8-0x38,0x7C,0x44,0x44, 0x44,0xFC,0xF8,0x00, 0x00,0x08,0x08,0x08, 0x0C,0x07,0x03,0x00, //-9-0x00,0x00,0x00,0x30, 0x30,0x00,0x00,0x00, 0x00,0x00,0x00,0x06, 0x06,0x00,0x00,0x00, //-:-0x00,0x00,0x00,0x30, 0x30,0x00,0x00,0x00, 0x00,0x00,0x08,0x0E, 0x06,0x00,0x00,0x00, //-;-0x00,0x80,0xC0,0x60, 0x30,0x18,0x08,0x00, 0x00,0x00,0x01,0x03, 0x06,0x0C,0x08,0x00, //-<-0x00,0x20,0x20,0x20, 0x20,0x20,0x20,0x00, 0x00,0x01,0x01,0x01, 0x01,0x01,0x01,0x00, //-=-0x00,0x08,0x18,0x30, 0x60,0xC0,0x80,0x00, 0x00,0x08,0x0C,0x06, 0x03,0x01,0x00,0x00, //->- ASCII 码:0X3E0x18,0x1C,0x04,0xC4, 0xE4,0x3C,0x18,0x00, 0x00,0x00,0x00,0x0D, 0x0D,0x00,0x00,0x00, //-?-0xF0,0xF0,0x08,0xC8, 0xC8,0xF8,0xF0,0x00, 0x07,0x0F,0x08,0x0B, 0x0B,0x0B,0x01,0x00, //-@-0xE0,0xF0,0x98,0x8C, 0x98,0xF0,0xE0,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-A- ASCII 码:0X410x04,0xFC,0xFC,0x44, 0x44,0xFC,0xB8,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0F,0x07,0x00, //-B-0xF0,0xF8,0x0C,0x04, 0x04,0x0C,0x18,0x00, 0x03,0x07,0x0C,0x08, 0x08,0x0C,0x06,0x00, //-C-0x04,0xFC,0xFC,0x04, 0x0C,0xF8,0xF0,0x00, 0x08,0x0F,0x0F,0x08, 0x0C,0x07,0x03,0x00, //-D-0x04,0xFC,0xFC,0x44, 0xE4,0x0C,0x1C,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0C,0x0E,0x00, //-E-0x04,0xFC,0xFC,0x44, 0xE4,0x0C,0x1C,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-F-0xF0,0xF8,0x0C,0x84, 0x84,0x8C,0x98,0x00, 0x03,0x07,0x0C,0x08, 0x08,0x07,0x0F,0x00, //-G-0xFC,0xFC,0x40,0x40, 0x40,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-H- ASCII 码:0X480x00,0x00,0x04,0xFC, 0xFC,0x04,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-I-0x00,0x00,0x00,0x04, 0xFC,0xFC,0x04,0x00, 0x07,0x0F,0x08,0x08, 0x0F,0x07,0x00,0x00, //-J-0x04,0xFC,0xFC,0xC0, 0xE0,0x3C,0x1C,0x00, 0x08,0x0F,0x0F,0x00, 0x01,0x0F,0x0E,0x00, //-K-0x04,0xFC,0xFC,0x04, 0x00,0x00,0x00,0x00, 0x08,0x0F,0x0F,0x08, 0x08,0x0C,0x0E,0x00, //-L-0xFC,0xFC,0x38,0x70, 0x38,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-M-0xFC,0xFC,0x38,0x70, 0xE0,0xFC,0xFC,0x00, 0x0F,0x0F,0x00,0x00, 0x00,0x0F,0x0F,0x00, //-N-0xF8,0xFC,0x04,0x04, 0x04,0xFC,0xF8,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-O-0x04,0xFC,0xFC,0x44, 0x44,0x7C,0x38,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-P-0xF8,0xFC,0x04,0x04, 0x04,0xFC,0xF8,0x00, 0x07,0x0F,0x08,0x0E, 0x3C,0x3F,0x27,0x00, //-Q-0x04,0xFC,0xFC,0x44, 0xC4,0xFC,0x38,0x00, 0x08,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-R-0x18,0x3C,0x64,0x44, 0xC4,0x9C,0x18,0x00, 0x06,0x0E,0x08,0x08, 0x08,0x0F,0x07,0x00, //-S-0x00,0x1C,0x0C,0xFC, 0xFC,0x0C,0x1C,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-T-0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-U-0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x01,0x03,0x06,0x0C, 0x06,0x03,0x01,0x00, //-V-0xFC,0xFC,0x00,0x00, 0x00,0xFC,0xFC,0x00, 0x07,0x0F,0x0E,0x03, 0x0E,0x0F,0x07,0x00, //-W-0x0C,0x3C,0xF0,0xE0, 0xF0,0x3C,0x0C,0x00, 0x0C,0x0F,0x03,0x01, 0x03,0x0F,0x0C,0x00, //-X-0x00,0x0C,0x7C,0xC0, 0xC0,0x7C,0x3C,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-Y-0x1C,0x0C,0x84,0xC4, 0x64,0x3C,0x1C,0x00, 0x0E,0x0F,0x09,0x08, 0x08,0x0C,0x0E,0x00, //-Z-0x00,0x00,0xFC,0xFC, 0x04,0x04,0x00,0x00, 0x00,0x00,0x0F,0x0F, 0x08,0x08,0x00,0x00, //-[-0x38,0x70,0xE0,0xC0, 0x80,0x00,0x00,0x00, 0x00,0x00,0x00,0x01, 0x03,0x07,0x0E,0x00, //-\-0x00,0x00,0x04,0x04, 0xFC,0xFC,0x00,0x00, 0x00,0x00,0x08,0x08, 0x0F,0x0F,0x00,0x00, //-]-0x08,0x0C,0x06,0x03, 0x06,0x0C,0x08,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-^-0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x20,0x20,0x20,0x20, 0x20,0x20,0x20,0x20, //-_-0x00,0x00,0x03,0x07, 0x04,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-`-0x00,0xA0,0xA0,0xA0, 0xE0,0xC0,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-a- ASCII 码:0X610x04,0xFC,0xFC,0x20, 0x60,0xC0,0x80,0x00, 0x00,0x0F,0x0F,0x08, 0x08,0x0F,0x07,0x00, //-b-0xC0,0xE0,0x20,0x20, 0x20,0x60,0x40,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0C,0x04,0x00, //-c-0x80,0xC0,0x60,0x24, 0xFC,0xFC,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-d-0xC0,0xE0,0xA0,0xA0, 0xA0,0xE0,0xC0,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0C,0x04,0x00, //-e-0x40,0xF8,0xFC,0x44, 0x0C,0x18,0x00,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-f-0xC0,0xE0,0x20,0x20, 0xC0,0xE0,0x20,0x00, 0x27,0x6F,0x48,0x48, 0x7F,0x3F,0x00,0x00, //-g-0x04,0xFC,0xFC,0x40, 0x20,0xE0,0xC0,0x00, 0x08,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-h-0x00,0x00,0x20,0xEC, 0xEC,0x00,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-i-0x00,0x00,0x00,0x00, 0x20,0xEC,0xEC,0x00, 0x00,0x30,0x70,0x40, 0x40,0x7F,0x3F,0x00, //-j-0x04,0xFC,0xFC,0x80, 0xC0,0x60,0x20,0x00, 0x08,0x0F,0x0F,0x01, 0x03,0x0E,0x0C,0x00, //-k-0x00,0x00,0x04,0xFC, 0xFC,0x00,0x00,0x00, 0x00,0x00,0x08,0x0F, 0x0F,0x08,0x00,0x00, //-l-0xE0,0xE0,0x60,0xC0, 0x60,0xE0,0xC0,0x00, 0x0F,0x0F,0x00,0x07, 0x00,0x0F,0x0F,0x00, //-m-0x20,0xE0,0xC0,0x20, 0x20,0xE0,0xC0,0x00, 0x00,0x0F,0x0F,0x00, 0x00,0x0F,0x0F,0x00, //-n-0xC0,0xE0,0x20,0x20, 0x20,0xE0,0xC0,0x00, 0x07,0x0F,0x08,0x08, 0x08,0x0F,0x07,0x00, //-o-0x20,0xE0,0xC0,0x20, 0x20,0xE0,0xC0,0x00, 0x40,0x7F,0x7F,0x48, 0x08,0x0F,0x07,0x00, //-p-0xC0,0xE0,0x20,0x20, 0xC0,0xE0,0x20,0x00, 0x07,0x0F,0x08,0x48, 0x7F,0x7F,0x40,0x00, //-q-0x20,0xE0,0xC0,0x60, 0x20,0xE0,0xC0,0x00, 0x08,0x0F,0x0F,0x08, 0x00,0x00,0x00,0x00, //-r-0x40,0xE0,0xA0,0x20, 0x20,0x60,0x40,0x00, 0x04,0x0C,0x09,0x09, 0x0B,0x0E,0x04,0x00, //-s-0x20,0x20,0xF8,0xFC, 0x20,0x20,0x00,0x00, 0x00,0x00,0x07,0x0F, 0x08,0x0C,0x04,0x00, //-t-0xE0,0xE0,0x00,0x00, 0xE0,0xE0,0x00,0x00, 0x07,0x0F,0x08,0x08, 0x07,0x0F,0x08,0x00, //-u-0x00,0xE0,0xE0,0x00, 0x00,0xE0,0xE0,0x00, 0x00,0x03,0x07,0x0C, 0x0C,0x07,0x03,0x00, //-v-0xE0,0xE0,0x00,0x80, 0x00,0xE0,0xE0,0x00, 0x07,0x0F,0x0C,0x07, 0x0C,0x0F,0x07,0x00, //-w-0x20,0x60,0xC0,0x80, 0xC0,0x60,0x20,0x00, 0x08,0x0C,0x07,0x03, 0x07,0x0C,0x08,0x00, //-x-0xE0,0xE0,0x00,0x00, 0x00,0xE0,0xE0,0x00, 0x47,0x4F,0x48,0x48, 0x68,0x3F,0x1F,0x00, //-y-0x60,0x60,0x20,0xA0, 0xE0,0x60,0x20,0x00, 0x0C,0x0E,0x0B,0x09, 0x08,0x0C,0x0C,0x00, //-z- //0x00,0x40,0x40,0xF8, 0xBC,0x04,0x04,0x00, 0x00,0x00,0x00,0x07, 0x0F,0x08,0x08,0x00, //-{-0x00,0x00,0x00,0xBC, 0xBC,0x00,0x00,0x00, 0x00,0x00,0x00,0x0F, 0x0F,0x00,0x00,0x00, //-|-0x00,0x04,0x04,0xBC, 0xF8,0x40,0x40,0x00, 0x00,0x08,0x08,0x0F, 0x07,0x00,0x00,0x00, //-}-0x08,0x0C,0x04,0x0C, 0x08,0x0C,0x04,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, //-~- ASCII 码:0X7E
};int8_t code ascii_table_5x8[95][5]=
{/*全体 ASCII 列表:5x8 点阵*/0x00,0x00,0x00,0x00,0x00,//- - //space0x00,0x00,0x4f,0x00,0x00,//-!-0x00,0x07,0x00,0x07,0x00,//-"-0x14,0x7f,0x14,0x7f,0x14,//-#-0x24,0x2a,0x7f,0x2a,0x12,//-$-0x23,0x13,0x08,0x64,0x62,//-%-0x36,0x49,0x55,0x22,0x50,//-&-0x00,0x05,0x07,0x00,0x00,//-'-0x00,0x1c,0x22,0x41,0x00,//-(-0x00,0x41,0x22,0x1c,0x00,//-)-0x14,0x08,0x3e,0x08,0x14,//-*-0x08,0x08,0x3e,0x08,0x08,//-+-0x00,0x50,0x30,0x00,0x00,//-,-0x08,0x08,0x08,0x08,0x08,//---0x00,0x60,0x60,0x00,0x00,//-.-0x20,0x10,0x08,0x04,0x02,//-/-0x3e,0x51,0x49,0x45,0x3e,//-0-0x00,0x42,0x7f,0x40,0x00,//-1-0x42,0x61,0x51,0x49,0x46,//-2-0x21,0x41,0x45,0x4b,0x31,//-3-0x18,0x14,0x12,0x7f,0x10,//-4-0x27,0x45,0x45,0x45,0x39,//-5-0x3c,0x4a,0x49,0x49,0x30,//-6-0x01,0x71,0x09,0x05,0x03,//-7-0x36,0x49,0x49,0x49,0x36,//-8-0x06,0x49,0x49,0x29,0x1e,//-9-0x00,0x36,0x36,0x00,0x00,//-:-0x00,0x56,0x36,0x00,0x00,//-;-0x08,0x14,0x22,0x41,0x00,//-<-0x14,0x14,0x14,0x14,0x14,//-=-0x00,0x41,0x22,0x14,0x08,//->-0x02,0x01,0x51,0x09,0x06,//-?-0x32,0x49,0x79,0x41,0x3e,//-@-0x7e,0x11,0x11,0x11,0x7e,//-A-0x7f,0x49,0x49,0x49,0x36,//-B-0x3e,0x41,0x41,0x41,0x22,//-C-0x7f,0x41,0x41,0x22,0x1c,//-D-0x7f,0x49,0x49,0x49,0x41,//-E-0x7f,0x09,0x09,0x09,0x01,//-F-0x3e,0x41,0x49,0x49,0x7a,//-G-0x7f,0x08,0x08,0x08,0x7f,//-H-0x00,0x41,0x7f,0x41,0x00,//-I-0x20,0x40,0x41,0x3f,0x01,//-J-0x7f,0x08,0x14,0x22,0x41,//-K-0x7f,0x40,0x40,0x40,0x40,//-L-0x7f,0x02,0x0c,0x02,0x7f,//-M-0x7f,0x04,0x08,0x10,0x7f,//-N-0x3e,0x41,0x41,0x41,0x3e,//-O-0x7f,0x09,0x09,0x09,0x06,//-P-0x3e,0x41,0x51,0x21,0x5e,//-Q-0x7f,0x09,0x19,0x29,0x46,//-R-0x46,0x49,0x49,0x49,0x31,//-S-0x01,0x01,0x7f,0x01,0x01,//-T-0x3f,0x40,0x40,0x40,0x3f,//-U-0x1f,0x20,0x40,0x20,0x1f,//-V-0x3f,0x40,0x38,0x40,0x3f,//-W-0x63,0x14,0x08,0x14,0x63,//-X-0x07,0x08,0x70,0x08,0x07,//-Y-0x61,0x51,0x49,0x45,0x43,//-Z-0x00,0x7f,0x41,0x41,0x00,//-[-0x02,0x04,0x08,0x10,0x20,//-\-0x00,0x41,0x41,0x7f,0x00,//-]-0x04,0x02,0x01,0x02,0x04,//-^-0x40,0x40,0x40,0x40,0x40,//-_-0x01,0x02,0x04,0x00,0x00,//-`-0x20,0x54,0x54,0x54,0x78,//-a-0x7f,0x48,0x48,0x48,0x30,//-b-0x38,0x44,0x44,0x44,0x44,//-c-0x30,0x48,0x48,0x48,0x7f,//-d-0x38,0x54,0x54,0x54,0x58,//-e-0x00,0x08,0x7e,0x09,0x02,//-f-0x48,0x54,0x54,0x54,0x3c,//-g-0x7f,0x08,0x08,0x08,0x70,//-h-0x00,0x00,0x7a,0x00,0x00,//-i-0x20,0x40,0x40,0x3d,0x00,//-j-0x7f,0x20,0x28,0x44,0x00,//-k-0x00,0x41,0x7f,0x40,0x00,//-l-0x7c,0x04,0x38,0x04,0x7c,//-m-0x7c,0x08,0x04,0x04,0x78,//-n-0x38,0x44,0x44,0x44,0x38,//-o-0x7c,0x14,0x14,0x14,0x08,//-p-0x08,0x14,0x14,0x14,0x7c,//-q-0x7c,0x08,0x04,0x04,0x08,//-r-0x48,0x54,0x54,0x54,0x24,//-s-0x04,0x04,0x3f,0x44,0x24,//-t-0x3c,0x40,0x40,0x40,0x3c,//-u-0x1c,0x20,0x40,0x20,0x1c,//-v-0x3c,0x40,0x30,0x40,0x3c,//-w-0x44,0x28,0x10,0x28,0x44,//-x-0x04,0x48,0x30,0x08,0x04,//-y-0x44,0x64,0x54,0x4c,0x44,//-z-0x08,0x36,0x41,0x41,0x00,//-{-0x00,0x00,0x77,0x00,0x00,//-|-0x00,0x41,0x41,0x36,0x08,//-}-0x04,0x02,0x02,0x02,0x01,//-~-
};int8_t code bmp1[]= {
//-- 调入了一幅图像:D:\我的文档\My Pictures\12864-555.bmp --
//-- 宽度 x 高度=128x64 --0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0xC0,0xC0,0xE0,0x60,0xE0,0xE0,0xE0,0xE0,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0xE0,0xE0,0xE0,0xE0,0xC0,0xC0,0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x18,0x1C,0x0C,0x0E,0x07,0x03,0x03,0x01,0x81,0xE0,0x78,0x1C,0x0E,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0E,0x1C,0x79,0xE1,0x83,0x03,0x07,0x0E,0x0C,0x1C,0x18,0x38,0x70,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0xC0,0xC0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xF0,0x78,0x1E,0x07,0x03,0x81,0x80,0xC0,0xC0,0xC0,0xE0,0x60,0x60,0x60,0x70,0xF0,0xFE,0x3F,0x19,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x38,0x31,0x3F,0xFE,0xF0,0x60,0x60,0xE0,0xC0,0xC0,0xC0,0x80,0x81,0x03,0x07,0x1E,0x78,0xF0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xFC,0xFF,0x7F,0x07,0x0F,0x1F,0x3D,0x79,0x71,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xE0,0xF0,0x71,0x79,0x3D,0x1F,0x0F,0xFF,0xFE,0xFC,0x00,0x00,0x00,0x00,0x00,0x80,0xFE,0xFF,0xF9,0x1C,0x0E,0x07,0x03,0x03,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x01,0x01,0x03,0x03,0x07,0x0E,0x1C,0xF9,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x0E,0x9E,0xFC,0xF8,0xF0,0xE0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xC0,0xE0,0xF0,0xF8,0xF8,0xFC,0x9E,0x0F,0x07,0x03,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0xDF,0x38,0x70,0xE0,0xC0,0xC0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x80,0x80,0xC0,0xC0,0xE0,0x70,0x38,0xDF,0xFF,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0x78,0x3C,0x1E,0x0F,0x07,0x03,0x01,0x00,0x01,0x01,0x03,0x07,0x0F,0x1E,0x1E,0x0E,0x0F,0x07,0x03,0x01,0x01,0x00,0x01,0x01,0x03,0x07,0x0F,0x1E,0x3C,0x78,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x0F,0x3C,0x70,0xE0,0xC1,0x81,0x03,0x03,0x03,0x07,0x06,0x06,0x06,0x0E,0x0F,0x7F,0xFC,0x98,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x0C,0x8C,0xFC,0x7F,0x0F,0x06,0x06,0x07,0x03,0x03,0x03,0x81,0xC1,0xE0,0x70,0x3C,0x0F,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x1F,0x3F,0x7C,0xFC,0xFE,0xEF,0xE7,0xE3,0xE1,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE1,0xE3,0xE7,0xEF,0xFE,0x7C,0x3F,0x1F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0E,0x0C,0x1C,0x18,0x38,0x70,0x60,0xE0,0xC0,0xC1,0x87,0x9E,0xB8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xB8,0xDE,0xC7,0xE1,0x60,0x70,0x38,0x18,0x1C,0x0C,0x0E,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x03,0x03,0x03,0x03,0x03,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x03,0x03,0x03,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};

JLX12864G_08602_Font.h

/** JLX12864G_08602_Font.h**  Created on: Apr 26, 2021*      Author: Royic*/#ifndef JLX12864G_08602_JLX12864G_08602_Font_H_
#define JLX12864G_08602_JLX12864G_08602_Font_H_extern int8_t code cheng1[];
extern int8_t code zhuang1[];
extern int8_t code tai1[];
extern int8_t code shi1[];
extern int8_t code yong1[];
extern int8_t code mao_hao[];
extern int8_t code num0[];
extern int8_t code num1[];
extern int8_t code num2[];
extern int8_t code num3[];
extern int8_t code num4[];
extern int8_t code num5[];
extern int8_t code num6[];
extern int8_t code num7[];
extern int8_t code num8[];
extern int8_t code num9[];
extern int8_t code bmp1[];extern int8_t code ascii_table_8x16[95][16];
extern int8_t code ascii_table_5x8[95][5];#endif

测试程序

main.c

#include <STC12C5A60S2.H>
#include "./JLX12864G_08602/JLX12864G_08602.h"
#include "intrins.h"
#include "stdint.h"void Delay1ms()		//@12.000MHz
{unsigned char i, j;_nop_();_nop_();i = 12;j = 168;do{while (--j);} while (--i);
}void Delay_ms(int i)
{while(i--)Delay1ms();
}sbit LEDA=P2^5;void main(void)
{LEDA=1;P4SW=0x70;			 //允许P4 IOP2M0=0x20;			 //推挽点亮背光initial_lcd();JLX12864G_08602_Test();while(1){	}
}

效果

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/400361.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Android二维码之创建

由于微信的推出二维码走进了我们的生活&#xff0c;并且越来越多的人们正在发挥着自己的想象力去使用它&#xff0c;来方便我们的生活&#xff0c;我曾经听说过一个笑话&#xff0c;当我们死后&#xff0c;墓碑上不再有墓志铭&#xff0c;而会出现一个记录你一生信息的二维码&a…

如何开展软件架构之概念架构

如何开展软件架构之概念架构 到目前为止&#xff0c;我们已经完成了需求的分析过程&#xff0c;总结来说&#xff0c;主要的步聚是 一&#xff09;需求结构化&#xff0c; 二&#xff09;分析约束影响 三&#xff09;重点关注质量需求。 那么接下来的阶段则是系统的概念架构了&…

【51单片机快速入门指南】6.1:LCD1602的八线、四线控制及自定义符号,完美兼容Proteus仿真

目录硬知识显示特性接口定义操作时序写操作时序读操作时序寄存器忙标志位BF地址计数器&#xff08;AC&#xff09;显示数据寄存器&#xff08;DDRAM&#xff09;CGROMCGRAM指令清屏指令光标归位指令进入模式设置指令显示开关控制指令设定显示屏或光标移动方向指令功能设定指令设…

在MAC OS 下配置python + Flask ,并支持pyCharm编辑器

https://www.cnblogs.com/lgphp/p/3841098.html 在MAC OS 下配置python Flask ,并支持pyCharm编辑器 flask是一个micro framework &#xff0c;伸缩性很强。可以部署到openshift 的PAAS里。这个框架上手非常快。喜欢的可以试试。 若实在MAC里&#xff0c;python已经默认安装了…

MySql简介及概念

关系型数据库系统&#xff1a;建立在关系模型上的数据库系统。 关系模型:当将日常生活中的实体&#xff08;学生&#xff09;&#xff0c;和实体的属性&#xff08;学生的学号&#xff0c;姓名&#xff09;保存数据中时&#xff0c;该如何处理该实体结构。1、数据结构可以规定&…

【51单片机快速入门指南】6.2:SPI 、八线、四线控制 LCD12864 屏幕及Proteus的仿真(支持中文汉字)

目录硬知识LCD12864简介主控芯片ST7920的功能是&#xff1a;驱动芯片ST7921的功能是&#xff1a;引脚功能时序并行通信串行通信指令存储结构操作取模软件的配置示例程序st7920.cst7920.h测试程序显示图片图片1实验现象图片2实验现象显示字符英文实验现象中文实验现象Proteus的仿…

【51单片机快速入门指南】仿真实例:幅值可调、频率可调的函数发生器(方波、三角波、正弦波)(1~10kHz)

目录效果设计思路STC89C52 Windows 10 20H2 Proteus 8 Frofessional v8.9 SP2 Keil uVision V5.29.0.0 PK51 Prof.Developers Kit Version:9.60.0.0 51函数发生器&#xff0c;附工程源码和Proteus仿真文件 效果 0 ~ 5V &#xff0c;50Hz的正弦波&#xff1a; 1 ~ 4V&…

VisualSvn Server介绍

1 、VisualSvn Server VisualSvn Server是免费的&#xff0c;而VisualSvn是收费的。VisualSvn是Svn的客户端&#xff0c;和Visual Studio集成在一起&#xff0c;但是不免费&#xff0c;使用AnkhSvn&#xff08;VS2008插件&#xff09;来代替VisualSvn。使用 VisualSvn Server是…

【51单片机快速入门指南】6.3:DS18B20 单总线数字温度计的多路读取

目录硬知识DS18B20介绍时序初始化时序写时序读时序命令ROM 操作命令ROM 搜索举例存贮器操作命令示例程序DS18B20.cDS18B20.h测试程序定时器中断服务函数单传感器时ID的获取 main.c单传感器读取温度和读取特定ID传感器的温度多路传感器读取普中51-单核-A2 STC89C52 Keil uVisio…

SQL多行转多列

--★转换结果如上图 1、首先创建表&#xff1a; CREATE TABLE [成绩表]( [编号] [int]IDENTITY(1,1) NOT NULL, [姓名] [varchar](50)NULL, [语文] [numeric](5, 2)NULL, [数学] [numeric](5, 2)NULL, [英语] [numeric](5, 2)NULL ) ON [PRIMARY] 2、插入测试数据 INSERT INTO …

C#通过FFmpeg获得视频文件参数

C#通过FFmpeg获得视频参数 FFmpeg简介 FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video&#xff08;录制、转换 、音/视频&#xff0c;并可将其转换为音/视频流的完整的&#xff0c;跨平台的j解决方案&#xff09;.FFmpeg的开发…

【51单片机快速入门指南】6.3.1:使用1-WIRE搜索算法搜索单总线上所有DS18B20的ID(基于二叉树)

目录源码OWSearch.c测试程序实验现象Proteus仿真实机测试普中51-单核-A2 STC89C52 Keil uVision V5.29.0.0 PK51 Prof.Developers Kit Version:9.60.0.0 移植自1-WIRE搜索算法 串口部分见【51单片机快速入门指南】3.3&#xff1a;USART 串口通信 DS18B20驱动程序见【5…

卡拉丁发布第四代车用空调滤清器

5月15日&#xff0c;卡拉丁“全澄行动”第四代车用空调滤清器产品发布会在京举行&#xff0c;据悉&#xff0c;该车用空调滤清器PM2.5过滤效率可高达99%。经国家权威检测机构广东省微生物分析检测中心检测&#xff0c;卡拉丁第四代车用空调滤清器对大肠杆菌、金***葡萄球菌抗菌…

【 Grey Hack 】大数四则运算

目录效果加减乘除乘方源码版本&#xff1a;Grey Hack v0.7.3619 - Alpha 在Gs中&#xff0c;位数大于15的整数将以科学计数法显示&#xff0c;故这里提供一种基于字符串加法的四则大数运算算法。由于位数大于10的字符串无法用to_int方法转化为整数&#xff0c;因此本示例中以长…

uniapp打包小程序上传测试后,使用有的插件显示空白页面,问题解决方【有效 / 最新】

目录 问题1图在微信开发者平台正常能使用 打包上传微信小程序测试问题2图在微信开发者平台正常能使用 打包上传微信小程序测试解决步骤一1.2.3. 解决步骤二打开微信小程序官网看图跨域网址 最后 问题1图 在微信开发者平台正常能使用 未上传小程序&#xff0c;开发过程中&…

django加载本地html

django加载本地html from django.shortcuts import renderfrom django.http import HttpResponse from django.shortcuts import render,render_to_response # Create your views here. def hello(request): return render_to_response("hello.html") 传递数据到htm…

Java知多少(68)面向字符的输出流

面向字符的输出流都是类 Writer 的子类&#xff0c;其类层次结构如图 10-5 所示。 图10-5 Writer的类层次结构图表 10-3 列出了 Writer 的主要子类及说明。 表 10-3 Writer 的主要子类类名功能说明CharArrayWriter写到字符数组的输出流BufferedWriter缓冲输出字符流PipedWriter…

Linux虚拟机的替代品:Docker与WSL2上手笔记

目录安装Docker可能出现的问题内核需更新Linux 内核更新包将 WSL 2 设置为默认版本An error occurred安装镜像使用Microsoft Store安装所选的 Linux 分发手动安装镜像及文件夹的共享Docker run 命令Windows Terminal的安装在Windows Terminal中直接运行已有的容器Windows 10 20…

flask需求文件requirements.txt的创建及使用

1.简介 Python项目中必须包含一个 requirements.txt 文件&#xff0c;用于记录所有依赖包及其精确的版本号用以新环境部署。 2.进入虚拟环境然后输入pip freeze > requirements.txt 每次安装或者升级了包之后最好也一并使用这个命令更新这个文件。 需求文件的内容示例…

【联盛德W806上手笔记】一、开发环境和烧录程序

目录简介芯片外观MCU 特性安全特性低功耗模式芯片结构管脚定义极限参数开发环境SDK的获取从官网获取从Q群获取iosetting大佬 维护的wm-sdk-w806打开工程编译固件烧录现象Windows 10 20H2 HLK-W806-V1.0-KIT WM_SDK_W806_v0.6.0 引自《W80X_MCU_快速入门V0.2》、《W806 MCU 芯片…