Project 5  Character Liquid-Crystal Display
Neff Site
lcd1602.h
Go to the documentation of this file.
1 
52 #ifndef LCD1602_H_
53 #define LCD1602_H_
54 
55 #define LCD1602_ADDR 0x27
56 #define LCD1602_ROW_OFFSET 0x40
57 
58 #define LCD1602_DATA 0x01
59 #define LCD1602_COMMAND 0x00
60 
61 #define LCD1602_CLR_E 0x00
62 #define LCD1602_SET_E 0x04
63 
64 #define LCD1602_BACKLIGHT_ON 0x08
65 #define LCD1602_BACKLIGHT_OFF 0x00
66 
67 #ifdef __cplusplus
68 extern "C"
69 {
70 #endif
71 
72 /***** Low level functions *****/
73 
79 void lcd1602_sendCommand(uint8_t cmd);
80 
86 void lcd1602_sendData(uint8_t byte);
87 
88 /***** High level functions *****/
89 
95 void lcd1602_init(void);
96 
101 void lcd1602_displayOn(void);
102 
107 void lcd1602_displayOff(void);
108 
113 void lcd1602_displayClear(void);
114 
116 void lcd1602_cursorHome(void);
117 
125 void lcd1602_cursorSet(uint8_t col, uint8_t row);
126 
129 void lcd1602_putchar(const char c);
130 
133 void lcd1602_puts(const char* s);
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif /* LCD1602_H_ */
140 
void lcd1602_cursorSet(uint8_t col, uint8_t row)
Set cursor to the specified position.
void lcd1602_displayOn(void)
Turn the display on.
void lcd1602_sendCommand(uint8_t cmd)
Send a command.
void lcd1602_puts(const char *s)
Print a string at the display.
void lcd1602_displayOff(void)
Turn the display off.
void lcd1602_displayClear(void)
Clear the display.
void lcd1602_putchar(const char c)
Print a character at the display.
void lcd1602_cursorHome(void)
Place the cursor at its home position.
void lcd1602_sendData(uint8_t byte)
Send a data byte.
void lcd1602_init(void)
Initialize the display.
Contact