Subversion Repositories group.electronics

Rev

Rev 46 | Rev 49 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 46 Rev 48
Line 3... Line 3...
3
#define LCD_ADDR        0x27
3
#define LCD_ADDR        0x27
4
 
4
 
5
#define LCD_CLEARDISPLAY        0x01
5
#define LCD_CLEARDISPLAY        0x01
6
#define LCD_RETURNHOME          0x02
6
#define LCD_RETURNHOME          0x02
7
 
7
 
-
 
8
#define LCD_ENTRYMODESET	0x04
8
#define LCD_DISPLAYCONTROL      0x08
9
#define LCD_DISPLAYCONTROL      0x08
9
#define LCD_FUNCTIONSET         0x20
10
#define LCD_FUNCTIONSET         0x20
-
 
11
#define LCD_SETCGRAMADDR	0x40
10
#define LCD_SETDDRAMADDR	0x80
12
#define LCD_SETDDRAMADDR	0x80
11
 
13
 
12
#define LCD_DISPLAYON           0x04
14
#define LCD_DISPLAYON           0x04
13
#define LCD_DISPLAYOFF          0x00
15
#define LCD_DISPLAYOFF          0x00
14
#define LCD_CURSORON            0x02
16
#define LCD_CURSORON            0x02
15
#define LCD_CURSOROFF           0x00
17
#define LCD_CURSOROFF           0x00
16
#define LCD_BLINKON             0x01
18
#define LCD_BLINKON             0x01
17
#define LCD_BLINKOFF            0x00
19
#define LCD_BLINKOFF            0x00
18
 
20
 
-
 
21
#define LCD_ENTRYRIGHT 0x00
-
 
22
#define LCD_ENTRYLEFT 0x02
-
 
23
#define LCD_ENTRYSHIFTINCREMENT 0x01
-
 
24
#define LCD_ENTRYSHIFTDECREMENT 0x00
-
 
25
 
19
#define LCD_BACKLIGHT		0x08
26
#define LCD_BACKLIGHT		0x08
20
#define LCD_NOBACKLIGHT		0x00
27
#define LCD_NOBACKLIGHT		0x00
21
 
28
 
22
#define LCD_4BITMODE            0x10
29
#define LCD_4BITMODE            0x10
23
#define LCD_2LINE               0x08
30
#define LCD_2LINE               0x08
Line 29... Line 36...
29
#define LCD_MODE_EN     0x04                    // Enable line
36
#define LCD_MODE_EN     0x04                    // Enable line
30
 
37
 
31
void lcd_init(void);
38
void lcd_init(void);
32
void lcd_command(uint8_t);
39
void lcd_command(uint8_t);
33
void lcd_char(uint8_t data);
40
void lcd_char(uint8_t data);
-
 
41
uint8_t lcd_print(char* str);
-
 
42
void lcd_overprint(char * str, uint8_t len, uint8_t col, uint8_t row);
34
void lcd_send(uint8_t, uint8_t);
43
void lcd_send(uint8_t, uint8_t);
35
void lcd_write(uint8_t);
44
void lcd_write(uint8_t);
36
void lcd_pulse(uint8_t);
45
void lcd_pulse(uint8_t);
-
 
46
void lcd_createChar(uint8_t, uint8_t[]);
37
 
47
 
38
inline void lcd_clear();
48
inline void lcd_clear();
39
inline void lcd_home();
49
inline void lcd_home();
40
inline void lcd_backlight();
50
inline void lcd_backlight();
41
inline void lcd_noBacklight();
51
inline void lcd_noBacklight();
42
void lcd_display();
52
void lcd_display();
43
void lcd_noDisplay();
53
void lcd_noDisplay();
44
void lcd_setCursor(uint8_t, uint8_t);
54
void lcd_setCursor(uint8_t, uint8_t);
-
 
55
void lcd_autoscroll();
45
 
56
 
46
 
57
 
47
#endif
58
#endif