-->
Page 1 of 2

ESP-12 multiple HSPI devices?

PostPosted: Mon Aug 31, 2015 8:20 am
by Kai
Hi Folks,

I'm a ESP beginner and playing around with the Arduino-IDE. I testet different example sketches and things working well.

But now I plan to do a project where to use a Ili9341 and it's SD card reader.
Setting up HSPI for the display is no problem. It works like a charm.
MISO - GPIO12
MOSI - GPIO13
CLK - GPIO14
CS - GPIO15
RST - GPIO0
D/C - GPIO2

But now I'm failing in adding a second device to the SPI bus. What pin I have to assing to the SD.begin(PIN)?
Since I also using I2C for accessing I hope it will not GPIO4 or GPIO5.


I hope someone can enlight me.

Kind regards,
Kai

Re: ESP-12 multiple HSPI devices?

PostPosted: Wed Sep 09, 2015 3:48 am
by Kai
Hi Guys,

sorry to bring this up again.
I have still no success in adding a second device to my HSPI port.

Did no one ever tried this?

Is it impossible, or not jet implemented?

Would be nice if someone can answer this.

Kind regards,
Kai

Re: ESP-12 multiple HSPI devices?

PostPosted: Wed Sep 09, 2015 9:10 am
by martinayotte
Although I've never try it since I don't have this device yet, I would suggest the following.
- RST pin doesn't need a dedicated GPIO, I would connect it to RES of ESP so they will be reset at the same time, freeing up one pin.
- move your I2C bus to GPIO2/GPIO0 since those have already pullups
- Having now GPIO4/GPIO5 free, you can use them, one for D/C and the other for the other device CS.

Re: ESP-12 multiple HSPI devices?

PostPosted: Thu Sep 10, 2015 2:03 am
by Kai
Hi martinayotte,

I tried to wire it up like you suggest with one difference. I tied Display-RST to GPIO16, since it seems activly used by the init procedure and is mandatory at the constructor.

Anyway, the SPI Display works, the I2C BMP180 works also.

And big surprise, SD works too. :!:
In the past I tried SD_CS on GPIO16, which not seem to work.

Is there a "Link" between GPIO 5 and HSPI?

Kai