Arduino icon indicating copy to clipboard operation
Arduino copied to clipboard

SPI Interface Error

Open prasuchit opened this issue 7 years ago • 10 comments
trafficstars

Hi,

I'm having the exact same error "SPI Interface Error" as https://github.com/ArduCAM/Arduino/issues/141

Please find my circuit and code setup:

arducam img_20180615_153751584_burst000_cover img_20180615_153809206

Kindly help.

prasuchit avatar Jun 15 '18 21:06 prasuchit

I have found that adding some delay statements in the setup seems to help with the SPI errors. I have used two delay(3000). This seems to help on startup. yield() statements may also be useful.

BDCowboy avatar Jun 15 '18 22:06 BDCowboy

Thank you @BDCowboy, I shall try that and get back to you asap.

prasuchit avatar Jun 16 '18 17:06 prasuchit

@prasuchit The Mega 2560 board's SPI signal should be connect to ICSP .

UCTRONICS avatar Jun 19 '18 03:06 UCTRONICS

@UCTRONICS , can you please elaborate on that? Are you talking about a connection on the board or something in the program?

prasuchit avatar Jun 19 '18 03:06 prasuchit

@prasuchit Please refer to this schematic diagram icsp_signal_definition You should connect the SPI signal to here .

UCTRONICS avatar Jun 19 '18 05:06 UCTRONICS

Ok, I figured it out, for anyone who is having this trouble in the future: (This was done with Arduino Mega, but I guess the principle is the same for all boards) Connect Vcc and Ground of the arducam board to the +5V and Ground on arduino. The CS pin from the arducam board to any digital pin on arduino and look for "const int SPI_CS = 49;" in the code that you are running and change that to that pin number. The rest of the pins, refer to the image: 8c003032-244a-11e7-99a5-eaff19225612

prasuchit avatar Jun 19 '18 17:06 prasuchit

This worked for me after searching for a really long time. I don't know why arducam wouldn't have a diagram for mega. This worked for me with the 2MP Plus using MEGA

coldeli avatar Oct 11 '20 14:10 coldeli

Thanks for your great suggestions. We will update our diagram for mega as soon as possible.

UCTRONICS avatar Oct 13 '20 00:10 UCTRONICS

Hello, Arducam has update document and add diagram for mega2560+ Arducam MINI Camera https://www.arducam.com/docs/spi-cameras-for-arduino/hardware-connection-for-mega2560/

ArduCAM avatar Oct 13 '20 08:10 ArduCAM