EDF - OnePIC MCU
v1.1.0
|
00001 00007 #ifndef _ONEPIC_LCD_H_ 00008 #define _ONEPIC_LCD_H_ 00009 00010 00011 #include "bsp.h" 00012 #include <stdint.h> 00013 00014 #define LCD_LINES 2 00015 #define LCD_LINE_LENGTH 40 00018 /********************************************************************** 00019 * Commands 00020 **********************************************************************/ 00021 #define CLEAR_DISPLAY 0x01 00023 #define RETURN_HOME 0x02 00025 #define ENTRY_MODE_SET 0x04 00026 #define INCREMENT 0x02 00027 #define DECREMENT 0x00 00028 #define SHIFT_ON 0x01 00029 #define SHIFT_OFF 0x00 00031 #define DISPLAY_CONTROL 0x08 00032 #define DISPLAY_ON 0x04 00033 #define DISPLAY_OFF 0x00 00034 #define CURSOR_ON 0x02 00035 #define CURSOR_OFF 0x00 00036 #define BLINKING_ON 0x01 00037 #define BLINKING_OFF 0x00 00039 #define CURSOR_DISPLAY_SHIFT 0x10 00040 #define DISPLAY_SHIFT_ON 0x08 00041 #define DISPLAY_SHIFT_OFF 0x00 00042 #define CURSOR_SHIFT_OFF 0x08 00043 #define CURSOR_SHIFT_ON 0x00 00044 #define SHIFT_RIGHT 0x04 00045 #define SHIFT_LEFT 0x00 00047 #define FUNCTION_SET 0x20 00048 #define EIGHT_BITS 0x10 00049 #define FOUR_BITS 0x00 00050 #define TWO_LINES 0x08 00051 #define ONE_LINE 0x00 00052 #define FIVEXTEN 0x04 00053 #define FIVEXEIGHT 0x00 00055 #define SET_CGRAM_ADDR 0x40 00056 #define SET_DDRAM_ADDR 0x80 00058 #define READ_BUSY_FLAG_ADDR 00059 #define WRITE_DATA 00060 #define READ_DATA 00061 00062 00063 00064 /********************************************************************** 00065 * Data 00066 **********************************************************************/ 00067 extern char LCDBuffer[LCD_LINES][LCD_LINE_LENGTH]; 00068 00069 /********************************************************************** 00070 * Function Prototypes 00071 **********************************************************************/ 00072 void LCDStrobeEnable(void); 00073 void LCDDataPut(unsigned char data); 00074 void LCDCommand(unsigned char command); 00075 void LCDPut(unsigned char character); 00076 void LCDInit(void); 00077 void LCDUpdate(void); 00078 void LCDPutLine(uint8_t lineNo); 00079 00080 00081 #endif // _ONEPIC_LCD_H_ 00082