Subversion Repositories group.electronics

Rev

Rev 45 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
42 pfowler 1
#ifndef lcd_h
2
#define lcd_h
3
#define LCD_ADDR        0x27
4
 
5
#define LCD_CLEARDISPLAY        0x01
6
#define LCD_RETURNHOME          0x02
7
 
8
#define LCD_DISPLAYCONTROL      0x08
9
#define LCD_FUNCTIONSET         0x20
10
 
11
#define LCD_DISPLAYON           0x04
12
#define LCD_DISPLAYOFF          0x00
13
#define LCD_CURSORON            0x02
14
#define LCD_CURSOROFF           0x00
15
#define LCD_BLINKON             0x01
16
#define LCD_BLINKOFF            0x00
17
 
18
 
19
#define LCD_4BITMODE            0x10
20
#define LCD_2LINE               0x08
21
#define LCD_5x8DOTS             0x00
22
 
23
#define LCD_MODE_CM     0x00                    // Command line
24
#define LCD_MODE_RS     0x01                    // Write line
25
#define LCD_MODE_RW     0x02                    // Read line
26
#define LCD_MODE_EN     0x04                    // Enable line
27
 
28
void lcd_init(void);
29
void lcd_command(uint8_t);
30
void lcd_char(uint8_t data);
31
void lcd_send(uint8_t, uint8_t);
32
void lcd_sendNib(uint8_t);
33
void lcd_write(uint8_t);
34
void lcd_pulse(uint8_t);
35
 
36
#endif