Comments (5)
Change here to 16.
https://github.com/nopnop2002/esp-idf-parallel-tft/blob/main/components/tft_library/lcd_com.c#L317
Uncomment here.
https://github.com/nopnop2002/esp-idf-parallel-tft/blob/main/components/tft_library/lcd_com.c#L361
Add define.
BOARD_LCD_I2S_Dn_PIN.
This project uses this driver.
https://github.com/espressif/esp-iot-solution/tree/master/components/bus
If official fails in 16-bit parallel, This project also fails.
from esp-idf-parallel-tft.
@nopnop2002 How to change this code
from esp-idf-parallel-tft.
void gpio_lcd_write_data(int dummy1, unsigned char *data, size_t size) {
#if 8bit_mode
for (int i=0;i<size;i++) {
gpio_digital_write(LCD_D0_PIN, data[i] & 0x01);
gpio_digital_write(LCD_D1_PIN, data[i] & 0x02);
gpio_digital_write(LCD_D2_PIN, data[i] & 0x04);
gpio_digital_write(LCD_D3_PIN, data[i] & 0x08);
gpio_digital_write(LCD_D4_PIN, data[i] & 0x10);
gpio_digital_write(LCD_D5_PIN, data[i] & 0x20);
gpio_digital_write(LCD_D6_PIN, data[i] & 0x40);
gpio_digital_write(LCD_D7_PIN, data[i] & 0x80);
gpio_set_level( LCD_WR_PIN, 0 );
gpio_set_level( LCD_WR_PIN, 1 );
}
#else
for (int i=0;i<size/2;i=i+2) {
gpio_digital_write(LCD_D0_PIN, data[i] & 0x01);
gpio_digital_write(LCD_D1_PIN, data[i] & 0x02);
gpio_digital_write(LCD_D2_PIN, data[i] & 0x04);
gpio_digital_write(LCD_D3_PIN, data[i] & 0x08);
gpio_digital_write(LCD_D4_PIN, data[i] & 0x10);
gpio_digital_write(LCD_D5_PIN, data[i] & 0x20);
gpio_digital_write(LCD_D6_PIN, data[i] & 0x40);
gpio_digital_write(LCD_D7_PIN, data[i] & 0x80);
gpio_digital_write(LCD_D8_PIN, data[i+1] & 0x01);
gpio_digital_write(LCD_D9_PIN, data[i+1] & 0x02);
gpio_digital_write(LCD_D10_PIN, data[i+1] & 0x04);
gpio_digital_write(LCD_D11_PIN, data[i+1] & 0x08);
gpio_digital_write(LCD_D12_PIN, data[i+1] & 0x10);
gpio_digital_write(LCD_D13_PIN, data[i+1] & 0x20);
gpio_digital_write(LCD_D14_PIN, data[i+1] & 0x40);
gpio_digital_write(LCD_D15_PIN, data[i+1] & 0x80);
gpio_set_level( LCD_WR_PIN, 0 );
gpio_set_level( LCD_WR_PIN, 1 );
}
#endif
}
void reg_lcd_write_data(int dummy1, unsigned char *data, size_t size) {
#if 8bit_mode
for (int i=0;i<size;i++) {
reg_digital_write(LCD_D0_PIN, data[i] & 0x01);
reg_digital_write(LCD_D1_PIN, data[i] & 0x02);
reg_digital_write(LCD_D2_PIN, data[i] & 0x04);
reg_digital_write(LCD_D3_PIN, data[i] & 0x08);
reg_digital_write(LCD_D4_PIN, data[i] & 0x10);
reg_digital_write(LCD_D5_PIN, data[i] & 0x20);
reg_digital_write(LCD_D6_PIN, data[i] & 0x40);
reg_digital_write(LCD_D7_PIN, data[i] & 0x80);
gpio_set_level( LCD_WR_PIN, 0 );
gpio_set_level( LCD_WR_PIN, 1 );
}
#else
for (int i=0;i<size/2;i=i+2) {
reg_digital_write(LCD_D0_PIN, data[i] & 0x01);
reg_digital_write(LCD_D1_PIN, data[i] & 0x02);
reg_digital_write(LCD_D2_PIN, data[i] & 0x04);
reg_digital_write(LCD_D3_PIN, data[i] & 0x08);
reg_digital_write(LCD_D4_PIN, data[i] & 0x10);
reg_digital_write(LCD_D5_PIN, data[i] & 0x20);
reg_digital_write(LCD_D6_PIN, data[i] & 0x40);
reg_digital_write(LCD_D7_PIN, data[i] & 0x80);
reg_digital_write(LCD_D8_PIN, data[i+1] & 0x01);
reg_digital_write(LCD_D9_PIN, data[i+1] & 0x02);
reg_digital_write(LCD_D10_PIN, data[i+1] & 0x04);
reg_digital_write(LCD_D11_PIN, data[i+1] & 0x08);
reg_digital_write(LCD_D12_PIN, data[i+1] & 0x10);
reg_digital_write(LCD_D13_PIN, data[i+1] & 0x20);
reg_digital_write(LCD_D14_PIN, data[i+1] & 0x40);
reg_digital_write(LCD_D15_PIN, data[i+1] & 0x80);
gpio_set_level( LCD_WR_PIN, 0 );
gpio_set_level( LCD_WR_PIN, 1 );
}
}
I haven't tested it.
from esp-idf-parallel-tft.
When using REGISTER I/O parallel, GPIO from D0 to D15 is 1 to 31.
Because the register address is different after GPIO31.
from esp-idf-parallel-tft.
@nopnop2002 I have tried and failed
The 16-bit parallel port of the official board may have something worthy of reference
https://github.com/espressif/esp-dev-kits/tree/master/esp32-s2-hmi-devkit-1
from esp-idf-parallel-tft.
Related Issues (20)
- IMAGE HOT 1
- IMAGE
- Esp32s2 compilation error. Because it has only one I2S HOT 3
- IMAGES HOT 30
- How to use this warehouse with LVGL? HOT 2
- Use in platformio
- QUESTION: SPI or parallel for new designs? HOT 2
- Add ST7789 support HOT 6
- QUESTION: open-smart ILI9320 not support HOT 2
- How to find 4-wire resistance touchscreen feature
- ESP IDF Component Manager HOT 4
- Add support for R61529 HOT 7
- Support for ESP32S3 HOT 10
- Touch input for st7793. open smart 16pin HOT 6
- How to connect ESP-32 HOT 4
- [GIF IMAGE FOR TFT SCREEN] HOT 1
- [ILI9806E SUPPORT?] HOT 1
- How can i add the TFT configuration to menuconfig in a scratch project ? HOT 3
- usb camera with lcd HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-idf-parallel-tft.