//========================================================= // LPC1114 Project //========================================================= // File Name : lcd.h // Function : LCD Module Control Header //--------------------------------------------------------- #ifndef __LCD1602_H__ #define __LCD1602_H__ #ifdef __USE_CMSIS #include "LPC11xx.h" #endif #define RS_PORTNUM 0 //レジスタ選択 #define RS_BITPOSI 9 #define RW_PORTNUM 0 //Read/Write選択 #define RW_BITPOSI 8 #define E_PORTNUM 0 //イネーブル信号 #define E_BITPOSI 6 #define DB4_PORTNUM 0 //データビット #define DB4_BITPOSI 5 #define DB5_PORTNUM 0 //データビット #define DB5_BITPOSI 4 #define DB6_PORTNUM 0 //データビット #define DB6_BITPOSI 2 #define DB7_PORTNUM 1 //データビット #define DB7_BITPOSI 8 //初期設定コマンド(4ビット転送) #define ONE_LINE_5x7FONT 0 #define ONE_LINE_5x10FONT 1 #define TWO_LINE_5x7FONT 2 //表示モードコマンド #define DISPLAY_OFF 0 #define DISPLAY_CHAR 1 #define DISPLAY_CHAR_BLNK 2 #define DISPLAY_CHAR_CRSR 3 #define DISPLAY_CHAR_CRSR_BLNK 4 //============== // Prototypes //============== void Init_LCD1620(void); void LCD1620_printf(const char *format, ...); void LCD1620_Screen_Cfg(int mode); void LCD1620_Screen_mode(int mode); void LCD1620_Clear_Screen(void); void LCD1620_printf_Position(uint32_t posx , uint32_t posy); void write8bit(int data); void write4bit(int rs , int data); void delay(int count); #endif // __LCD1602_H__