-
Notifications
You must be signed in to change notification settings - Fork 2
/
HD44780.h
executable file
·75 lines (60 loc) · 1.32 KB
/
HD44780.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
* HD44780.h - Header file of HD44780 library
* Written by Ercan Ersoy.
*/
#ifndef HD44780_H
#define HD44780_H
#define COLUMNS 0
#define ROWS 0
#ifndef COLUMNS
#error COLUMNS must be defined.
#endif
#ifndef ROWS
#error ROWS must be defined.
#endif
#define _XTAL_FREQ 0
#ifndef _XTAL_FREQ
#error _XTAL_FREQ must be defined.
#endif
#define RS 0
#define RW 0
#define ENABLE 0
#define LCD_PORT 0
#ifndef RS
#error RS must be defined.
#endif
#ifndef RW
#error RW must be defined.
#endif
#ifndef ENABLE
#error ENABLE must be defined.
#endif
#ifndef LCD_PORT
#error LCD_PORT must be defined.
#endif
#define ClearLCD 1
#define BackToBegin 2
#define WriteLeft 4
#define WriteRight 6
#define HideCursor 12
#define SkipCursor 14
#define BlinkCursor 16
#define ShiftRight 24
#define ShiftLeft 28
#define OnOffScreen 8
#define FirstLine 128
#define SecondLine 192
#define ThirdLine 148
#define FourthLine 212
#define GenerateCharacterAddress 64
#define DoubleLine 40
#define SingleLine 32
void lcd_wait(void);
void lcd_send_command(unsigned char command);
void lcd_send_data(unsigned char data);
void lcd_on_off_screen(void);
void lcd_clear(void);
void lcd_print(const char *s);
void lcd_goto_xy(unsigned char x, unsigned char y);
void lcd_prepare(void);
#endif