标题: 兼容正点原子探索者STM32F407 自己取模汉字显示实验 [打印本页]

作者: liu'y    时间: 2021-5-25 15:47
标题: 兼容正点原子探索者STM32F407 自己取模汉字显示实验

前段时间做一个东西,用到汉字显示。

用正点原子的显示会用到W25Q128字库。所以写了一个自己汉字取模的字符串显示。

用PCtoLCD2018.exe软件取模的汉字显示。


单片机源程序如下:

  1. #include "sys.h"
  2. #include "delay.h"
  3. #include "usart.h"
  4. #include "led.h"
  5. #include "lcd.h"
  6. #include "key.h"
  7. #include "sram.h"
  8. #include "malloc.h"
  9. #include "usmart.h"
  10. #include "sdio_sdcard.h"
  11. #include "malloc.h"
  12. #include "w25qxx.h"
  13. #include "ff.h"
  14. #include "exfuns.h"
  15. #include "fontupd.h"
  16. #include "text.h"


  17. int main(void)
  18. {
  19.     u32 fontcnt;
  20.     u8 i, j;
  21.     u8 fontx[2];//gbk码
  22.     u8 key, t;
  23.     NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//设置系统中断优先级分组2
  24.     delay_init(168);  //初始化延时函数
  25.     uart_init(115200);                //初始化串口波特率为115200
  26.     LED_Init();                                        //初始化LED
  27.     LCD_Init();                                        //LCD初始化
  28.        
  29.                 POINT_COLOR=RED;
  30.                 BACK_COLOR=BLACK;
  31.     LCD_ShowString(30, 50, 200, 16, 16, "Explorer STM32F4");
  32.                 LCD_str(80, 80, 24,  "先进先出", RED                , BLACK, 1);  
  33.     while(1);
  34. }
复制代码

所有资料51hei提供下载:

汉字显示实验.7z (904.9 KB, 下载次数: 34)



作者: wanwu    时间: 2021-5-26 09:13
请问一下可以显示繁体字吗
作者: tiny44    时间: 2023-12-18 21:07
PCtoLCD2018.exe能分享一下吗




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1