Electrical – SPI interface, ESP 07 connect to MCP 3008

adcesp8266sensorspi

I'm trying to connect an MCP3008 to an ESP07 through the SPI interface. (A bidirectional level 5V – 3.3V is used in between but it doesn't matter)

However this is not working because:
The CS pin is the pin 15 of ESP07 which needs to be GND otherwise it doesn't boot.
The MCP3008 CS is on HIGH.

I'm trying to connect several analogue sensors to the ESP. Is there an workaround? What is to be done? Am I missing something?
enter image description here
enter image description here

Best Answer

The MCP3008 CS is on HIGH

This statement does not make sense. CS pin of MCP3008 is an input. It cannot be "on HIGH". It can only be at whatever level you connect it to.

The GPIO15 works as HSPI_CS pin only in HSPI mode, i.e. with ESP8266 as slave.

In your schematics ESP8266 is a master. You can use pretty much any pin to control MCP3008 CS. Normally GPIO0 is used for this.

UPDATE

If your board has external flash chip then SPI is used for that. In this case you can try using HSPI interface. Connect GPIO15 to GND with 10k pull-down resistor. This will ensure correct boot. After boot you can initialize and use HSPI in master mode.