#endif #ifndef uint #define uint unsigned int #endif extern void delay_nms(unsigned long n); extern void delay_nus(unsigned long n); uint8_t LCD_busy(void); //讀LCD忙碌狀態,直到LCD1602不忙為止 void Wait_Leisure(void);//一直等待到LCD1602空閑 void LCD_WriteInitcmd(uchar cmd);//寫入LCD初始化時的命令,不可以檢測忙狀態 void LCD_Writecmd(uchar cmd);//寫指令到LCD1602,指令數據占一個字節 void LCD_Writedata(uchar dat);//寫一字節數據到LCD1602 void LCD_pos(uchar pos);//設定顯示位置 00h~27h,40h~47h void LCD_Setpos(uchar row,uchar col);//根據習慣設定顯示位置 void LCD_DispChar(char ch);//顯示一個字符 void LCD_Setpos_DispChar(uchar row,uchar col,char ch);//在指定位置顯示一個字符 void LCD_DispString(char str[]);//使LCD1602顯示一個字符串,
顯示位置需提前設定 void LCD_Setpos_DispString(uchar row,uchar col,char str[]);//使LCD1602從指定位置開始顯示一個字符串 void LCD_Dispnum(uint32_t num);//顯示一個不超過8位的整數,顯示位置需提前設置 void LCD_Setpos_Dispnum(uchar row,uchar col,uint32_t num);//在指定位置顯示一個不超過8位的整數 void LCD_DispDecimal(uint32_t num,uchar dot);//顯示一個有效位不超過8位的浮點數,顯示位置需要提前設定 //在指定位置顯示一個有效位不超過8位的浮點數 void LCD_Setpos_DispDecimal(uchar row,uchar col,uint32_t num,uchar dot); //顯示日歷,顯示日期與時間 void LCD_DispDateTime(uint32_t year,uchar month,uchar day,uchar hour,uchar min,uchar sec); //顯示秒表,顯示時,分,秒,10毫秒,精確到10ms void LCD_DispStopWatch(uchar hour,uchar min,uchar sec,uchar tenms); //顯示頻率計,動態自動調整頻率顯示 void LCD_DispFreq(uint32_t freq); void LCD_ShiftLeft(void);//屏幕整體左移一格,用于滾動顯示 void LCD_ShiftRight(void);//屏幕整體右移一格,用于滾動顯示 |