標(biāo)題: 兼容正點(diǎn)原子探索者STM32F407 自己取模漢字顯示實(shí)驗(yàn) [打印本頁(yè)]

作者: liu'y    時(shí)間: 2021-5-25 15:47
標(biāo)題: 兼容正點(diǎn)原子探索者STM32F407 自己取模漢字顯示實(shí)驗(yàn)

前段時(shí)間做一個(gè)東西,用到漢字顯示。

用正點(diǎn)原子的顯示會(huì)用到W25Q128字庫(kù)。所以寫了一個(gè)自己漢字取模的字符串顯示。

用PCtoLCD2018.exe軟件取模的漢字顯示。


單片機(jī)源程序如下:

  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);//設(shè)置系統(tǒng)中斷優(yōu)先級(jí)分組2
  24.     delay_init(168);  //初始化延時(shí)函數(shù)
  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,  "先進(jìn)先出", RED                , BLACK, 1);  
  33.     while(1);
  34. }
復(fù)制代碼

所有資料51hei提供下載:

漢字顯示實(shí)驗(yàn).7z (904.9 KB, 下載次數(shù): 34)



作者: wanwu    時(shí)間: 2021-5-26 09:13
請(qǐng)問一下可以顯示繁體字嗎
作者: tiny44    時(shí)間: 2023-12-18 21:07
PCtoLCD2018.exe能分享一下嗎




歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1