- Sun Jun 14, 2015 4:10 am
#20412
I see . So you want to get it going on an ESP8266 .
I'd have a go but my only card readers are on ethernet boards that run on 5 V so I'd have to find a way to get at them or get a separate card reader device.
Looking at SD libraries you need SPI . Looking at SPI examples
for Arduino you need the following
* CS - to digital pin 10 (SS pin)-This must be someone elses board
* SDI - to digital pin 11 (MOSI pin)
* CLK - to digital pin 13 (SCK pin)
The SD card examples run OK on the ethernet shield with
* SD card attached to SPI bus as follows:
** MOSI - pin 11
** MISO - pin 12
** CLK - pin 13
** CS - pin 4
So thats a bit confusing but pin 4 is for the ethernet board I have
The ESP does SPI so below is what's on ESP8266/Arduino
on ESP MISI and MISO are on 12 and 13 I think according to wiki
so that will have to be sorted out.
SPI
SPI library supports the entire Arduino SPI API including transactions, including setting phase (CPHA). Setting the Clock polarity (CPOL) is not supported, yet (SPI_MODE2 and SPI_MODE3 not working).
So its a matter of connecting up the device and go to it. I would start by getting something off the card to the serial terminal then add wifi
I did a search on SDcard above and a few came up .This one was interesting
viewtopic.php?f=34&t=2496&p=14563&hilit=SDCard#p14563Another I dont understand yet
gwizz wrote:You also should make sure GPIO2 is floating or explicitly tied high to make sure you only go between the flash programming mode and normal mode, without triggering SDcard boot mode.
I think that means SDIO mode which seems to be entered by pulling GPIO15 (MTDO) pin high and booting. I think that is a Slave mode for SPI maybe.
This statement found on the Olimex site might explain that
" ESP8266 has three modes of operation: SDIO mode, UART mode and FLASH mode. By default the board is configured for FLASH mode operation."
download/file.php?id=33&t=1Here is a mention of code for spi for the ESP8266
http://bbs.espressif.com/viewtopic.php? ... 7fdfd00706
Last edited by tytower on Sun Jun 14, 2015 4:00 pm, edited 5 times in total.