<div data-page-id="EGRVdxunnohkrNxItYTcrwAnnHe" data-docx-has-block-data="false"><pre class="ace-line ace-line old-record-id-J60mdYIeaoSCkSxCcseczQDFnWh"><code class="language-C" data-wrap="false">#include "gd32f4xx.h"
#include "systick.h"
#include "lcd_init.h"
#include "lcd.h"
int main(void)
{
float t = 0;
nvic_priority_group_set(NVIC_PRIGROUP_PRE2_SUB2); // 优先级分组
systick_config();//滴答定时器初始化 1ms
LCD_Init();//屏幕初始化
LCD_Fill(0,0,LCD_W,LCD_H,BLACK);//清全屏为黑色
while(1)
{
LCD_ShowString(0,16*2,"LCD_W:",WHITE,BLACK,16,0);
LCD_ShowIntNum(48,16*2,LCD_W,3,WHITE,BLACK,16);
LCD_ShowString(80,16*2,"LCD_H:",WHITE,BLACK,16,0);
LCD_ShowIntNum(128,16*2,LCD_H,3,WHITE,BLACK,16);
LCD_ShowString(0,16*3,"Nun:",WHITE,BLACK,16,0);
LCD_ShowFloatNum1(8*4,16*3,t,4,WHITE,BLACK,16);
t+=0.11;
delay_1ms(1000);
}
}
</code></pre></div><span data-lark-record-data="{"rootId":"EGRVdxunnohkrNxItYTcrwAnnHe","text":{"initialAttributedTexts":{"text":{"0":"#include \"gd32f4xx.h\"\n#include \"systick.h\"\n#include \"lcd_init.h\"\n#include \"lcd.h\"\n\nint main(void)\n{\n float t = 0;\n nvic_priority_group_set(NVIC_PRIGROUP_PRE2_SUB2); // 优先级分组\n systick_config();//滴答定时器初始化 1ms\n\n LCD_Init();//屏幕初始化\n LCD_Fill(0,0,LCD_W,LCD_H,BLACK);//清全屏为黑色\n \n while(1)\n { \n LCD_ShowString(0,16*2,\"LCD_W:\",WHITE,BLACK,16,0);\n LCD_ShowIntNum(48,16*2,LCD_W,3,WHITE,BLACK,16);\n LCD_ShowString(80,16*2,\"LCD_H:\",WHITE,BLACK,16,0);\n LCD_ShowIntNum(128,16*2,LCD_H,3,WHITE,BLACK,16);\n \n LCD_ShowString(0,16*3,\"Nun:\",WHITE,BLACK,16,0);\n LCD_ShowFloatNum1(8*4,16*3,t,4,WHITE,BLACK,16);\n t+=0.11;\n\n delay_1ms(1000); \n }\n}\n"},"attribs":{"0":"*0|s+mc"}},"apool":{"numToAttrib":{"0":["author","7213575654577553412"]},"nextNum":1}},"type":"text","referenceRecordMap":{},"extra":{"mention_page_title":{},"external_mention_url":{}},"isKeepQuoteContainer":false,"isFromCode":true,"selection":[{"id":504,"type":"text","selection":{"start":0,"end":804},"recordId":"J60mdYIeaoSCkSxCcseczQDFnWh"}],"payloadMap":{},"isCut":false}" data-lark-record-format="docx/text" class="lark-record-clipboard"></span>