Git Product home page Git Product logo

Comments (5)

nopnop2002 avatar nopnop2002 commented on June 22, 2024

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.

modi12jin avatar modi12jin commented on June 22, 2024

image

@nopnop2002 How to change this code

from esp-idf-parallel-tft.

nopnop2002 avatar nopnop2002 commented on June 22, 2024
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.

nopnop2002 avatar nopnop2002 commented on June 22, 2024

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.

modi12jin avatar modi12jin commented on June 22, 2024

@nopnop2002 I have tried and failed

The 16-bit parallel port of the official board may have something worthy of reference

image

https://github.com/espressif/esp-dev-kits/tree/master/esp32-s2-hmi-devkit-1

from esp-idf-parallel-tft.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.