37 #define LCD_RS 0 //define MCU pin connected to LCD RS
38 #define LCD_RW 1 //define MCU pin connected to LCD R/W
39 #define LCD_E 2 //define MCU pin connected to LCD E
40 #define LCD_D0 0 //define MCU pin connected to LCD D0
41 #define LCD_D1 0 //define MCU pin connected to LCD D1
42 #define LCD_D2 0 //define MCU pin connected to LCD D2
43 #define LCD_D3 0 //define MCU pin connected to LCD D3
44 #define LCD_D4 4 //define MCU pin connected to LCD D4
45 #define LCD_D5 5 //define MCU pin connected to LCD D5
46 #define LCD_D6 6 //define MCU pin connected to LCD D6
47 #define LCD_D7 7 //define MCU pin connected to LCD D7
51 #if defined (LCD_4BIT_M) || defined (LCD_8BIT_M)
52 #define LDPRS PORTB //RS pin assignment
54 #define LDPRW PORTD //RW pin assignment
56 #define LDPE PORTD //E pin assignment
58 #define LDPD0 PORTC //D0 pin assignment
60 #define LDPD1 PORTD //D1 pin assignment
62 #define LDPD2 PORTC //D2 pin assignment
64 #define LDPD3 PORTB //D3 pin assignment
66 #define LDPD4 PORTD //D4 pin assignment
68 #define LDPD5 PORTC //D5 pin assignment
70 #define LDPD6 PORTD //D6 pin assignment
72 #define LDPD7 PORTB //D7 pin assignment
76 #if defined (LCD_4BIT) || defined (LCD_8BIT) //if aligned mode
77 #define LDP PORTA //define MCU port connected to LCD data pins
78 #define LCP PORTA //define MCU port connected to LCD control pins
79 #define LDDR DDRA //define MCU direction register for port connected to LCD data pins
80 #define LCDR DDRA //define MCU direction register for port connected to LCD control pins
84 #define LCD_CLR 0 //DB0: clear display
85 #define LCD_HOME 1 //DB1: return to home position
86 #define LCD_ENTRY_MODE 2 //DB2: set entry mode
87 #define LCD_ENTRY_INC 1 //DB1: increment
88 #define LCD_ENTRY_SHIFT 0 //DB2: shift
89 #define LCD_ON_CTRL 3 //DB3: turn lcd/cursor on
90 #define LCD_ON_DISPLAY 2 //DB2: turn display on
91 #define LCD_ON_CURSOR 1 //DB1: turn cursor on
92 #define LCD_ON_BLINK 0 //DB0: blinking cursor
93 #define LCD_MOVE 4 //DB4: move cursor/display
94 #define LCD_MOVE_DISP 3 //DB3: move display (0-> move cursor)
95 #define LCD_MOVE_RIGHT 2 //DB2: move right (0-> left)
96 #define LCD_FUNCTION 5 //DB5: function set
97 #define LCD_FUNCTION_8BIT 4 //DB4: set 8BIT mode (0->4BIT mode)
98 #define LCD_FUNCTION_2LINES 3 //DB3: two lines (0->one line)
99 #define LCD_FUNCTION_10DOTS 2 //DB2: 5x10 font (0->5x7 font)
100 #define LCD_CGRAM 6 //DB6: set CG RAM address
101 #define LCD_DDRAM 7 //DB7: set DD RAM address
103 #define LCD_BUSY 7 //DB7: LCD is busy
104 #define LCD_LINES 2 //visible lines
105 #define LCD_LINE_LENGTH 16 //line length (in characters)
107 #define LCD_LINE0_DDRAMADDR 0x00
108 #define LCD_LINE1_DDRAMADDR 0x40
109 #define LCD_LINE2_DDRAMADDR 0x14
110 #define LCD_LINE3_DDRAMADDR 0x54
112 #define PROGRESSPIXELS_PER_CHAR 6
138 void LCDprogressBar(uint8_t progress, uint8_t maxprogress, uint8_t length);
void CopyStringtoLCD(const uint8_t *, uint8_t, uint8_t)
void LCDcursorOnBlink(void)
void LCDdefinechar(const uint8_t *, uint8_t)
void LCDcursorLeft(uint8_t)
void LCDsendChar(uint8_t)
void LCDshiftLeft(uint8_t)
void LCDprogressBar(uint8_t progress, uint8_t maxprogress, uint8_t length)
void LCDshiftRight(uint8_t)
void LCDsendCommand(uint8_t)
void LCDcursorRight(uint8_t)
void LCDGotoXY(uint8_t, uint8_t)
void LCDstring(uint8_t *)