- 打卡等级:以坛为家I
- 打卡总天数:220
- 最近打卡:2025-05-01 18:20:12
金牌会员
- 积分
- 1132
|
发表于 2024-6-2 03:47:29
|
显示全部楼层
7920 官方的例子里只有几句。
void LCDInit(void) //LCM³õʼ»¯
{
PSB = 1; //²¢¿Ú
// PSB = 0; //SPI¿Ú
delay_ms(10);
LCD_RESET = 0;
delay_ms(10);
LCD_RESET = 1;
delay_ms(100);
WriteCommandLCD(0x30,1); //ÏÔʾģʽÉèÖÃ,¿ªÊ¼ÒªÇóÿ´Î¼ì²âæÐźÅ
WriteCommandLCD(0x01,1); //ÏÔʾÇåÆÁ
WriteCommandLCD(0x06,1); // ÏÔʾ¹â±êÒÆ¶¯ÉèÖÃ
WriteCommandLCD(0x0C,1); // ÏÔʾ¿ª¼°¹â±êÉèÖÃ
}
void LCDClear(void) //ÇåÆÁ
{
WriteCommandLCD(0x01,1); //ÏÔʾÇåÆÁ
WriteCommandLCD(0x34,1); // ÏÔʾ¹â±êÒÆ¶¯ÉèÖÃ
WriteCommandLCD(0x30,1); // ÏÔʾ¿ª¼°¹â±êÉèÖÃ
} |
|