Subversion Repositories group.electronics

Rev

Rev 45 | Rev 48 | 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
46 pfowler 10
#define LCD_SETDDRAMADDR	0x80
42 pfowler 11
 
12
#define LCD_DISPLAYON           0x04
13
#define LCD_DISPLAYOFF          0x00
14
#define LCD_CURSORON            0x02
15
#define LCD_CURSOROFF           0x00
16
#define LCD_BLINKON             0x01
17
#define LCD_BLINKOFF            0x00
18
 
45 pfowler 19
#define LCD_BACKLIGHT		0x08
20
#define LCD_NOBACKLIGHT		0x00
42 pfowler 21
 
22
#define LCD_4BITMODE            0x10
23
#define LCD_2LINE               0x08
24
#define LCD_5x8DOTS             0x00
25
 
26
#define LCD_MODE_CM     0x00                    // Command line
27
#define LCD_MODE_RS     0x01                    // Write line
28
#define LCD_MODE_RW     0x02                    // Read line
29
#define LCD_MODE_EN     0x04                    // Enable line
30
 
31
void lcd_init(void);
32
void lcd_command(uint8_t);
33
void lcd_char(uint8_t data);
34
void lcd_send(uint8_t, uint8_t);
35
void lcd_write(uint8_t);
36
void lcd_pulse(uint8_t);
37
 
46 pfowler 38
inline void lcd_clear();
39
inline void lcd_home();
40
inline void lcd_backlight();
41
inline void lcd_noBacklight();
42
void lcd_display();
43
void lcd_noDisplay();
44
void lcd_setCursor(uint8_t, uint8_t);
45 pfowler 45
 
46
 
42 pfowler 47
#endif