Subversion Repositories group.electronics

Rev

Rev 42 | Rev 46 | Go to most recent revision | Details | Compare with Previous | 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
 
45 pfowler 18
#define LCD_BACKLIGHT		0x08
19
#define LCD_NOBACKLIGHT		0x00
42 pfowler 20
 
21
#define LCD_4BITMODE            0x10
22
#define LCD_2LINE               0x08
23
#define LCD_5x8DOTS             0x00
24
 
25
#define LCD_MODE_CM     0x00                    // Command line
26
#define LCD_MODE_RS     0x01                    // Write line
27
#define LCD_MODE_RW     0x02                    // Read line
28
#define LCD_MODE_EN     0x04                    // Enable line
29
 
30
void lcd_init(void);
31
void lcd_command(uint8_t);
32
void lcd_char(uint8_t data);
33
void lcd_send(uint8_t, uint8_t);
34
void lcd_write(uint8_t);
35
void lcd_pulse(uint8_t);
36
 
45 pfowler 37
void i2c_clear();
38
void i2c_home();
39
void i2c_display();
40
void i2c_noDisplay();
41
void i2c_backlight();
42
void i2c_noBacklight();
43
 
44
 
42 pfowler 45
#endif