目录
240*320



LCD_SCK:串行时钟线,由主控设备(如单片机)提供时钟信号,同步数据传输。
LCD_MOSI:主设备输出、从设备输入线,主控向 LCD 发送命令或显示数据的通道。
LCD_MISO:主设备输入、从设备输出线,LCD 向主控返回数据(多数纯显示的 LCD 用不到,可忽略)。
LCD_CS:片选线,低电平有效,用于选中该 LCD 设备(多设备共享总线时区分设备)。
LCD_RESET:复位线,低电平触发 LCD 硬件复位,初始化时需拉低再拉高。
LCD_DC:数据 / 命令控制线,区分传输的是命令(如设置参数)还是显示数据(如像素)。
LCD_LED:背光控制线,控制 LCD 背光的开关或亮度(通常接 PWM 引脚调节亮度)。
CPOL(时钟极性) :决定 SPI 时钟线(SCK)在空闲状态的电平
- CPOL=0:空闲时 SCK 是低电平
- CPOL=1:空闲时 SCK 是高电平
CPHA(时钟相位) :决定数据在时钟的第几个边沿被采样
- CPHA=0:数据在时钟的第一个边沿(上升沿 / 下降沿由 CPOL 决定)采样
- CPHA=1:数据在时钟的第二个边沿采样
这两个参数组合出4 种 SPI 模式(LCD 通常用模式 0 或模式 3),比如:
- 模式 0(CPOL=0,CPHA=0):空闲 SCK 低,数据在上升沿采样
- 模式 3(CPOL=1,CPHA=1):空闲 SCK 高,数据在上升沿采样
LCD填充色块
cpu_delay.c
cpp
#include <stdint.h>
#include <string.h>
#include "stm32f4xx.h"
void cpu_delay(uint32_t us)
{
while (us >= 1000)
{
SysTick->LOAD = SystemCoreClock / 1000;
SysTick->VAL = 0;
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
while ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0);
SysTick->CTRL = ~SysTick_CTRL_ENABLE_Msk;
us -= 1000;
}
if (us > 0)
{
SysTick->LOAD = us * SystemCoreClock / 1000 / 1000;
SysTick->VAL = 0;
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
while ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0);
SysTick->CTRL = ~SysTick_CTRL_ENABLE_Msk;
}
}
st7789.h
cpp
#ifndef __ST7789_H__
#define __ST7789_H__
#include <stdbool.h>
#include <stdint.h>
#define ST7789_WIDTH 240
#define ST7789_HEIGHT 320
#define mkcolor(r, g, b) (((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3))
void st7789_init(void);
void st7789_fill_color(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color);
#endif /* __ST7789_H__ */
st7789.c
cpp
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include "stm32f4xx.h"
#include "cpu_delay.h"
#include "st7789.h"
// LCD_CLK -- SPI2_SCK -- PB13
// LCD_MOSI -- SPI2_MOSI -- PC3 发送
// LCD_MISO -- SPI2_MISO -- PC2 接收(这里没有使用,只用了单片机给LCD发送)
// LCD_CS -- PE2 片选
// LCD_RESET -- PE3
// LCD_DC -- PE4
// BL--LCD_LED --PE5
#define CS_PORT GPIOE
#define CS_PIN GPIO_Pin_2
#define RESET_PORT GPIOE
#define RESET_PIN GPIO_Pin_3
#define DC_PORT GPIOE
#define DC_PIN GPIO_Pin_4
#define BL_PORT GPIOE
#define BL_PIN GPIO_Pin_5
#define delay_us(x) cpu_delay(x)
#define delay_ms(x) cpu_delay((x) * 1000)
static void st7789_init_display(void);
void st7789_init(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_StructInit(&GPIO_InitStruct);
GPIO_SetBits(GPIOE, GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5);
GPIO_ResetBits(BL_PORT, BL_PIN);
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_Speed = GPIO_High_Speed;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5;
GPIO_Init(GPIOE, &GPIO_InitStruct);
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_Speed = GPIO_High_Speed;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_13;
GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3;
GPIO_Init(GPIOC, &GPIO_InitStruct);
GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_SPI2);
GPIO_PinAFConfig(GPIOC, GPIO_PinSource2, GPIO_AF_SPI2);
GPIO_PinAFConfig(GPIOC, GPIO_PinSource3, GPIO_AF_SPI2);
SPI_InitTypeDef SPI_InitStruct;
SPI_StructInit(&SPI_InitStruct);
SPI_InitStruct.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStruct.SPI_Mode = SPI_Mode_Master;
SPI_InitStruct.SPI_DataSize = SPI_DataSize_8b;
SPI_InitStruct.SPI_CPOL = SPI_CPOL_Low;
SPI_InitStruct.SPI_CPHA = SPI_CPHA_1Edge;
SPI_InitStruct.SPI_NSS = SPI_NSS_Soft;
SPI_InitStruct.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4;
SPI_InitStruct.SPI_FirstBit = SPI_FirstBit_MSB;
SPI_Init(SPI2, &SPI_InitStruct);
SPI_Cmd(SPI2, ENABLE);
st7789_init_display();
}
static void st7789_write_register(uint8_t reg, uint8_t data[], uint16_t length)
{
//DC中的D表示数据,C表示命令,先发命令拉低电平
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_ResetBits(DC_PORT, DC_PIN);
SPI_SendData(SPI2, reg);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
//DC拉高表示后面即将发送数据
GPIO_SetBits(DC_PORT, DC_PIN);
for (uint16_t i = 0; i < length; i++)
{
SPI_SendData(SPI2, data[i]);
while (!SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE));
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
//屏幕复位函数
static void st7789_reset(void)
{
//先拉低片选
GPIO_ResetBits(RESET_PORT, RESET_PIN);
delay_us(20);
//再拉高片选
GPIO_SetBits(RESET_PORT, RESET_PIN);
delay_ms(120);
}
//屏幕背光开关
static void st7789_set_backlight(bool on)
{
GPIO_WriteBit(BL_PORT, BL_PIN, on ? Bit_SET : Bit_RESET);
}
//初始化屏幕
static void st7789_init_display(void)
{
st7789_reset();
st7789_write_register(0x11, NULL, 0);
delay_ms(5);
st7789_write_register(0x36, (uint8_t[]){0x00}, 1);
st7789_write_register(0x3A, (uint8_t[]){0x55}, 1);
st7789_write_register(0xB7, (uint8_t[]){0x46}, 1);
st7789_write_register(0xBB, (uint8_t[]){0x1B}, 1);
st7789_write_register(0xC0, (uint8_t[]){0x2C}, 1);
st7789_write_register(0xC2, (uint8_t[]){0x01}, 1);
st7789_write_register(0xC4, (uint8_t[]){0x20}, 1);
st7789_write_register(0xC6, (uint8_t[]){0x0F}, 1);
st7789_write_register(0xD0, (uint8_t[]){0xA4,0xA1}, 2);
st7789_write_register(0xD6, (uint8_t[]){0xA1}, 1);
st7789_write_register(0xE0, (uint8_t[]){0xF0,0x00,0x06,0x04,0x05,0x05,0x31,0x44,0x48,0x36,0x12,0x12,0x2B,0x34}, 14);
st7789_write_register(0xE0, (uint8_t[]){0xF0,0x0B,0x0F,0x0F,0x0D,0x26,0x31,0x43,0x47,0x38,0x14,0x14,0x2C,0x32}, 14);
st7789_write_register(0x21, NULL, 0);
st7789_write_register(0x29, NULL, 0);
st7789_fill_color(0, 0, ST7789_WIDTH - 1, ST7789_HEIGHT - 1, 0x0000);
st7789_set_backlight(true);
}
//范围效验函数,防止坐标越界
static bool in_screen_range(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
if (x1 >= ST7789_WIDTH || y1 >= ST7789_HEIGHT)
return false;
if (x2 >= ST7789_WIDTH || y2 >= ST7789_HEIGHT)
return false;
if (x1 > x2 || y1 > y2)
return false;
return true;
}
//设置屏幕显示区域
static void st7789_set_range(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
st7789_write_register(0x2A, (uint8_t[]){(x1 >> 8) & 0xff, x1 & 0xff, (x2 >> 8) & 0xff, x2 & 0xff}, 4);
st7789_write_register(0x2B, (uint8_t[]){(y1 >> 8) & 0xff, y1 & 0xff, (y2 >> 8) & 0xff, x2 & 0xff}, 4);
}
//告诉ST7789接下来要写入的是像素数据
static void st7789_set_gram_mode(void)
{
st7789_write_register(0x2C, NULL, 0);
}
//颜色填充函数
void st7789_fill_color(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
{
if (!in_screen_range(x1, y1, x2, y2))
return;
st7789_set_range(x1, y1, x2, y2);
st7789_set_gram_mode();
uint8_t color_data[2] = {(color >> 8) & 0xff, color & 0xff};
uint32_t pixels = (x2 - x1 + 1) * (y2 - y1 + 1);
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_SetBits(DC_PORT, DC_PIN);
for (uint32_t i = 0; i < pixels; i++)
{
SPI_SendData(SPI2, color_data[0]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
SPI_SendData(SPI2, color_data[1]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
main.c
cpp
#include <stdint.h>
#include "stm32f4xx.h"
#include "st7789.h"
int main(void)
{
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE);
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE);
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
st7789_init();
st7789_fill_color(0, 0, 79, 319, mkcolor(255, 0, 0));
st7789_fill_color(80, 0, 159, 319, mkcolor(0, 255, 0));
st7789_fill_color(160, 0, 239, 319, mkcolor(0, 0, 255));
while (1)
{
;
}
}

LCD显示中英文


cpp
#include <stdio.h>
#include <stdint.h>
int main() {
// 修正:补充分号、移除特殊换行符、格式化点阵数据
const uint8_t model[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x07,0xE0,0x08,0x38,
0x10,0x18,0x20,0x0C,0x20,0x0C,0x30,0x0C,
0x30,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,
0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x80,
0x03,0x00,0x02,0x00,0x04,0x04,0x08,0x04,
0x10,0x04,0x20,0x0C,0x3F,0xF8,0x3F,0xF8,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
};
// 每行占用的字节数(16列=2字节)
uint16_t bytes_per_row = 2;
// 遍历32行数据
for (uint16_t row = 0; row < 32; row++) {
// 计算当前行数据的起始地址
const uint8_t *row_data = model + row * bytes_per_row;
// 遍历16列像素
for (uint16_t col = 0; col < 16; col++) {
// 从字节中提取对应位的像素值(1表示有像素,0表示无)
uint8_t pixel = row_data[col / 8] & (1 << (7 - col % 8));
// 有像素输出*,无像素输出空格
printf("%c", pixel ? '*' : ' ');
}
// 每行结束后换行
printf("\n");
}
return 0;
}




st7789.c
cpp
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "stm32f4xx.h"
#include "cpu_delay.h"
#include "st7789.h"
#include "font.h"
// CLK ------ PB13
// MOSI ------ PC3
// MISO ------ PC2
// CS ------ PE2
// RESET ------ PE3
// DC ------ PE4
// BL ------ PE5
#define CS_PORT GPIOE
#define CS_PIN GPIO_Pin_2
#define RESET_PORT GPIOE
#define RESET_PIN GPIO_Pin_3
#define DC_PORT GPIOE
#define DC_PIN GPIO_Pin_4
#define BL_PORT GPIOE
#define BL_PIN GPIO_Pin_5
#define delay_us(x) cpu_delay(x)
#define delay_ms(x) cpu_delay((x) * 1000)
static void st7789_init_display(void);
void st7789_init(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_StructInit(&GPIO_InitStruct);
GPIO_SetBits(GPIOE, GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5);
GPIO_ResetBits(BL_PORT, BL_PIN);
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_Speed = GPIO_High_Speed;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5;
GPIO_Init(GPIOE, &GPIO_InitStruct);
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_Speed = GPIO_High_Speed;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_13;
GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3;
GPIO_Init(GPIOC, &GPIO_InitStruct);
GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_SPI2);
GPIO_PinAFConfig(GPIOC, GPIO_PinSource2, GPIO_AF_SPI2);
GPIO_PinAFConfig(GPIOC, GPIO_PinSource3, GPIO_AF_SPI2);
SPI_InitTypeDef SPI_InitStruct;
SPI_StructInit(&SPI_InitStruct);
SPI_InitStruct.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStruct.SPI_Mode = SPI_Mode_Master;
SPI_InitStruct.SPI_DataSize = SPI_DataSize_8b;
SPI_InitStruct.SPI_CPOL = SPI_CPOL_Low;
SPI_InitStruct.SPI_CPHA = SPI_CPHA_1Edge;
SPI_InitStruct.SPI_NSS = SPI_NSS_Soft;
SPI_InitStruct.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4;
SPI_InitStruct.SPI_FirstBit = SPI_FirstBit_MSB;
SPI_Init(SPI2, &SPI_InitStruct);
SPI_Cmd(SPI2, ENABLE);
st7789_init_display();
}
static void st7789_write_register(uint8_t reg, uint8_t data[], uint16_t length)
{
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_ResetBits(DC_PORT, DC_PIN);
SPI_SendData(SPI2, reg);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(DC_PORT, DC_PIN);
for (uint16_t i = 0; i < length; i++)
{
SPI_SendData(SPI2, data[i]);
while (!SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE));
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
static void st7789_reset(void)
{
GPIO_ResetBits(RESET_PORT, RESET_PIN);
delay_us(20);
GPIO_SetBits(RESET_PORT, RESET_PIN);
delay_ms(120);
}
static void st7789_set_backlight(bool on)
{
GPIO_WriteBit(BL_PORT, BL_PIN, on ? Bit_SET : Bit_RESET);
}
static void st7789_init_display(void)
{
st7789_reset();
st7789_write_register(0x11, NULL, 0);
delay_ms(5);
st7789_write_register(0x36, (uint8_t[]){0x00}, 1);
st7789_write_register(0x3A, (uint8_t[]){0x55}, 1);
st7789_write_register(0xB7, (uint8_t[]){0x46}, 1);
st7789_write_register(0xBB, (uint8_t[]){0x1B}, 1);
st7789_write_register(0xC0, (uint8_t[]){0x2C}, 1);
st7789_write_register(0xC2, (uint8_t[]){0x01}, 1);
st7789_write_register(0xC4, (uint8_t[]){0x20}, 1);
st7789_write_register(0xC6, (uint8_t[]){0x0F}, 1);
st7789_write_register(0xD0, (uint8_t[]){0xA4,0xA1}, 2);
st7789_write_register(0xD6, (uint8_t[]){0xA1}, 1);
st7789_write_register(0xE0, (uint8_t[]){0xF0,0x00,0x06,0x04,0x05,0x05,0x31,0x44,0x48,0x36,0x12,0x12,0x2B,0x34}, 14);
st7789_write_register(0xE0, (uint8_t[]){0xF0,0x0B,0x0F,0x0F,0x0D,0x26,0x31,0x43,0x47,0x38,0x14,0x14,0x2C,0x32}, 14);
st7789_write_register(0x21, NULL, 0);
st7789_write_register(0x29, NULL, 0);
st7789_fill_color(0, 0, ST7789_WIDTH - 1, ST7789_HEIGHT - 1, 0x0000);
st7789_set_backlight(true);
}
static bool in_screen_range(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
if (x1 >= ST7789_WIDTH || y1 >= ST7789_HEIGHT)
return false;
if (x2 >= ST7789_WIDTH || y2 >= ST7789_HEIGHT)
return false;
if (x1 > x2 || y1 > y2)
return false;
return true;
}
static void st7789_set_range_and_prepare_gram(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
st7789_write_register(0x2A, (uint8_t[]){(x1 >> 8) & 0xff, x1 & 0xff, (x2 >> 8) & 0xff, x2 & 0xff}, 4);
st7789_write_register(0x2B, (uint8_t[]){(y1 >> 8) & 0xff, y1 & 0xff, (y2 >> 8) & 0xff, y2 & 0xff}, 4);
st7789_write_register(0x2C, NULL, 0);
}
void st7789_fill_color(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
{
if (!in_screen_range(x1, y1, x2, y2))
return;
st7789_set_range_and_prepare_gram(x1, y1, x2, y2);
uint8_t color_data[2] = {(color >> 8) & 0xff, color & 0xff};
uint32_t pixels = (x2 - x1 + 1) * (y2 - y1 + 1);
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_SetBits(DC_PORT, DC_PIN);
for (uint32_t i = 0; i < pixels; i++)
{
SPI_SendData(SPI2, color_data[0]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
SPI_SendData(SPI2, color_data[1]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
static void st7789_draw_font(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t *model, uint16_t color, uint16_t bg_color)
{
uint16_t bytes_per_row = (width + 7) / 8;
uint8_t color_data[2] = {(color >> 8) & 0xff, color & 0xff};
uint8_t bg_color_data[2] = {(bg_color >> 8) & 0xff, bg_color & 0xff};
st7789_set_range_and_prepare_gram(x, y, x + width - 1, y + height - 1);
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_SetBits(DC_PORT, DC_PIN);
for (uint16_t row = 0; row < height; row++)
{
const uint8_t *row_data = model + row * bytes_per_row;
for (uint16_t col = 0; col < width; col++)
{
uint8_t pixel = row_data[col / 8] & (1 << (7 - col % 8));
if (pixel)
{
SPI_SendData(SPI2, color_data[0]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
SPI_SendData(SPI2, color_data[1]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
}
else
{
SPI_SendData(SPI2, bg_color_data[0]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
SPI_SendData(SPI2, bg_color_data[1]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
}
}
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
static void st7789_write_ascii(uint16_t x, uint16_t y, char ch, uint16_t color, uint16_t bg_color, const font_t *font)
{
if (font == NULL)
return;
uint16_t fheight = font->size, fwidth = font->size / 2;
if (!in_screen_range(x, y, x + fwidth - 1, y + fheight - 1))
return;
if (ch < 0x20 || ch > 0x7E)
return;
uint16_t bytes_per_row = (fwidth + 7) / 8;
const uint8_t *model = font->ascii_model + (ch - ' ') * fheight * bytes_per_row;
st7789_draw_font(x, y, fwidth, fheight, model, color, bg_color);
}
static void st7789_write_chinese(uint16_t x, uint16_t y, char *ch, uint16_t color, uint16_t bg_color, const font_t *font)
{
if (ch == NULL || font == NULL)
return;
uint16_t fheight = font->size, fwidth = font->size;
if (!in_screen_range(x, y, x + fwidth - 1, y + fheight - 1))
return;
const font_chinese_t *c = font->chinese;
for (; c->name != NULL; c++)
{
if (strcmp(c->name, ch) == 0)
break;
}
if (c->name == NULL)
return;
st7789_draw_font(x, y, fwidth, fheight, c->model, color, bg_color);
}
static bool is_gb2312(char ch)
{
return ((unsigned char)ch >= 0xA1 && (unsigned char)ch <= 0xF7);
}
//static int utf8_char_length(const char *str)
//{
// if ((*str & 0x80) == 0) return 1; // 1 byte
// if ((*str & 0xE0) == 0xC0) return 2; // 2 bytes
// if ((*str & 0xF0) == 0xE0) return 3; // 3 bytes
// if ((*str & 0xF8) == 0xF0) return 4; // 4 bytes
// return -1; // Invalid UTF-8
//}
void st7789_write_string(uint16_t x, uint16_t y, char *str, uint16_t color, uint16_t bg_color, const font_t *font)
{
while (*str)
{
// int len = utf8_char_length(*str);
int len = is_gb2312(*str) ? 2 : 1;
if (len <= 0)
{
str++;
continue;
}
else if (len == 1)
{
st7789_write_ascii(x, y, *str, color, bg_color, font);
str++;
x += font->size / 2;
}
else
{
char ch[5];
strncpy(ch, str, len);
st7789_write_chinese(x, y, ch, color, bg_color, font);
str += len;
x += font->size;
}
}
}

LCD显示图片


汇总代码
st7789.c
cpp
#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "stm32f4xx.h"
#include "cpu_delay.h"
#include "st7789.h"
#include "font.h"
#include "image.h"
// LCD_CLK -- SPI2_SCK -- PB13
// LCD_MOSI -- SPI2_MOSI -- PC3 发送
// LCD_MISO -- SPI2_MISO -- PC2 接收(这里没有使用,只用了单片机给LCD发送)
// LCD_CS -- PE2 片选
// LCD_RESET -- PE3
// LCD_DC -- PE4
// BL--LCD_LED --PE5
#define CS_PORT GPIOE
#define CS_PIN GPIO_Pin_2
#define RESET_PORT GPIOE
#define RESET_PIN GPIO_Pin_3
#define DC_PORT GPIOE
#define DC_PIN GPIO_Pin_4
#define BL_PORT GPIOE
#define BL_PIN GPIO_Pin_5
#define delay_us(x) cpu_delay(x)
#define delay_ms(x) cpu_delay((x) * 1000)
static void st7789_init_display(void);
void st7789_init(void)
{
GPIO_InitTypeDef GPIO_InitStruct;
GPIO_StructInit(&GPIO_InitStruct);
GPIO_SetBits(GPIOE, GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5);
GPIO_ResetBits(BL_PORT, BL_PIN);
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_Speed = GPIO_High_Speed;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5;
GPIO_Init(GPIOE, &GPIO_InitStruct);
GPIO_InitStruct.GPIO_Mode = GPIO_Mode_AF;
GPIO_InitStruct.GPIO_OType = GPIO_OType_PP;
GPIO_InitStruct.GPIO_Speed = GPIO_High_Speed;
GPIO_InitStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_13;
GPIO_Init(GPIOB, &GPIO_InitStruct);
GPIO_InitStruct.GPIO_Pin = GPIO_Pin_2 | GPIO_Pin_3;
GPIO_Init(GPIOC, &GPIO_InitStruct);
GPIO_PinAFConfig(GPIOB, GPIO_PinSource13, GPIO_AF_SPI2);
GPIO_PinAFConfig(GPIOC, GPIO_PinSource2, GPIO_AF_SPI2);
GPIO_PinAFConfig(GPIOC, GPIO_PinSource3, GPIO_AF_SPI2);
SPI_InitTypeDef SPI_InitStruct;
SPI_StructInit(&SPI_InitStruct);
SPI_InitStruct.SPI_Direction = SPI_Direction_2Lines_FullDuplex;
SPI_InitStruct.SPI_Mode = SPI_Mode_Master;
SPI_InitStruct.SPI_DataSize = SPI_DataSize_8b;
SPI_InitStruct.SPI_CPOL = SPI_CPOL_Low;
SPI_InitStruct.SPI_CPHA = SPI_CPHA_1Edge;
SPI_InitStruct.SPI_NSS = SPI_NSS_Soft;
SPI_InitStruct.SPI_BaudRatePrescaler = SPI_BaudRatePrescaler_4;
SPI_InitStruct.SPI_FirstBit = SPI_FirstBit_MSB;
SPI_Init(SPI2, &SPI_InitStruct);
SPI_Cmd(SPI2, ENABLE);
st7789_init_display();
}
static void st7789_write_register(uint8_t reg, uint8_t data[], uint16_t length)
{
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_ResetBits(DC_PORT, DC_PIN);
SPI_SendData(SPI2, reg);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(DC_PORT, DC_PIN);
for (uint16_t i = 0; i < length; i++)
{
SPI_SendData(SPI2, data[i]);
while (!SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE));
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
static void st7789_reset(void)
{
GPIO_ResetBits(RESET_PORT, RESET_PIN);
delay_us(20);
GPIO_SetBits(RESET_PORT, RESET_PIN);
delay_ms(120);
}
static void st7789_set_backlight(bool on)
{
GPIO_WriteBit(BL_PORT, BL_PIN, on ? Bit_SET : Bit_RESET);
}
static void st7789_init_display(void)
{
st7789_reset();
st7789_write_register(0x11, NULL, 0);
delay_ms(5);
st7789_write_register(0x36, (uint8_t[]){0x00}, 1);
st7789_write_register(0x3A, (uint8_t[]){0x55}, 1);
st7789_write_register(0xB7, (uint8_t[]){0x46}, 1);
st7789_write_register(0xBB, (uint8_t[]){0x1B}, 1);
st7789_write_register(0xC0, (uint8_t[]){0x2C}, 1);
st7789_write_register(0xC2, (uint8_t[]){0x01}, 1);
st7789_write_register(0xC4, (uint8_t[]){0x20}, 1);
st7789_write_register(0xC6, (uint8_t[]){0x0F}, 1);
st7789_write_register(0xD0, (uint8_t[]){0xA4,0xA1}, 2);
st7789_write_register(0xD6, (uint8_t[]){0xA1}, 1);
st7789_write_register(0xE0, (uint8_t[]){0xF0,0x00,0x06,0x04,0x05,0x05,0x31,0x44,0x48,0x36,0x12,0x12,0x2B,0x34}, 14);
st7789_write_register(0xE0, (uint8_t[]){0xF0,0x0B,0x0F,0x0F,0x0D,0x26,0x31,0x43,0x47,0x38,0x14,0x14,0x2C,0x32}, 14);
st7789_write_register(0x21, NULL, 0);
st7789_write_register(0x29, NULL, 0);
st7789_fill_color(0, 0, ST7789_WIDTH - 1, ST7789_HEIGHT - 1, 0x0000);
st7789_set_backlight(true);
}
static bool in_screen_range(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
if (x1 >= ST7789_WIDTH || y1 >= ST7789_HEIGHT)
return false;
if (x2 >= ST7789_WIDTH || y2 >= ST7789_HEIGHT)
return false;
if (x1 > x2 || y1 > y2)
return false;
return true;
}
static void st7789_set_range_and_prepare_gram(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2)
{
st7789_write_register(0x2A, (uint8_t[]){(x1 >> 8) & 0xff, x1 & 0xff, (x2 >> 8) & 0xff, x2 & 0xff}, 4);
st7789_write_register(0x2B, (uint8_t[]){(y1 >> 8) & 0xff, y1 & 0xff, (y2 >> 8) & 0xff, y2 & 0xff}, 4);
st7789_write_register(0x2C, NULL, 0);
}
void st7789_fill_color(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2, uint16_t color)
{
if (!in_screen_range(x1, y1, x2, y2))
return;
st7789_set_range_and_prepare_gram(x1, y1, x2, y2);
uint8_t color_data[2] = {(color >> 8) & 0xff, color & 0xff};
uint32_t pixels = (x2 - x1 + 1) * (y2 - y1 + 1);
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_SetBits(DC_PORT, DC_PIN);
for (uint32_t i = 0; i < pixels; i++)
{
SPI_SendData(SPI2, color_data[0]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
SPI_SendData(SPI2, color_data[1]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
static void st7789_draw_font(uint16_t x, uint16_t y, uint16_t width, uint16_t height, const uint8_t *model, uint16_t color, uint16_t bg_color)
{
uint16_t bytes_per_row = (width + 7) / 8;
uint8_t color_data[2] = {(color >> 8) & 0xff, color & 0xff};
uint8_t bg_color_data[2] = {(bg_color >> 8) & 0xff, bg_color & 0xff};
st7789_set_range_and_prepare_gram(x, y, x + width - 1, y + height - 1);
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_SetBits(DC_PORT, DC_PIN);
for (uint16_t row = 0; row < height; row++)
{
const uint8_t *row_data = model + row * bytes_per_row;
for (uint16_t col = 0; col < width; col++)
{
uint8_t pixel = row_data[col / 8] & (1 << (7 - col % 8));
if (pixel)
{
SPI_SendData(SPI2, color_data[0]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
SPI_SendData(SPI2, color_data[1]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
}
else
{
SPI_SendData(SPI2, bg_color_data[0]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
SPI_SendData(SPI2, bg_color_data[1]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
}
}
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
static void st7789_write_ascii(uint16_t x, uint16_t y, char ch, uint16_t color, uint16_t bg_color, const font_t *font)
{
if (font == NULL)
return;
uint16_t fheight = font->size, fwidth = font->size / 2;
if (!in_screen_range(x, y, x + fwidth - 1, y + fheight - 1))
return;
if (ch < 0x20 || ch > 0x7E)
return;
uint16_t bytes_per_row = (fwidth + 7) / 8;
const uint8_t *model = font->ascii_model + (ch - ' ') * fheight * bytes_per_row;
st7789_draw_font(x, y, fwidth, fheight, model, color, bg_color);
}
static void st7789_write_chinese(uint16_t x, uint16_t y, char *ch, uint16_t color, uint16_t bg_color, const font_t *font)
{
if (ch == NULL || font == NULL)
return;
uint16_t fheight = font->size, fwidth = font->size;
if (!in_screen_range(x, y, x + fwidth - 1, y + fheight - 1))
return;
const font_chinese_t *c = font->chinese;
for (; c->name != NULL; c++)
{
if (strcmp(c->name, ch) == 0)
break;
}
if (c->name == NULL)
return;
st7789_draw_font(x, y, fwidth, fheight, c->model, color, bg_color);
}
static bool is_gb2312(char ch)
{
return ((unsigned char)ch >= 0xA1 && (unsigned char)ch <= 0xF7);
}
//static int utf8_char_length(const char *str)
//{
// if ((*str & 0x80) == 0) return 1; // 1 byte
// if ((*str & 0xE0) == 0xC0) return 2; // 2 bytes
// if ((*str & 0xF0) == 0xE0) return 3; // 3 bytes
// if ((*str & 0xF8) == 0xF0) return 4; // 4 bytes
// return -1; // Invalid UTF-8
//}
void st7789_write_string(uint16_t x, uint16_t y, char *str, uint16_t color, uint16_t bg_color, const font_t *font)
{
while (*str)
{
// int len = utf8_char_length(*str);
int len = is_gb2312(*str) ? 2 : 1;
if (len <= 0)
{
str++;
continue;
}
else if (len == 1)
{
st7789_write_ascii(x, y, *str, color, bg_color, font);
str++;
x += font->size / 2;
}
else
{
char ch[5];
strncpy(ch, str, len);
st7789_write_chinese(x, y, ch, color, bg_color, font);
str += len;
x += font->size;
}
}
}
void st7789_draw_image(uint16_t x, uint16_t y, const image_t *image)
{
if (x >= ST7789_WIDTH || y >= ST7789_HEIGHT ||
x + image->width - 1 >= ST7789_WIDTH || y + image->height + 1 >= ST7789_HEIGHT)
return;
st7789_set_range_and_prepare_gram(x, y, x + image->width - 1, y + image->height - 1);
GPIO_ResetBits(CS_PORT, CS_PIN);
GPIO_SetBits(DC_PORT, DC_PIN);
uint32_t size = image->width * image->height * 2;
const uint8_t *data = image->data;
for (uint32_t i = 0; i < size; i += 2)
{
SPI_SendData(SPI2, data[i + 1]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
SPI_SendData(SPI2, data[i]);
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_TXE) == RESET);
}
while (SPI_GetFlagStatus(SPI2, SPI_FLAG_BSY) != RESET);
GPIO_SetBits(CS_PORT, CS_PIN);
}
st7789.h
cpp
#ifndef __ST7789_H__
#define __ST7789_H__
#include <stdbool.h>
#include <stdint.h>
#include "font.h"
#include "image.h"
#define ST7789_WIDTH 240
#define ST7789_HEIGHT 320
#define mkcolor(r, g, b) (((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3))
void st7789_init(void);
void st7789_fill_color(uint16_t x, uint16_t y, uint16_t width, uint16_t height, uint16_t color);
void st7789_write_string(uint16_t x, uint16_t y, char *str, uint16_t color, uint16_t bg_color, const font_t *font);
void st7789_draw_image(uint16_t x, uint16_t y, const image_t *image);
#endif /* __ST7789_H__ */
cpu_delay.c
cpp
#include <stdint.h>
#include <string.h>
#include "stm32f4xx.h"
void cpu_delay(uint32_t us)
{
while (us >= 1000)
{
SysTick->LOAD = SystemCoreClock / 1000;
SysTick->VAL = 0;
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
while ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0);
SysTick->CTRL = ~SysTick_CTRL_ENABLE_Msk;
us -= 1000;
}
if (us > 0)
{
SysTick->LOAD = us * SystemCoreClock / 1000 / 1000;
SysTick->VAL = 0;
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
while ((SysTick->CTRL & SysTick_CTRL_COUNTFLAG_Msk) == 0);
SysTick->CTRL = ~SysTick_CTRL_ENABLE_Msk;
}
}
cpu_delay.h
cpp
#ifndef __CPU_DELAY_H__
#define __CPU_DELAY_H__
void cpu_delay(uint32_t us);
#endif /* __CPU_DELAY_H__ */
font.h
cpp
#ifndef __FONT_H__
#define __FONT_H__
#include <stdint.h>
typedef struct
{
const char *name;
const uint8_t *model;
} font_chinese_t;
typedef struct
{
uint16_t size;
const uint8_t *ascii_model;
const font_chinese_t *chinese;
} font_t;
extern const font_t font16;
extern const font_t font32;
extern const font_t font48;
#endif /* __FONT_H__ */
font32.c
cpp
#include <stdint.h>
#include "font.h"
static const uint8_t ascii_model[] = {
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,/*" ",0*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x03,0xC0,
0x03,0xC0,0x03,0xC0,0x03,0xC0,0x03,0xC0,0x01,0xC0,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x80,0x03,0xC0,0x03,0xC0,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"!",1*/
0x00,0x00,0x00,0x00,0x03,0x18,0x07,0x38,0x07,0x38,0x0E,0x70,0x0C,0x60,0x18,0xC0,
0x31,0x80,0x21,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,/*""",2*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x08,0x04,0x08,
0x04,0x08,0x04,0x08,0x04,0x08,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x08,0x10,0x08,0x10,
0x08,0x10,0x08,0x10,0x08,0x10,0x08,0x10,0x7F,0xFE,0x7F,0xFE,0x7F,0xFE,0x18,0x30,
0x10,0x20,0x10,0x20,0x10,0x20,0x10,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"#",3*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x03,0xC0,0x0D,0x30,
0x09,0x18,0x19,0x18,0x19,0x38,0x19,0x38,0x1D,0x00,0x0D,0x00,0x0F,0x00,0x07,0x00,
0x03,0xC0,0x01,0xE0,0x01,0xF0,0x01,0x30,0x01,0x38,0x01,0x18,0x39,0x18,0x39,0x18,
0x31,0x18,0x31,0x30,0x19,0x60,0x07,0xC0,0x01,0x00,0x01,0x00,0x01,0x00,0x00,0x00,/*"$",4*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x10,0x6C,0x10,
0x44,0x20,0xC6,0x20,0xC6,0x40,0xC6,0x40,0xC6,0x40,0xC6,0x80,0xC6,0x80,0x44,0x80,
0x6D,0x38,0x39,0x6C,0x02,0x44,0x02,0xC6,0x02,0xC6,0x04,0xC6,0x04,0xC6,0x08,0xC6,
0x08,0xC6,0x08,0x44,0x10,0x6C,0x10,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"%",5*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x19,0x00,
0x31,0x80,0x31,0x80,0x31,0x80,0x31,0x80,0x31,0x00,0x33,0x00,0x3A,0x00,0x1C,0x00,
0x38,0x7C,0x3C,0x10,0x4C,0x10,0xCE,0x10,0xC6,0x20,0xC7,0x20,0xC3,0x20,0xC1,0xC0,
0xC1,0xC2,0x60,0xE6,0x31,0x7C,0x1E,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"&",6*/
0x00,0x00,0x00,0x00,0x38,0x00,0x3C,0x00,0x3C,0x00,0x0C,0x00,0x0C,0x00,0x08,0x00,
0x30,0x00,0x60,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,/*"'",7*/
0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x04,0x00,0x08,0x00,0x18,0x00,0x30,0x00,0x20,
0x00,0x60,0x00,0x40,0x00,0xC0,0x00,0xC0,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x00,0xC0,0x00,0xC0,0x00,0x40,
0x00,0x60,0x00,0x20,0x00,0x30,0x00,0x18,0x00,0x08,0x00,0x04,0x00,0x02,0x00,0x00,/*"(",8*/
0x00,0x00,0x00,0x00,0x40,0x00,0x20,0x00,0x10,0x00,0x18,0x00,0x0C,0x00,0x04,0x00,
0x06,0x00,0x02,0x00,0x03,0x00,0x03,0x00,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x03,0x00,0x03,0x00,0x03,0x00,
0x06,0x00,0x04,0x00,0x0C,0x00,0x18,0x00,0x10,0x00,0x20,0x00,0x40,0x00,0x00,0x00,/*")",9*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0xC0,0x01,0xC0,0x01,0xC0,0x30,0xC6,0x38,0x8E,0x1C,0x9C,0x06,0xB0,0x01,0xC0,
0x01,0xC0,0x06,0xB0,0x1C,0x9C,0x38,0x8E,0x31,0x86,0x01,0xC0,0x01,0xC0,0x01,0xC0,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"*",10*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
0x3F,0xFE,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"+",11*/
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,
0x38,0x00,0x3C,0x00,0x3C,0x00,0x0C,0x00,0x0C,0x00,0x08,0x00,0x30,0x00,0x60,0x00,/*",",12*/
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,
0x7F,0xFE,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,/*"-",13*/
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,
0x18,0x00,0x3C,0x00,0x3C,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*".",14*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x06,0x00,0x04,0x00,0x0C,0x00,0x08,
0x00,0x18,0x00,0x10,0x00,0x30,0x00,0x20,0x00,0x60,0x00,0x40,0x00,0xC0,0x00,0x80,
0x01,0x80,0x01,0x00,0x03,0x00,0x02,0x00,0x06,0x00,0x04,0x00,0x0C,0x00,0x08,0x00,
0x18,0x00,0x10,0x00,0x30,0x00,0x20,0x00,0x60,0x00,0x40,0x00,0x00,0x00,0x00,0x00,/*"/",15*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x06,0x20,
0x0C,0x30,0x18,0x18,0x18,0x18,0x18,0x08,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x18,0x08,0x18,0x18,
0x18,0x18,0x0C,0x30,0x06,0x20,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"0",16*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x01,0x80,
0x1F,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x03,0xC0,0x1F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"1",17*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x08,0x38,
0x10,0x18,0x20,0x0C,0x20,0x0C,0x30,0x0C,0x30,0x0C,0x00,0x0C,0x00,0x18,0x00,0x18,
0x00,0x30,0x00,0x60,0x00,0xC0,0x01,0x80,0x03,0x00,0x02,0x00,0x04,0x04,0x08,0x04,
0x10,0x04,0x20,0x0C,0x3F,0xF8,0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"2",18*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x18,0x60,
0x30,0x30,0x30,0x18,0x30,0x18,0x30,0x18,0x00,0x18,0x00,0x18,0x00,0x30,0x00,0x60,
0x03,0xC0,0x00,0x70,0x00,0x18,0x00,0x08,0x00,0x0C,0x00,0x0C,0x30,0x0C,0x30,0x0C,
0x30,0x08,0x30,0x18,0x18,0x30,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"3",19*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x60,
0x00,0xE0,0x00,0xE0,0x01,0x60,0x01,0x60,0x02,0x60,0x04,0x60,0x04,0x60,0x08,0x60,
0x08,0x60,0x10,0x60,0x30,0x60,0x20,0x60,0x40,0x60,0x7F,0xFC,0x00,0x60,0x00,0x60,
0x00,0x60,0x00,0x60,0x00,0x60,0x03,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"4",20*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFC,0x0F,0xFC,
0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x10,0x00,0x13,0xE0,0x14,0x30,
0x18,0x18,0x10,0x08,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x30,0x0C,0x30,0x0C,
0x20,0x18,0x20,0x18,0x18,0x30,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"5",21*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xE0,0x06,0x18,
0x0C,0x18,0x08,0x18,0x18,0x00,0x10,0x00,0x10,0x00,0x30,0x00,0x33,0xE0,0x36,0x30,
0x38,0x18,0x38,0x08,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x18,0x0C,
0x18,0x08,0x0C,0x18,0x0E,0x30,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"6",22*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFC,0x1F,0xFC,
0x10,0x08,0x30,0x10,0x20,0x10,0x20,0x20,0x00,0x20,0x00,0x40,0x00,0x40,0x00,0x40,
0x00,0x80,0x00,0x80,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x03,0x00,0x03,0x00,
0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"7",23*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x0C,0x30,
0x18,0x18,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x38,0x0C,0x38,0x08,0x1E,0x18,0x0F,0x20,
0x07,0xC0,0x18,0xF0,0x30,0x78,0x30,0x38,0x60,0x1C,0x60,0x0C,0x60,0x0C,0x60,0x0C,
0x60,0x0C,0x30,0x18,0x18,0x30,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"8",24*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xC0,0x18,0x20,
0x30,0x10,0x30,0x18,0x60,0x08,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,0x60,0x0C,
0x70,0x1C,0x30,0x2C,0x18,0x6C,0x0F,0x8C,0x00,0x0C,0x00,0x18,0x00,0x18,0x00,0x10,
0x30,0x30,0x30,0x60,0x30,0xC0,0x0F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"9",25*/
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,0x80,0x03,0xC0,0x03,0xC0,
0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x80,0x03,0xC0,0x03,0xC0,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*":",26*/
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,0x03,0x80,0x03,0x80,
0x03,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x80,0x03,0x80,0x03,0x80,0x01,0x80,0x03,0x00,0x03,0x00,0x00,0x00,/*";",27*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x08,
0x00,0x10,0x00,0x20,0x00,0x40,0x00,0x80,0x01,0x00,0x02,0x00,0x04,0x00,0x08,0x00,
0x10,0x00,0x10,0x00,0x08,0x00,0x04,0x00,0x02,0x00,0x01,0x00,0x00,0x80,0x00,0x40,
0x00,0x20,0x00,0x10,0x00,0x08,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"<",28*/
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,0x7F,0xFE,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"=",29*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x10,0x00,
0x08,0x00,0x04,0x00,0x02,0x00,0x01,0x00,0x00,0x80,0x00,0x40,0x00,0x20,0x00,0x10,
0x00,0x08,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x40,0x00,0x80,0x01,0x00,0x02,0x00,
0x04,0x00,0x08,0x00,0x10,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*">",30*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x0C,0x18,
0x18,0x0C,0x10,0x06,0x30,0x06,0x38,0x06,0x38,0x06,0x38,0x06,0x00,0x0C,0x00,0x18,
0x00,0x70,0x00,0xC0,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x00,0x00,0x00,
0x01,0x80,0x03,0xC0,0x03,0xC0,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"?",31*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x06,0x10,
0x0C,0x08,0x18,0x04,0x30,0xD4,0x31,0xB2,0x21,0x32,0x63,0x32,0x63,0x22,0x66,0x22,
0x66,0x22,0x66,0x22,0x66,0x62,0x66,0x64,0x66,0x64,0x26,0xE8,0x33,0x30,0x30,0x02,
0x10,0x04,0x18,0x0C,0x0C,0x18,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"@",32*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x03,0x80,
0x03,0x80,0x03,0x80,0x04,0xC0,0x04,0xC0,0x04,0xC0,0x04,0xC0,0x0C,0x40,0x08,0x60,
0x08,0x60,0x08,0x60,0x18,0x20,0x1F,0xF0,0x10,0x30,0x10,0x30,0x10,0x30,0x20,0x18,
0x20,0x18,0x20,0x18,0x60,0x1C,0xF8,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"A",33*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xE0,0x18,0x38,
0x18,0x18,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x18,0x18,0x30,
0x1F,0xE0,0x18,0x18,0x18,0x0C,0x18,0x04,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,
0x18,0x06,0x18,0x0C,0x18,0x18,0x7F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"B",34*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x06,0x1C,
0x08,0x0C,0x18,0x06,0x30,0x02,0x30,0x02,0x30,0x00,0x60,0x00,0x60,0x00,0x60,0x00,
0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x30,0x02,0x30,0x02,
0x10,0x04,0x18,0x08,0x0C,0x10,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"C",35*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xC0,0x18,0x70,
0x18,0x18,0x18,0x08,0x18,0x0C,0x18,0x0C,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,
0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x04,0x18,0x0C,0x18,0x0C,
0x18,0x18,0x18,0x18,0x18,0x60,0x7F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"D",36*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFC,0x18,0x0C,
0x18,0x04,0x18,0x02,0x18,0x02,0x18,0x00,0x18,0x00,0x18,0x10,0x18,0x10,0x18,0x30,
0x1F,0xF0,0x18,0x30,0x18,0x10,0x18,0x10,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x02,
0x18,0x02,0x18,0x04,0x18,0x0C,0x7F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"E",37*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xFC,0x18,0x1C,
0x18,0x04,0x18,0x02,0x18,0x02,0x18,0x00,0x18,0x00,0x18,0x10,0x18,0x10,0x18,0x30,
0x1F,0xF0,0x18,0x30,0x18,0x10,0x18,0x10,0x18,0x10,0x18,0x00,0x18,0x00,0x18,0x00,
0x18,0x00,0x18,0x00,0x18,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"F",38*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x0C,0x30,
0x08,0x10,0x18,0x18,0x30,0x08,0x30,0x08,0x20,0x00,0x60,0x00,0x60,0x00,0x60,0x00,
0x60,0x00,0x60,0x00,0x60,0x7E,0x60,0x18,0x60,0x18,0x20,0x18,0x30,0x18,0x30,0x18,
0x10,0x18,0x18,0x18,0x0C,0x20,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"G",39*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x3F,0x30,0x0C,
0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
0x3F,0xFC,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
0x30,0x0C,0x30,0x0C,0x30,0x0C,0xFC,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"H",40*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF8,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x1F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"I",41*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFE,0x00,0x60,
0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,
0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,
0x00,0x60,0x00,0x60,0x00,0x60,0x00,0x60,0x70,0x60,0x70,0xC0,0x71,0x80,0x3F,0x00,/*"J",42*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x7C,0x18,0x30,
0x18,0x20,0x18,0x60,0x18,0x40,0x18,0x80,0x18,0x80,0x19,0x00,0x19,0x00,0x1B,0x00,
0x1D,0x80,0x1D,0x80,0x18,0xC0,0x18,0xC0,0x18,0x60,0x18,0x60,0x18,0x30,0x18,0x30,
0x18,0x30,0x18,0x18,0x18,0x18,0x7E,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"K",43*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x18,0x00,
0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,
0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x02,
0x18,0x02,0x18,0x04,0x18,0x0C,0x7F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"L",44*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x0F,0x38,0x1C,
0x38,0x1C,0x38,0x1C,0x38,0x1C,0x38,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x2C,0x4C,
0x2C,0x4C,0x26,0x4C,0x26,0x4C,0x26,0x4C,0x26,0x8C,0x22,0x8C,0x23,0x8C,0x23,0x8C,
0x23,0x0C,0x23,0x0C,0x21,0x0C,0xF1,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"M",45*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0x1F,0x38,0x04,
0x38,0x04,0x2C,0x04,0x2C,0x04,0x26,0x04,0x26,0x04,0x23,0x04,0x23,0x04,0x21,0x84,
0x21,0x84,0x20,0xC4,0x20,0xC4,0x20,0x64,0x20,0x64,0x20,0x34,0x20,0x34,0x20,0x1C,
0x20,0x1C,0x20,0x0C,0x20,0x0C,0xF8,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"N",46*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x0C,0x30,
0x18,0x18,0x10,0x08,0x30,0x0C,0x30,0x0C,0x60,0x04,0x60,0x06,0x60,0x06,0x60,0x06,
0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x20,0x06,0x30,0x0C,0x30,0x0C,
0x10,0x08,0x18,0x18,0x0C,0x30,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"O",47*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xF0,0x18,0x18,
0x18,0x0C,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x06,0x18,0x0C,
0x18,0x18,0x1F,0xE0,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,
0x18,0x00,0x18,0x00,0x18,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"P",48*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xC0,0x0C,0x30,
0x18,0x18,0x10,0x08,0x30,0x0C,0x30,0x0C,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,
0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x60,0x06,0x27,0x84,0x38,0xCC,
0x38,0x6C,0x18,0x78,0x0C,0x70,0x03,0xE0,0x00,0x32,0x00,0x3C,0x00,0x1C,0x00,0x00,/*"Q",49*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0xE0,0x18,0x38,
0x18,0x18,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x18,0x18,0x30,
0x1F,0xE0,0x18,0xC0,0x18,0xC0,0x18,0x60,0x18,0x60,0x18,0x60,0x18,0x30,0x18,0x30,
0x18,0x30,0x18,0x18,0x18,0x18,0x7E,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"R",50*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xC8,0x18,0x78,
0x30,0x18,0x60,0x18,0x60,0x08,0x60,0x08,0x60,0x00,0x70,0x00,0x3C,0x00,0x1F,0x00,
0x07,0xC0,0x01,0xF0,0x00,0x78,0x00,0x18,0x00,0x1C,0x40,0x0C,0x40,0x0C,0x60,0x0C,
0x20,0x0C,0x30,0x18,0x38,0x30,0x27,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"S",51*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFC,0x31,0x84,
0x21,0x86,0x41,0x82,0x41,0x82,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"T",52*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x3E,0x30,0x08,
0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,
0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,0x30,0x08,
0x30,0x08,0x18,0x10,0x1C,0x20,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"U",53*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x1E,0x18,0x0C,
0x18,0x08,0x18,0x08,0x18,0x08,0x0C,0x10,0x0C,0x10,0x0C,0x10,0x0C,0x10,0x0C,0x20,
0x06,0x20,0x06,0x20,0x06,0x20,0x06,0x40,0x03,0x40,0x03,0x40,0x03,0x40,0x03,0x80,
0x01,0x80,0x01,0x80,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"V",54*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF3,0xCF,0x61,0x86,
0x61,0x84,0x21,0x84,0x20,0x84,0x30,0xC4,0x31,0xC4,0x31,0xC4,0x31,0xC8,0x31,0xC8,
0x11,0xC8,0x12,0x48,0x1A,0x68,0x1A,0x68,0x1A,0x70,0x1C,0x70,0x0C,0x70,0x0C,0x70,
0x0C,0x30,0x0C,0x20,0x08,0x20,0x08,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"W",55*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x3E,0x18,0x08,
0x18,0x10,0x0C,0x10,0x0C,0x20,0x06,0x20,0x06,0x40,0x03,0x40,0x03,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0xC0,0x02,0xC0,0x02,0x60,0x04,0x60,0x04,0x70,0x08,0x30,
0x08,0x30,0x18,0x18,0x10,0x1C,0x7C,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"X",56*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x3E,0x38,0x08,
0x18,0x08,0x18,0x10,0x0C,0x10,0x0C,0x10,0x0C,0x20,0x06,0x20,0x06,0x20,0x03,0x40,
0x03,0x40,0x03,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"Y",57*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFE,0x1C,0x0C,
0x18,0x0C,0x30,0x18,0x20,0x18,0x00,0x30,0x00,0x60,0x00,0x60,0x00,0xC0,0x00,0xC0,
0x01,0x80,0x01,0x80,0x03,0x00,0x03,0x00,0x06,0x00,0x06,0x00,0x0C,0x00,0x18,0x02,
0x18,0x06,0x30,0x04,0x30,0x1C,0x7F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"Z",58*/
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xFC,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,
0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,
0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,
0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0xFC,0x00,0x00,0x00,0x00,/*"[",59*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x18,0x00,0x08,0x00,
0x0C,0x00,0x04,0x00,0x06,0x00,0x06,0x00,0x02,0x00,0x03,0x00,0x01,0x00,0x01,0x80,
0x01,0x80,0x00,0x80,0x00,0xC0,0x00,0x40,0x00,0x60,0x00,0x60,0x00,0x30,0x00,0x30,
0x00,0x30,0x00,0x18,0x00,0x18,0x00,0x0C,0x00,0x0C,0x00,0x0C,0x00,0x06,0x00,0x00,/*"\",60*/
0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,
0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,
0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,
0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x00,0xC0,0x3F,0xC0,0x00,0x00,0x00,0x00,/*"]",61*/
0x00,0x00,0x00,0x00,0x03,0xC0,0x03,0xE0,0x06,0x20,0x08,0x10,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,/*"^",62*/
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,0xFF,0xFF,/*"_",63*/
0x00,0x00,0x00,0x00,0x1E,0x00,0x03,0x00,0x00,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,/*"`",64*/
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,0x07,0xE0,0x18,0x30,0x30,0x18,
0x30,0x18,0x30,0x18,0x00,0x38,0x07,0xD8,0x1C,0x18,0x30,0x18,0x60,0x18,0x60,0x18,
0x60,0x18,0x60,0x19,0x30,0x79,0x1F,0x8E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"a",65*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x78,0x00,0x18,0x00,
0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x19,0xE0,0x1A,0x38,0x1C,0x18,
0x1C,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,
0x18,0x08,0x1C,0x18,0x1C,0x30,0x13,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"b",66*/
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,0x03,0xE0,0x0E,0x10,0x0C,0x18,
0x18,0x18,0x30,0x18,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x04,
0x18,0x04,0x18,0x08,0x0C,0x10,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"c",67*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x78,0x00,0x18,
0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x07,0xD8,0x0C,0x38,0x18,0x18,
0x18,0x18,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x18,
0x10,0x18,0x18,0x38,0x0C,0x5E,0x07,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"d",68*/
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,0x03,0xC0,0x0C,0x30,0x08,0x18,
0x18,0x08,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x3F,0xFC,0x30,0x00,0x30,0x00,0x30,0x00,
0x18,0x04,0x18,0x08,0x0E,0x18,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"e",69*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7C,0x01,0x86,
0x01,0x06,0x03,0x06,0x03,0x00,0x03,0x00,0x03,0x00,0x3F,0xF8,0x03,0x00,0x03,0x00,
0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,
0x03,0x00,0x03,0x00,0x03,0x00,0x1F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"f",70*/
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,0x03,0xEE,0x0C,0x36,0x08,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x08,0x18,0x0C,0x30,0x0F,0xE0,0x18,0x00,0x18,0x00,
0x1F,0xC0,0x0F,0xF8,0x18,0x1C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x18,0x18,0x07,0xE0,/*"g",71*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x78,0x00,0x18,0x00,
0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x19,0xE0,0x1A,0x30,0x1C,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"h",72*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0xC0,
0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x1F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"i",73*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x78,
0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x03,0xF0,0x00,0x30,0x00,0x30,
0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,
0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x00,0x30,0x18,0x60,0x18,0x40,0x0F,0x80,/*"j",74*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x78,0x00,0x18,0x00,
0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x18,0x7C,0x18,0x30,0x18,0x20,
0x18,0x40,0x18,0x80,0x19,0x80,0x1B,0x80,0x1E,0xC0,0x1C,0xC0,0x18,0x60,0x18,0x30,
0x18,0x30,0x18,0x18,0x18,0x1C,0x7E,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"k",75*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x1F,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,0x01,0x80,
0x01,0x80,0x01,0x80,0x01,0x80,0x1F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"l",76*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0xEF,0x3C,0x71,0xC6,0x61,0x86,
0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,0x61,0x86,
0x61,0x86,0x61,0x86,0x61,0x86,0xF3,0xCF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"m",77*/
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,0x09,0xE0,0x7A,0x30,0x1C,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x7E,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"n",78*/
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,0x03,0xC0,0x0C,0x30,0x08,0x18,
0x18,0x18,0x10,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,0x30,0x0C,
0x18,0x18,0x18,0x18,0x0C,0x30,0x03,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"o",79*/
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,0x09,0xE0,0x7A,0x30,0x1C,0x18,
0x18,0x08,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,0x18,0x0C,
0x18,0x18,0x1C,0x18,0x1E,0x30,0x19,0xE0,0x18,0x00,0x18,0x00,0x18,0x00,0x7E,0x00,/*"p",80*/
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,0x03,0xC8,0x0C,0x78,0x18,0x38,
0x18,0x18,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x18,0x30,0x18,
0x10,0x18,0x18,0x38,0x0C,0x78,0x07,0x98,0x00,0x18,0x00,0x18,0x00,0x18,0x00,0x7E,/*"q",81*/
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,0x06,0x1C,0x7E,0x66,0x06,0x86,
0x07,0x80,0x07,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,0x06,0x00,
0x06,0x00,0x06,0x00,0x06,0x00,0x7F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"r",82*/
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,0x03,0xE4,0x06,0x1C,0x0C,0x0C,
0x0C,0x04,0x0C,0x04,0x0E,0x00,0x07,0xC0,0x01,0xF0,0x00,0x78,0x00,0x1C,0x10,0x0C,
0x10,0x0C,0x18,0x0C,0x1C,0x18,0x13,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"s",83*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x01,0x00,0x01,0x00,0x01,0x00,0x03,0x00,0x07,0x00,0x3F,0xF8,0x03,0x00,0x03,0x00,
0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,0x03,0x00,
0x03,0x04,0x03,0x04,0x01,0x88,0x00,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"t",84*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x78,0x78,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,
0x18,0x18,0x18,0x38,0x0C,0x5E,0x07,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"u",85*/
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,0x7C,0x3E,0x18,0x0C,0x18,0x08,
0x18,0x18,0x0C,0x10,0x0C,0x10,0x04,0x20,0x06,0x20,0x06,0x20,0x03,0x40,0x03,0x40,
0x03,0xC0,0x01,0x80,0x01,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"v",86*/
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,0xFB,0xCF,0x61,0x86,0x21,0x84,
0x31,0x84,0x31,0x84,0x31,0xC8,0x11,0xC8,0x1A,0xC8,0x1A,0x48,0x1A,0x70,0x0E,0x70,
0x0C,0x70,0x0C,0x30,0x0C,0x20,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"w",87*/
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,0x3E,0x7C,0x0C,0x10,0x0E,0x10,
0x06,0x20,0x03,0x40,0x03,0x40,0x01,0x80,0x01,0x80,0x01,0xC0,0x02,0x60,0x04,0x60,
0x04,0x30,0x08,0x18,0x18,0x18,0x7C,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"x",88*/
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,0x7C,0x3E,0x18,0x18,0x18,0x10,
0x08,0x10,0x0C,0x10,0x04,0x20,0x06,0x20,0x06,0x20,0x02,0x40,0x03,0x40,0x01,0x40,
0x01,0x80,0x01,0x80,0x01,0x00,0x01,0x00,0x01,0x00,0x02,0x00,0x3E,0x00,0x3C,0x00,/*"y",89*/
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,0x3F,0xF8,0x30,0x38,0x30,0x30,
0x20,0x60,0x20,0xE0,0x00,0xC0,0x01,0x80,0x03,0x80,0x03,0x00,0x06,0x00,0x0E,0x04,
0x0C,0x04,0x18,0x0C,0x30,0x18,0x3F,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"z",90*/
0x00,0x00,0x00,0x00,0x00,0x0C,0x00,0x10,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,
0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0xC0,
0x01,0x80,0x00,0x40,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,
0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x10,0x00,0x0C,0x00,0x00,/*"{",91*/
0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,
0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,/*"|",92*/
0x00,0x00,0x00,0x00,0x18,0x00,0x04,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,
0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x01,0x80,
0x00,0xC0,0x01,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,
0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x02,0x00,0x04,0x00,0x18,0x00,0x00,0x00,/*"}",93*/
0x00,0x00,0x1E,0x00,0x23,0x00,0x41,0x82,0x40,0x82,0x00,0xE4,0x00,0x38,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,/*"~",94*/
};
static const font_chinese_t chinese_font[] =
{
{
.name = "狗",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x10,0xE0,0x00,
0x10,0x38,0xC0,0x00,0x0C,0x30,0x80,0x00,0x02,0x61,0x80,0x18,0x01,0xC1,0xFF,0xFC,
0x01,0x83,0x00,0x18,0x01,0x82,0x00,0x18,0x02,0xC6,0x00,0x18,0x04,0x44,0x00,0x18,
0x18,0x48,0x02,0x18,0x20,0x71,0xFF,0x18,0x00,0xE1,0x06,0x18,0x00,0xE1,0x06,0x18,
0x01,0xE1,0x06,0x18,0x03,0x61,0x06,0x18,0x02,0x61,0x06,0x18,0x04,0x61,0x06,0x18,
0x08,0x61,0x06,0x10,0x10,0x61,0x06,0x10,0x20,0x61,0xFE,0x10,0x40,0x61,0x06,0x10,
0x00,0x61,0x00,0x10,0x00,0x60,0x00,0x30,0x00,0x60,0x00,0x30,0x00,0x40,0x0C,0x30,
0x07,0xC0,0x03,0xF0,0x01,0x80,0x01,0xE0,0x01,0x00,0x00,0x80,0x00,0x00,0x00,0x00,/*"狗",0*/
},
},
{
.name = "都",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x60,0x00,0x00,
0x00,0x60,0x88,0x08,0x00,0x60,0xCF,0xFC,0x00,0x64,0xCC,0x18,0x0F,0xFF,0x8C,0x18,
0x00,0x61,0x8C,0x10,0x00,0x63,0x0C,0x30,0x00,0x66,0x0C,0x20,0x00,0x64,0x6C,0x20,
0x3F,0xEF,0xFC,0x40,0x00,0x18,0x0C,0x40,0x00,0x30,0x0C,0x40,0x00,0x61,0x0C,0x60,
0x02,0xFF,0x8C,0x20,0x03,0x01,0x8C,0x10,0x07,0x01,0x0C,0x18,0x1B,0x01,0x0C,0x08,
0x23,0x01,0x0C,0x0C,0x03,0xFF,0x0C,0x0C,0x03,0x01,0x0C,0x0C,0x03,0x01,0x0C,0x0C,
0x03,0x01,0x0D,0xF8,0x03,0x01,0x0C,0x78,0x03,0xFF,0x8C,0x20,0x03,0x01,0x8C,0x00,
0x03,0x01,0x8C,0x00,0x03,0x00,0x0C,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,/*"都",1*/
},
},
{
.name = "不",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x38,
0x3F,0xFF,0xFF,0xFC,0x00,0x00,0xC0,0x00,0x00,0x01,0xC0,0x00,0x00,0x01,0x80,0x00,
0x00,0x03,0x80,0x00,0x00,0x03,0x00,0x00,0x00,0x07,0x80,0x00,0x00,0x07,0xC0,0x00,
0x00,0x0D,0x80,0x00,0x00,0x1D,0x8C,0x00,0x00,0x19,0x82,0x00,0x00,0x31,0x81,0x80,
0x00,0x61,0x80,0xC0,0x00,0xC1,0x80,0x60,0x01,0x81,0x80,0x70,0x03,0x01,0x80,0x38,
0x06,0x01,0x80,0x18,0x0C,0x01,0x80,0x18,0x10,0x01,0x80,0x08,0x20,0x01,0x80,0x00,
0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,/*"不",2*/
},
},
{
.name = "学",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x01,0x00,0x01,0x02,0x01,0x80,
0x01,0x83,0x03,0x80,0x00,0xC3,0x83,0x00,0x00,0xE1,0x86,0x00,0x00,0x61,0x84,0x00,
0x00,0x61,0x0C,0x00,0x00,0x40,0x08,0x18,0x0F,0xFF,0xFF,0xFC,0x0C,0x00,0x00,0x18,
0x0C,0x00,0x00,0x30,0x1C,0x00,0x02,0x40,0x19,0xFF,0xFF,0x00,0x00,0x00,0x07,0x00,
0x00,0x00,0x1C,0x00,0x00,0x00,0x30,0x00,0x00,0x01,0x40,0x00,0x00,0x01,0x80,0x10,
0x00,0x01,0x80,0x38,0x3F,0xFF,0xFF,0xFC,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,
0x00,0x1F,0x80,0x00,0x00,0x07,0x80,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,/*"学",3*/
},
},
{
.name = "梅",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x80,0x00,0x03,0x80,0xE0,0x00,
0x03,0x00,0xC0,0x00,0x03,0x01,0x80,0x18,0x03,0x01,0xFF,0xFC,0x03,0x03,0x00,0x00,
0x03,0x22,0x00,0x00,0x3F,0xF5,0x00,0x00,0x03,0x09,0xFF,0xE0,0x03,0x09,0x80,0x60,
0x03,0x81,0x20,0x60,0x07,0x61,0x18,0x60,0x07,0x63,0x0C,0x60,0x07,0x23,0x04,0x40,
0x07,0x23,0x04,0x48,0x0F,0x7F,0xFF,0xFC,0x0B,0x03,0x00,0x40,0x1B,0x03,0x00,0x40,
0x13,0x02,0x30,0xC0,0x23,0x06,0x18,0xC0,0x23,0x06,0x08,0xC0,0x43,0x06,0x00,0xD8,
0x03,0x0F,0xFF,0xFC,0x03,0x04,0x00,0xC0,0x03,0x00,0x00,0xC0,0x03,0x00,0x01,0x80,
0x03,0x00,0x1F,0x80,0x03,0x00,0x07,0x80,0x02,0x00,0x02,0x00,0x00,0x00,0x00,0x00,/*"梅",0*/
},
},
{
.name = "花",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x10,0x00,0x00,0x18,0x1C,0x00,
0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x38,0x3F,0xFF,0xFF,0xFC,
0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,0x30,0x10,0x00,
0x00,0x30,0x00,0x00,0x00,0x60,0x30,0x00,0x00,0x60,0x30,0x20,0x00,0xC0,0x30,0x70,
0x01,0x80,0x30,0xE0,0x01,0xC0,0x33,0x80,0x03,0xC0,0x37,0x00,0x06,0xC0,0x3C,0x00,
0x0C,0xC0,0x38,0x00,0x08,0xC0,0xF0,0x00,0x30,0xC3,0x30,0x00,0x40,0xCC,0x30,0x08,
0x00,0xC0,0x30,0x08,0x00,0xC0,0x30,0x08,0x00,0xC0,0x30,0x08,0x00,0xC0,0x30,0x0C,
0x00,0xC0,0x3F,0xFC,0x00,0xC0,0x3F,0xFC,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,/*"花",1*/
},
},
{
.name = "嵌",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x04,0x01,0x80,0x80,
0x07,0x01,0x80,0x60,0x06,0x01,0x80,0x40,0x06,0x01,0x80,0x40,0x06,0x01,0x80,0x40,
0x07,0xFF,0xFF,0xC0,0x02,0x00,0x08,0x40,0x04,0x08,0x0C,0x00,0x07,0x0C,0x0C,0x00,
0x06,0x0C,0x18,0x00,0x06,0x0D,0x18,0x10,0x3F,0xFF,0xDF,0xF8,0x06,0x0C,0x30,0x18,
0x06,0x0C,0x20,0x30,0x06,0x0C,0x66,0x20,0x06,0x0C,0x46,0x40,0x07,0xFC,0x8E,0x00,
0x06,0x0C,0x0E,0x00,0x06,0x0C,0x0D,0x00,0x06,0x0C,0x0D,0x00,0x06,0x0C,0x19,0x00,
0x06,0x0C,0x18,0x80,0x06,0x0C,0x30,0xC0,0x07,0xFC,0x20,0x60,0x06,0x0C,0x60,0x70,
0x06,0x0C,0x80,0x3E,0x06,0x03,0x00,0x18,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,/*"嵌",2*/
},
},
{
.name = "入",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x00,0x00,
0x00,0x3C,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x01,0x00,0x00,
0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x03,0xC0,0x00,0x00,0x03,0xC0,0x00,
0x00,0x03,0x40,0x00,0x00,0x06,0x60,0x00,0x00,0x06,0x60,0x00,0x00,0x06,0x20,0x00,
0x00,0x0C,0x30,0x00,0x00,0x0C,0x30,0x00,0x00,0x18,0x18,0x00,0x00,0x30,0x1C,0x00,
0x00,0x30,0x0C,0x00,0x00,0x60,0x06,0x00,0x00,0xC0,0x07,0x00,0x01,0x80,0x03,0x80,
0x01,0x00,0x01,0xC0,0x02,0x00,0x00,0xF0,0x04,0x00,0x00,0x7C,0x08,0x00,0x00,0x38,
0x30,0x00,0x00,0x10,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"入",3*/
},
},
{
.name = "式",
.model = (const uint8_t[]) {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x72,0x00,
0x00,0x00,0x61,0x80,0x00,0x00,0x60,0xC0,0x00,0x00,0x20,0xE0,0x00,0x00,0x20,0x50,
0x00,0x00,0x20,0x38,0x1F,0xFF,0xFF,0xFC,0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,
0x00,0x00,0x30,0x00,0x00,0x00,0x30,0x00,0x00,0x03,0x30,0x00,0x1F,0xFF,0xB0,0x00,
0x00,0x60,0x30,0x00,0x00,0x60,0x18,0x00,0x00,0x60,0x18,0x00,0x00,0x60,0x18,0x00,
0x00,0x60,0x18,0x00,0x00,0x60,0x0C,0x00,0x00,0x60,0x0C,0x04,0x00,0x60,0x46,0x04,
0x00,0x63,0x87,0x08,0x00,0x7C,0x03,0x08,0x07,0xE0,0x01,0x8C,0x3F,0x00,0x01,0xEC,
0x18,0x00,0x00,0xFC,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0x0C,0x00,0x00,0x00,0x00,/*"式",4*/
},
},
{}
};
const font_t font32 =
{
.size = 32,
.ascii_model = ascii_model,
.chinese = chinese_font,
};
main.c
cpp
#include <stdint.h>
#include "stm32f4xx.h"
#include "cpu_delay.h"
#include "st7789.h"
#include "font.h"
#include "image.h"
int main(void)
{
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOB, ENABLE);
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE);
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOE, ENABLE);
RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPI2, ENABLE);
st7789_init();
st7789_draw_image(0, 0, &image_tv);
const uint16_t white = mkcolor(255, 255, 255);
const uint16_t black = mkcolor(0, 0, 0);
st7789_write_string(60, 240, "狗都不学", white, black, &font32);
st7789_write_string(80, 285, "嵌入式", white, black, &font32);
while (1)
{
;
}
}