Subversion Repositories group.electronics

Rev

Rev 49 | Rev 52 | 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);
49 pfowler 39
void lcd_pergraph(uint8_t, uint8_t, uint8_t);
42 pfowler 40
void lcd_command(uint8_t);
41
void lcd_char(uint8_t data);
48 pfowler 42
uint8_t lcd_print(char* str);
51 pfowler 43
void lcd_overprint(char * str, uint8_t len, uint8_t, uint8_t);
42 pfowler 44
void lcd_send(uint8_t, uint8_t);
45
void lcd_write(uint8_t);
46
void lcd_pulse(uint8_t);
48 pfowler 47
void lcd_createChar(uint8_t, uint8_t[]);
42 pfowler 48
 
46 pfowler 49
inline void lcd_clear();
50
inline void lcd_home();
51
inline void lcd_backlight();
52
inline void lcd_noBacklight();
53
void lcd_display();
54
void lcd_noDisplay();
55
void lcd_setCursor(uint8_t, uint8_t);
48 pfowler 56
void lcd_autoscroll();
45 pfowler 57
 
58
 
42 pfowler 59
#endif