-
Notifications
You must be signed in to change notification settings - Fork 0
/
epd5in83.h
92 lines (84 loc) · 3.48 KB
/
epd5in83.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
******************************************************************************
* @file edp5in83.h
* @author Waveshare Team
* @version V1.1
* @date 15-Dec-2020
* @brief This file describes initialisation of 5.83, 5.83b, 5.83c e-Papers
*
******************************************************************************
*/
int EPD_5in83__init()
{
EPD_Reset();
EPD_Send_2(0x01, 0x37, 0x00); // POWER_SETTING
EPD_Send_2(0x00, 0xCF, 0x08); // PANEL_SETTING
EPD_Send_3(0x06, 0xC7, 0xCC, 0x28); // BOOSTER_SOFT_START
EPD_SendCommand(0x4); // POWER_ON
EPD_WaitUntilIdle();
EPD_Send_1(0x30, 0x3C); // PLL_CONTROL
EPD_Send_1(0x41, 0x00); // TEMPERATURE_CALIBRATION
EPD_Send_1(0x50, 0x77); // VCOM_AND_DATA_INTERVAL_SETTING
EPD_Send_1(0x60, 0x22); // TCON_SETTING
EPD_Send_4(0x61, 0x02, 0x58, 0x01, 0xC0);// TCON_RESOLUTION
EPD_Send_1(0x82, 0x1E); // VCM_DC_SETTING: decide by LUT file
EPD_Send_1(0xE5, 0x03); // FLASH MODE
EPD_SendCommand(0x10); // DATA_START_TRANSMISSION_1
delay(2);
return 0;
}
int EPD_Init_5in83_V2()
{
EPD_Reset();
EPD_Send_4(0x01, 0x07, 0x07, 0x3f, 0x3f); // POWER_SETTING
EPD_SendCommand(0x04); // POWER_ON
delay(100);
EPD_WaitUntilIdle();
EPD_Send_1(0x00, 0x1F); // PANEL_SETTING
EPD_Send_4(0x61, 0x02, 0x88, 0x01, 0xE0);// TCON_RESOLUTION
EPD_Send_1(0X15, 0x00);
EPD_Send_2(0X50, 0x10, 0x07);
EPD_Send_1(0X60, 0x22);
EPD_SendCommand(0x10); // DATA_START_TRANSMISSION_1
for(UWORD i=0; i<38880; i++) {
EPD_SendData(0x00);
}
EPD_SendCommand(0x13); // DATA_START_TRANSMISSION_2
delay(2);
return 0;
}
int EPD_5in83b__init()
{
EPD_Reset();
EPD_Send_2(0x01, 0x37, 0x00); // POWER_SETTING
EPD_Send_2(0x00, 0xCF, 0x08); // PANEL_SETTING
EPD_Send_3(0x06, 0xC7, 0xCC, 0x28); // BOOSTER_SOFT_START
EPD_SendCommand(0x4); // POWER_ON
EPD_WaitUntilIdle();
EPD_Send_1(0x30, 0x3A); // PLL_CONTROL
EPD_Send_1(0x41, 0x00); // TEMPERATURE_CALIBRATION
EPD_Send_1(0x50, 0x77); // VCOM_AND_DATA_INTERVAL_SETTING
EPD_Send_1(0x60, 0x22); // TCON_SETTING
EPD_Send_4(0x61, 0x02, 0x58, 0x01, 0xC0);// TCON_RESOLUTION
EPD_Send_1(0x82, 0x20); // VCM_DC_SETTING: decide by LUT file
EPD_Send_1(0xE5, 0x03); // FLASH MODE
EPD_SendCommand(0x10); // DATA_START_TRANSMISSION_1
delay(2);
return 0;
}
int EPD_5in83b_V2_init()
{
EPD_Reset();
EPD_Send_4(0x01, 0x07, 0x07, 0x3f, 0x3f); //POWER SETTING
EPD_SendCommand(0x04); //POWER ON
delay(100);
EPD_WaitUntilIdle(); //waiting for the electronic paper IC to release the idle signal
EPD_Send_1(0X00, 0x0F); //PANNEL SETTING
EPD_Send_4(0x61, 0x02, 0x88, 0x01, 0xe0); //tres
EPD_Send_1(0X15, 0x00);
EPD_Send_2(0X50, 0x11, 0x07); //VCOM AND DATA INTERVAL SETTING
EPD_Send_1(0X60, 0x22); //TCON SETTING
EPD_SendCommand(0x10); // DATA_START_TRANSMISSION_1
delay(2);
return 0;
}