Main Page | File List | Globals | Related Pages

c/hd44780.h

Go to the documentation of this file.
00001 /* 
00002  * This file is part of AvrTherm.
00003  *
00004  * This program is free software; you can redistribute it and/or modify
00005  * it under the terms of the GNU General Public License as published
00006  * by the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00012  * See the GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017  *
00018  * Copyright (C) 2004 Andreas Schroeder <andreas@a-netz.de>
00019  */
00020 
00037 #ifndef HD44780_H
00038 #define HD44780_H
00039 
00040 #include <avr/pgmspace.h>
00041 
00043 #define HD44780_PORT  PORTB
00044 
00045 #define HD44780_DDR   DDRB
00046 
00047 #define HD44780_PIN   PINB
00048 
00050 #define HD44780_BIT_ENABLE  5
00051 
00052 #define HD44780_BIT_RW      6
00053 
00054 #define HD44780_BIT_RS      7
00055 
00062 #define HD44780_DATA sbi(HD44780_PORT, HD44780_BIT_RS);
00063 
00070 #define HD44780_INSTR cbi(HD44780_PORT, HD44780_BIT_RS);
00071 
00078 #define HD44780_FIRST_ROW    0x80
00079 
00083 #define HD44780_SECOND_ROW   0xc0
00084 
00088 #define HD44780_CMD_CLEAR    0x01
00089 
00095 void hd44780_init(void);
00096 
00105 void hd44780_putchar(char c);
00106 
00112 char hd44780_getchar(void);
00113 
00120 void hd44780_reset(void);
00121 
00128 void hd44780_put_pgm_str(PGM_P data);
00129 
00137 void hd44780_put_str(char* data);
00138 
00139 #endif

Generated on Wed Oct 27 10:57:05 2004 by  doxygen 1.3.9.1