-
Notifications
You must be signed in to change notification settings - Fork 0
/
lcd16x2_ioshield.h
74 lines (67 loc) · 2.47 KB
/
lcd16x2_ioshield.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
//------------------------------------------------------------------------------
//
// 2022.04.26 16x2 LCD+IO Shield. for WiringPi. (chalres-park)
//
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
#ifndef __LCD16x2_IOSHIELD_H__
#define __LCD16x2_IOSHIELD_H__
//------------------------------------------------------------------------------
//
// for lcd interface data
//
//------------------------------------------------------------------------------
#define BOARD_LCD_ROW 2 // 16 Char
#define BOARD_LCD_COL 16 // 2 Line
#define BOARD_LCD_BUS 4 // Interface 4 Bit mode
//------------------------------------------------------------------------------
#define PORT_LCD_RS 7
#define PORT_LCD_E 0
#define PORT_LCD_D4 2
#define PORT_LCD_D5 3
#define PORT_LCD_D6 1
#define PORT_LCD_D7 4
//------------------------------------------------------------------------------
//
// Button:
//
//------------------------------------------------------------------------------
#define PORT_BUTTON1 5
#define PORT_BUTTON2 6
//------------------------------------------------------------------------------
//
// LED:
//
//------------------------------------------------------------------------------
// PCB Layout
// | D1 | D2 | D3 | D4 | D7 | D6 | D5 |
//------------------------------------------------------------------------------
#define PORT_LED1 21
#define PORT_LED2 22
#define PORT_LED3 23
#define PORT_LED4 24
#define PORT_LED7 11
#define PORT_LED6 26
#define PORT_LED5 27
//------------------------------------------------------------------------------
//
// SPI:
//
//------------------------------------------------------------------------------
#define PORT_MISO 13
#define PORT_MOSI 12
#define PORT_SCLK 14
#define PORT_CE0 10
//------------------------------------------------------------------------------
//
// I2C: I2C-1, I2C-2
//
//------------------------------------------------------------------------------
#define PORT_SDA1 3
#define PORT_SCL1 5
#define PORT_SDA2 27
#define PORT_SCL2 28
//------------------------------------------------------------------------------
#endif // #define __LCD16x2_IOSHIELD_H__
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------