编号 | PIN Name | 外设功能 | 备注 |
1 | PF0 | XMC_A0 | - |
2 | PD14 | XMC_D0 | - |
3 | PD15 | XMC_D1 | - |
4 | PD0 | XMC_D2 | - |
5 | PD1 | XMC_D3 | - |
6 | PE7 | XMC_D4 | - |
7 | PE8 | XMC_D5 | - |
8 | PE9 | XMC_D6 | - |
9 | PE10 | XMC_D7 | - |
10 | PE11 | XMC_D8 | - |
11 | PE12 | XMC_D9 | - |
12 | PE13 | XMC_D10 | - |
13 | PE14 | XMC_D11 | - |
14 | PE15 | XMC_D12 | - |
15 | PD8 | XMC_D13 | - |
16 | PD9 | XMC_D14 | - |
17 | PD10 | XMC_D15 | - |
18 | PD7 | XMC_NE1 | - |
19 | PD5 | XMC_NWE | - |
20 | PD4 | XMC_NOE | - |
21 | NRST | NRST | LCD复位 |
编号 | PIN Name | 引脚功能 | 备注 |
1 | IO0_0 | LCD_BL_CTRL | LCD背光控制 |
int main(void) { uint8_t step = 0; /* 初始化系统时钟 */ system_clock_config(); /* 初始化中断优先级分组 */ nvic_priority_group_config(NVIC_PRIORITY_GROUP_4); /* 初始化延时函数 */ delay_init(); /* 初始化LCD */ lcd_init(LCD_DISPLAY_VERtiCAL); while(1) { /* 改变显示颜色 */ switch(step) { case 0: lcd_clear(WHITE ); break; case 1: lcd_clear(BLUE ); break; case 2: lcd_clear(BRED ); break; case 3: lcd_clear(GBLUE ); break; case 4: lcd_clear(RED ); break; case 5: lcd_clear(BRRED ); break; case 6: lcd_clear(GREEN ); break; case 7: lcd_clear(YELLOW); break; default: step = 0; break; } /* 显示信息 */ lcd_string_show(10, 20, 200, 24, 24, (uint8_t *)"TFT LCD Test"); lcd_string_show(10, 60, 200, 24, 24, (uint8_t *)"2021-01-20"); step++; if(step == 7) { step = 0; } delay_ms(1000); } } |
/** * @Brief initialization lcd screen * @param direction: display direction * @retval none */ void lcd_direction(uint8_t direction) |
更多回帖