前段時間做一個東西,用到漢字顯示。 用正點原子的顯示會用到W25Q128字庫。所以寫了一個自己漢字取模的字符串顯示。
Snipaste_2021-05-25_15-20-56.png (43.56 KB, 下載次數: 94)
下載附件
PCtoLCD2018設置
2021-5-25 15:43 上傳
用PCtoLCD2018.exe軟件取模的漢字顯示。
單片機源程序如下: - #include "sys.h"
- #include "delay.h"
- #include "usart.h"
- #include "led.h"
- #include "lcd.h"
- #include "key.h"
- #include "sram.h"
- #include "malloc.h"
- #include "usmart.h"
- #include "sdio_sdcard.h"
- #include "malloc.h"
- #include "w25qxx.h"
- #include "ff.h"
- #include "exfuns.h"
- #include "fontupd.h"
- #include "text.h"
- int main(void)
- {
- u32 fontcnt;
- u8 i, j;
- u8 fontx[2];//gbk碼
- u8 key, t;
- NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//設置系統中斷優先級分組2
- delay_init(168); //初始化延時函數
- uart_init(115200); //初始化串口波特率為115200
- LED_Init(); //初始化LED
- LCD_Init(); //LCD初始化
-
- POINT_COLOR=RED;
- BACK_COLOR=BLACK;
- LCD_ShowString(30, 50, 200, 16, 16, "Explorer STM32F4");
- LCD_str(80, 80, 24, "先進先出", RED , BLACK, 1);
- while(1);
- }
復制代碼
所有資料51hei提供下載:
漢字顯示實驗.7z
(904.9 KB, 下載次數: 34)
2021-5-25 22:01 上傳
點擊文件名下載附件
源碼 下載積分: 黑幣 -5
|