00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
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