1 /*************************************************************************
2 Title : C include file for the HW defs of for the HD44780U LCD library
4 ***************************************************************************/
9 /* change these definitions according to your hardware */
11 #define LCD_DATA_PIN_D7 PC5 /* arbitrary pin for LCD data line D7 */
12 #define LCD_DATA_PIN_D6 PB2 /* arbitrary pin for LCD data line D6 */
13 #define LCD_DATA_PIN_D5 PC4 /* arbitrary pin for LCD data line D5 */
14 #define LCD_DATA_PIN_D4 PC3 /* arbitrary pin for LCD data line D4 */
16 #define LCD_DATA_DDR_D7 DDRC /* ddr for LCD data line D7 */
17 #define LCD_DATA_DDR_D6 DDRB /* ddr for LCD data line D6 */
18 #define LCD_DATA_DDR_D5 DDRC /* ddr for LCD data line D5 */
19 #define LCD_DATA_DDR_D4 DDRC /* ddr for LCD data line D4 */
21 #define LCD_DATA_PORT_D7 PORTC /* port for LCD data line D7 */
22 #define LCD_DATA_PORT_D6 PORTB /* port for LCD data line D6 */
23 #define LCD_DATA_PORT_D5 PORTC /* port for LCD data line D5 */
24 #define LCD_DATA_PORT_D4 PORTC /* port for LCD data line D4 */
26 #define LCD_RS_DDR DDRC /* ddr for RS line */
27 #define LCD_RS_PORT PORTC /* port for RS line */
28 #define LCD_RS_PIN PC2
29 #define LCD_E_DDR DDRB /* ddr for Enable line */
30 #define LCD_E_PORT PORTB /* port for Enable line */
34 /* normally you do not change the following */
35 #define LCD_LINES 2 /* visible lines */
36 #define LCD_LINE_LENGTH 0x40 /* internal line length */
38 /* no need to change the next 4 lines. This is standard for HD44780 */
39 #define LCD_START_LINE1 0x00 /* DDRAM address of first char of line 1 */
40 #define LCD_START_LINE2 0x40 /* DDRAM address of first char of line 2 */
41 #define LCD_START_LINE3 0x14 /* DDRAM address of first char of line 3 */
42 #define LCD_START_LINE4 0x54 /* DDRAM address of first char of line 4 */