36 #if (__GNUC__ * 100 + __GNUC_MINOR__) < 303 37 #error "This library requires AVR-GCC 3.3 or later, update to newer AVR-GCC compiler !" 41 #include <avr/pgmspace.h> 58 #define LCD_CONTROLLER_KS0073 0 65 #define LCD_DISP_LENGTH 16 66 #define LCD_LINE_LENGTH 0x40 67 #define LCD_START_LINE1 0x00 68 #define LCD_START_LINE2 0x40 69 #define LCD_START_LINE3 0x14 70 #define LCD_START_LINE4 0x54 71 #define LCD_WRAP_LINES 0 92 #elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || defined(__AVR_ATmega64__) || \ 93 defined(__AVR_ATmega8515__)|| defined(__AVR_ATmega103__) || defined(__AVR_ATmega128__) || \ 94 defined(__AVR_ATmega161__) || defined(__AVR_ATmega162__) 98 #define LCD_IO_DATA 0xC000 99 #define LCD_IO_FUNCTION 0x8000 100 #define LCD_IO_READ 0x0100 102 #error "external data memory interface not available for this device, use 4-bit IO port mode" 116 #define LCD_ENTRY_MODE 2 117 #define LCD_ENTRY_INC 1 118 #define LCD_ENTRY_SHIFT 0 120 #define LCD_ON_DISPLAY 2 121 #define LCD_ON_CURSOR 1 122 #define LCD_ON_BLINK 0 124 #define LCD_MOVE_DISP 3 125 #define LCD_MOVE_RIGHT 2 126 #define LCD_FUNCTION 5 127 #define LCD_FUNCTION_8BIT 4 128 #define LCD_FUNCTION_2LINES 3 129 #define LCD_FUNCTION_10DOTS 2 135 #define LCD_ENTRY_DEC 0x04 136 #define LCD_ENTRY_DEC_SHIFT 0x05 137 #define LCD_ENTRY_INC_ 0x06 138 #define LCD_ENTRY_INC_SHIFT 0x07 141 #define LCD_DISP_OFF 0x08 142 #define LCD_DISP_ON 0x0C 143 #define LCD_DISP_ON_BLINK 0x0D 144 #define LCD_DISP_ON_CURSOR 0x0E 145 #define LCD_DISP_ON_CURSOR_BLINK 0x0F 148 #define LCD_MOVE_CURSOR_LEFT 0x10 149 #define LCD_MOVE_CURSOR_RIGHT 0x14 150 #define LCD_MOVE_DISP_LEFT 0x18 151 #define LCD_MOVE_DISP_RIGHT 0x1C 154 #define LCD_FUNCTION_4BIT_1LINE 0x20 155 #define LCD_FUNCTION_4BIT_2LINES 0x28 156 #define LCD_FUNCTION_8BIT_1LINE 0x30 157 #define LCD_FUNCTION_8BIT_2LINES 0x38 160 #define LCD_MODE_DEFAULT ((1<<LCD_ENTRY_MODE) | (1<<LCD_ENTRY_INC) ) 210 extern void lcd_puts(
const char *s);
219 extern void lcd_puts_p(
const char *progmem_s);
243 #define lcd_puts_P(__s) lcd_puts_p(PSTR(__s)) 245 uint8_t lcd_getxy(
void);
246 uint8_t lcd_read(uint8_t rs);
void lcd_puts_p(const char *progmem_s)
Display string from program memory without auto linefeed.
void lcd_gotoxy(uint8_t x, uint8_t y)
Set cursor to specified position.
void lcd_clrscr(void)
Clear display and set cursor to home position.
void lcd_home(void)
Set cursor to home position.
void lcd_command(uint8_t cmd)
Send LCD controller instruction command.
Аппаратно-зависимые определения
void lcd_data(uint8_t data)
Send data byte to LCD controller.
void lcd_puts(const char *s)
Display string without auto linefeed.
void lcd_init(void)
Initialize display and select type of cursor.
void lcd_putc(char c)
Display character at current cursor position.