Subversion Repositories group.electronics

Rev

Rev 51 | Rev 53 | 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
 
48 pfowler 8
#define LCD_ENTRYMODESET	0x04
42 pfowler 9
#define LCD_DISPLAYCONTROL      0x08
10
#define LCD_FUNCTIONSET         0x20
48 pfowler 11
#define LCD_SETCGRAMADDR	0x40
46 pfowler 12
#define LCD_SETDDRAMADDR	0x80
42 pfowler 13
 
14
#define LCD_DISPLAYON           0x04
15
#define LCD_DISPLAYOFF          0x00
16
#define LCD_CURSORON            0x02
17
#define LCD_CURSOROFF           0x00
18
#define LCD_BLINKON             0x01
19
#define LCD_BLINKOFF            0x00
20
 
48 pfowler 21
#define LCD_ENTRYRIGHT 0x00
22
#define LCD_ENTRYLEFT 0x02
23
#define LCD_ENTRYSHIFTINCREMENT 0x01
24
#define LCD_ENTRYSHIFTDECREMENT 0x00
25
 
45 pfowler 26
#define LCD_BACKLIGHT		0x08
27
#define LCD_NOBACKLIGHT		0x00
42 pfowler 28
 
29
#define LCD_4BITMODE            0x10
30
#define LCD_2LINE               0x08
31
#define LCD_5x8DOTS             0x00
32
 
33
#define LCD_MODE_CM     0x00                    // Command line
34
#define LCD_MODE_RS     0x01                    // Write line
35
#define LCD_MODE_RW     0x02                    // Read line
36
#define LCD_MODE_EN     0x04                    // Enable line
37
 
38
void lcd_init(void);
52 pfowler 39
 
40
void lcd_percent_graph(uint8_t, uint8_t, uint8_t);
41
 
42
uint8_t lcd_print_right(char*);
43
uint8_t lcd_print(char*);
51 pfowler 44
void lcd_overprint(char * str, uint8_t len, uint8_t, uint8_t);
42 pfowler 45
 
46 pfowler 46
inline void lcd_clear();
47
inline void lcd_home();
48
inline void lcd_backlight();
49
inline void lcd_noBacklight();
50
void lcd_display();
51
void lcd_noDisplay();
52
void lcd_setCursor(uint8_t, uint8_t);
48 pfowler 53
void lcd_autoscroll();
52 pfowler 54
void lcd_noAutoscroll();
45 pfowler 55
 
52 pfowler 56
void lcd_command(uint8_t);
57
void lcd_char(uint8_t data);
58
void lcd_send(uint8_t, uint8_t);
59
void lcd_write(uint8_t);
60
void lcd_pulse(uint8_t);
61
void lcd_createChar(uint8_t, uint8_t[]);
45 pfowler 62
 
42 pfowler 63
#endif