A place to put your YouTube video that is ESP8266 related.

User avatar
By rudi
#7316 hi
happy new year!
i work at spi and mcp23s17 so i make for esp8266 a base for my playing.
here


used:
ESP8266 ESP-12 AI-THINKER
MCP23S17 MICROCHIP
LED Array NO NAME

in this short video i show the new ESP-12 from ai-thinker with adc and all gpio and append in function i will show you here my new firmware with spi and portexpansion by using the MCP23S17

i installed a spi portexpander from microchip MCP23S17 for gives the esp8266 2 full port more.
portA with 8 GPIO as setup here as Output
portB with 8 GPIO reserve

for demontstration i connect from portA 8 GPIO's to a LED array and run
a simple small base firmware for fun.

you can connect from same SPI Expansion device 8 devices
the devices are called by the device adress so you must take for each device a separatly CS.

you can set this with 3 port adress A2 A1 A0

in this demo i set all to GND and the device is device ID : 0

A2=0 A1=0 A0=0 Device ID is : 0
A2=0 A1=0 A0=1 Device ID is : 1
A2=0 A1=1 A0=1 Device ID is : 2
A2=0 A1=1 A0=0 Device ID is : 3
A2=1 A1=0 A0=0 Device ID is : 4
A2=1 A1=0 A0=1 Device ID is : 5
A2=1 A1=1 A0=0 Device ID is : 6
A2=1 A1=1 A0=1 Device ID is : 7


you can connect a LCD to the SPI Expander and any more.
you can connect a second to portB or more..

If you set the ports as Input you can make a 64 switch

with 8 devices you will have many possible's

have fun and thanks for watching!

best wishes

rudi ;-)
User avatar
By rudi
#7516
captain_morgan wrote:Can you show the source of this as an example?
I'm struggling to get SPI working and any functioning example could would probably help.


where is the problem? show your code please.

SPI itself? or with the ESP8266?
have you test spi to an other mcu before?
is your code runing?
then make the same thing with esp8266,
there is no difference to go on,

one thing
esp12 and esp7 are the pin gpio4 and gpio5 swapped
they have be wrong painted to the pcb
gpio4 = gpio5
gpio5 = gpio4
..
rudi