[vc_row][vc_column][vc_column_text][/vc_column_text][/vc_column][/vc_row][vc_row][vc_column width=”1/1″][vc_tour interval=”0″ title=”Hardware prepare”][vc_tab title=”Introduce” tab_id=”1409641205-1-50″][vc_column_text]
E-paper is popular in recent years which is a kind of replacement of traditional paper books, the way to achieve the e-paper technology including cholesterol liquid crystal display technology, electrophoretic display technology( EPD) and electrowetting display technology. Support E-paper display is electronic ink, electronic ink is actually a new material, it is the product of chemistry, physics and electronics multidisciplinary development, this material can be printed onto any material surface and to display the text or image information.
Next, we will demo how to display the image with the Arduino and E-paper.
[/vc_column_text][/vc_tab][vc_tab title=”Hardware prepare” tab_id=”1409641205-2-6″][vc_column_text]
- Arduino Uno
- 2.04 inch E-paper
- USB cable
[/vc_column_text][/vc_tab][vc_tab title=”Software preparation ” tab_id=”1409641339875-2-2″][vc_column_text]
1.Download the software :Image2Lcd click :Image2Lcd
2. Unzip and click
Click Next,until see the Finish
3. Regester
Click Register,input 0000 0000 0000 0000 6A3B
4,it will appear Image2Lcd interface ,modify
- output file- .c file,
- Scan mode –vertical scan,
- Bits Pixel-4 Color
- Max width and Height-172,72
- choose MSB First
5. Choose a picture which size is 172 * 72
6. Click save ,it will come out a text of code for the picture
[/vc_column_text][/vc_tab][vc_tab title=”Code and result” tab_id=”1409641341953-3-4″][vc_column_text]
Input the codeminieink into Arduino IDE
Just represent the code in blue as the code from the picture
As figure
#include<util/delay.h> //172*72 #define nDC_H digitalWrite(8,HIGH) #define nDC_L digitalWrite(8,LOW) #define nCS_H digitalWrite(10,HIGH) #define nCS_L digitalWrite(10,LOW) #define SDA_H digitalWrite(11,HIGH) #define SDA_L digitalWrite(11,LOW) #define SCLK_H digitalWrite(13,HIGH) #define SCLK_L digitalWrite(13,LOW) #define nRST_H digitalWrite(12,HIGH) #define nRST_L digitalWrite(12,LOW) #define a digitalRead(9) const unsigned char init_data[]={ 0x82,0x00,0x00,0x00,0xAA,0x00,0x00,0x00, 0xAA,0xAA,0x00,0x00,0xAA,0xAA,0xAA,0x00, 0x55,0xAA,0xAA,0x00,0x55,0x55,0x55,0x55, 0xAA,0xAA,0xAA,0xAA,0x55,0x55,0x55,0x55, 0xAA,0xAA,0xAA,0xAA,0x15,0x15,0x15,0x15, 0x05,0x05,0x05,0x05,0x01,0x01,0x01,0x01, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x41,0x45,0xF1,0xFF,0x5F,0x55,0x01,0x00, 0x00,0x00,};//waveform unsigned char PROGMEM gImage[3096] = { /* 0X01,0X02,0XAC,0X00,0X48,0X00, */ <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X08,0X00,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X0D,0X56,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X02,0X40,0XC0,0X00,0X00,0XAA,0XAA,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X90,0X00,0X00,0X00,0XC0,</span> <span style="color: #ff0000;">0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X18,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0XC0,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X08,0X06,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0XC0,0XC0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X0D,0X55,0X80,0X00,0X00,0X7B,0X40,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X00,0X0C,</span> <span style="color: #ff0000;">0X00,0X00,0X08,0X00,0X00,0X00,0X00,0X14,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,</span> <span style="color: #ff0000;">0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0XFF,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0XC0,0X00,0X0C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0C,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3C,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X3C,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0XC0,0X0C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0XF0,0XC0,0X0C,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0XF0,0XFF,0XFC,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X30,</span> <span style="color: #ff0000;">0X18,0X00,0X00,0X00,0X00,0X00,0X00,0XF0,0XFF,0XFC,0X00,0X00,0X04,0X01,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X10,0X04,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0C,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0C,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0XC0,0X0C,0X00,0X00,0X00,0X00,0X10,0X00,0X00,0X00,0X00,0X40,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0XFF,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0XBA,0XAC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XF0,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X0C,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFC,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X3F,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X30,0X00,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X3F,0XFF,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0X04,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XCC,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XF0,0XFC,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0XC0,0X3C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0XC0,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X3F,0X00,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0XFF,0XC0,0XFC,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0XC0,0XF0,0X0C,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0XC0,0X30,0X0C,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0XC0,</span> <span style="color: #ff0000;">0X3C,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0XFC,0X0F,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0XFC,0X03,0XF0,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X00,0XC0,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFF,0XC0,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XBA,0XBA,0XC0,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XF0,0X3C,</span> <span style="color: #ff0000;">0XC0,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0XC0,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0XF0,0X3C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X3F,0XF0,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X0F,0XC0,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X0C,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X0C,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0XFC,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0XBA,0XAC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0XF0,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0XC0,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0XF0,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XF0,0X00,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X0C,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0XF0,</span> <span style="color: #ff0000;">0XC0,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0XF0,0XFF,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0XF0,0XFF,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0XC0,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0XC0,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X0F,0XFF,0XF0,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X0F,0XFF,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC0,0X3C,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X30,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X3F,0XF0,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0XFF,0XFC,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0XC3,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC3,0X0C,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XC3,0X0C,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0XFF,0X3C,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X3F,0X30,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X20,0X00,0X00,0X00,0X00,0X80,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X10,0X00,0X00,0X00,0X00,0X40,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,</span> <span style="color: #ff0000;">0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00};</span> void DELAY_mS(int delaytime) //???? { while(delaytime--)_delay_ms(1); } void RESET() { nRST_L; DELAY_mS(1);//1ms nRST_H; DELAY_mS(1);//1ms } void SPI4W_WRITECOM(unsigned char INIT_COM) { unsigned char TEMPCOM; unsigned char scnt; TEMPCOM=INIT_COM; nCS_H; nCS_L; SCLK_L; nDC_L; for(scnt=0;scnt<8;scnt++) { if(TEMPCOM&0x80) SDA_H; else SDA_L; SCLK_H; SCLK_L; TEMPCOM=TEMPCOM<<1; } nCS_H; } void SPI4W_WRITEDATA(unsigned char INIT_DATA) { unsigned char TEMPCOM; unsigned char scnt; TEMPCOM=INIT_DATA; nCS_H; nCS_L; SCLK_L; nDC_H; for(scnt=0;scnt<8;scnt++) { if(TEMPCOM&0x80) SDA_H; else SDA_L; SCLK_H; SCLK_L; TEMPCOM=TEMPCOM<<1; } nCS_H; nDC_L; } void WRITE_LUT() { unsigned char i; SPI4W_WRITECOM(0x32);//write LUT register for(i=0;i<90;i++) { SPI4W_WRITEDATA(init_data[i]); } } void INIT_SPD2701() { SPI4W_WRITECOM(0x03);//set PREVGH,PREVGL SPI4W_WRITEDATA(0x00); SPI4W_WRITECOM(0x10);//set no deep sleep mode SPI4W_WRITEDATA(0x00); SPI4W_WRITECOM(0x11);//data enter mode SPI4W_WRITEDATA(0x01); SPI4W_WRITECOM(0x44);//setRAM x address start/end SPI4W_WRITEDATA(0x00);//RAM x address start at 00h; SPI4W_WRITEDATA(0x11);//RAMx address end at 11h(17)->72 SPI4W_WRITECOM(0x45);//set RAM y address start/end SPI4W_WRITEDATA(0xAB);//RAM y address start at 00h; SPI4W_WRITEDATA(0x00);//RAM y address start at ABh(171)->172 SPI4W_WRITECOM(0x4E);//set RAM x address count to 0; SPI4W_WRITEDATA(0x00); SPI4W_WRITECOM(0x4F);//set RAM y address count to 0; SPI4W_WRITEDATA(0xAB); SPI4W_WRITECOM(0x21);//bypass RAM data SPI4W_WRITEDATA(0x03); SPI4W_WRITECOM(0xF0);//booster feedback used SPI4W_WRITEDATA(0x1F); SPI4W_WRITECOM(0x2C);//vcom voltage SPI4W_WRITEDATA(0xA0); SPI4W_WRITECOM(0x3C);//board voltage SPI4W_WRITEDATA(0x63); SPI4W_WRITECOM(0x22);//display updata sequence option ,in page 33 SPI4W_WRITEDATA(0xC4);//enable sequence: clk -> CP -> LUT -> pattern display WRITE_LUT(); } void entersleep() { SPI4W_WRITECOM(0x22);//display updata sequence option SPI4W_WRITEDATA(0x03); SPI4W_WRITECOM(0x20); } void image_display() { char data; int i; SPI4W_WRITECOM(0x24); for(i=0;i<3096;i++) { data = pgm_read_byte(&gImage[i]); SPI4W_WRITEDATA(~data); } SPI4W_WRITECOM(0x20); entersleep(); } void setup() { // put your setup code here, to run once: pinMode(8,OUTPUT); pinMode(10,OUTPUT); pinMode(11,OUTPUT); pinMode(13,OUTPUT); pinMode(9,INPUT); Serial.begin(9600); RESET(); INIT_SPD2701(); //while(1); image_display(); } void loop() { }
[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Comments are closed.