00001 /* 00002 * Filename: main.c 00003 * Version: 0.1 00004 * Description: Example for HD44780 Display Library for ATMEL AVR 00005 * License: Public Domain 00006 * 00007 * Author: Copyright (C) Max Gaukler <development@maxgaukler.de> 00008 * Date: 2010 00009 * 00010 * I, the copyright holder of this work, hereby release it into the public domain. This applies worldwide. 00011 * In case this is not legally possible: 00012 * I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law. 00013 * 00014 */ 00015 #define LCD_PORT PORTB 00016 #define LCD_DDR DDRB 00017 #define LCD_RS_PIN PB5 00018 #define LCD_EN_PIN PB4 00019 #define LCD_D4_PIN PB0 00020 #define LCD_COLS 16 00021 #define LCD_LINES 2 00022 #define LCD_MODE_4BIT 00023 #include <avr/io.h> 00024 #include "lcd.c" 00025 int main(void) { 00026 lcd_init(); 00027 lcd_putstr_P(PSTR("Hello")); 00028 }