-->
Page 1 of 1

Can any one tell me what are the spi pins of the esp8266 IOT

PostPosted: Sat Aug 20, 2016 11:42 am
by Ghassan Yusuf
Dear Friends

i have bought an IOT board and wanted to use the spi pins of the e12

but i cant see any SDA pin nor SCL

i can see MOSI and MISO, RST, CO, MO, EN, SK, TX, RX AC, A0

so can any one tell me which is the SDA, SCK, MOSI, MISO, RST

Image

Re: Can any one tell me what are the spi pins of the esp8266

PostPosted: Sat Aug 20, 2016 12:37 pm
by martinayotte
SDA/SCL pins are I2C pins (not SPI), and since the I2C is bit-banging done in software, it can use any GPIOs simply by providing their number in Wire.begin(0, 2), for example, it would be GPIO0/GPIO2.

Re: Can any one tell me what are the spi pins of the esp8266

PostPosted: Sat Aug 20, 2016 4:49 pm
by Ghassan Yusuf
martinayotte wrote:SDA/SCL pins are I2C pins (not SPI), and since the I2C is bit-banging done in software, it can use any GPIOs simply by providing their number in Wire.begin(0, 2), for example, it would be GPIO0/GPIO2.


dear friend i am asking this because i am using MFRC522 rfid module
so i don't know really where to connect these.

Image

Re: Can any one tell me what are the spi pins of the esp8266

PostPosted: Sun Aug 21, 2016 7:56 am
by martinayotte
Ok ! The MFR522 can be connected in 3 modes : I2C, UART or SPI modes.
Some of the pins are shared between mode, like like the SDA of I2C mode is named SS in SPI mode, as well SCL of I2C mode is named MISO in SPI mode.
The selection of the mode depends on I2C pins 1 of the chip itself. Maybe some board provide access to it, but most are not providing it, therefore probably hard-wired into SPI mode.

For SPI mode, someone already port a library for ESP8266 :
https://github.com/Jorgen-VikingGod/ESP8266-MFRC522