Possible to use I2S to have a 16 bit data bus?

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Possible to use I2S to have a 16 bit data bus?

Postby fasani » Thu Jul 29, 2021 12:41 pm

Hi there, I'm using the EPDiy component to drive 8 data lines parallel epapers using I2S. It works great and uses ESP32 with PSRAM (WROVER).
Lately, I think due that new epapers have big buffers, Waveshare and Gooddisplay have a 16 data bus epaper I guess to receive 2 bytes at a time. All other logic seems to be the same except of this double parallel buffer.
Image
My intention is to analyze if it would be possible to use ESP32-S2 (Since we would've more GPIOs and extended RAM support) to drive this epapers.
I've already read the ESP-IDF documentation about I2S where it mentions:
The I2S peripherals also support LCD mode for communicating data over a parallel bus, as used by some LCD displays and camera modules. LCD mode has the following operational modes:

LCD master transmitting mode

Camera slave receiving mode

ADC/DAC mode
But I'm not sure if it will be possible to use more than 8 GPIOs for parallel communication or it's like I will have to use two I2S instead. Can someone with experience in this matters explain to me if that is a possibility?
If it's only possible using two I2S then my idea won't work since the ESP32-S2 has only 1 I2S (Please correct me if I'm wrong)
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Possible to use I2S to have a 16 bit data bus?

Postby ESP_Sprite » Fri Jul 30, 2021 12:47 am

Yes, I2S can do 16 or even 32-bit buses.

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Possible to use I2S to have a 16 bit data bus?

Postby fasani » Tue Aug 03, 2021 8:05 pm

Awesome ESP_Sprite,
I think it will be possible then to drive this displays. One more question, when I see the existing version of EPDiy with 8 data lines the GPIOs order is like this:

Code: Select all

void i2s_bus_init(i2s_bus_config *cfg) {
  gpio_num_t I2S_GPIO_BUS[] = {cfg->data_6, cfg->data_7, cfg->data_4,
                               cfg->data_5, cfg->data_2, cfg->data_3,
                               cfg->data_0, cfg->data_1};
  // ... rest of initialization
}
How it will be the right order for a 16 bit data-bus?
It’s a bit hard for me at the moment to understand the ordering logic behind it. Thank you very much for your feedback!
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: Possible to use I2S to have a 16 bit data bus?

Postby ESP_Sprite » Wed Aug 04, 2021 1:36 am

I have no idea why that bus order is flipped around, sorry.

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Possible to use I2S to have a 16 bit data bus?

Postby fasani » Sat Aug 07, 2021 3:25 pm

Thank @ESP_Sprite
I will be really thankful to have the answer if someone knows how it is. Otherwise I will have to connect a Logic Analyser and discover it myself but the one I have at home does not have 16 inputs ;)
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

User avatar
fasani
Posts: 195
Joined: Wed Jan 30, 2019 12:00 pm
Location: Barcelona
Contact:

Re: Possible to use I2S to have a 16 bit data bus?

Postby fasani » Tue Aug 10, 2021 11:24 am

Will keep on with the research in my Fork WiKi here:
https://github.com/martinberlin/epdiy-r ... with-EPDiy

If anyone is interested just comment. Thanks for all the support so far!
epdiy collaborator | http://fasani.de Fan of Espressif MCUs and electronic design

Who is online

Users browsing this forum: Baidu [Spider], joglz8 and 108 guests