Go Down

Topic: Multiple SPI devices connected to Leonardo (Arducam) (Read 76 times) previous topic - next topic

jockwr

Hi,

I'm having issues when I have two SPI devices connected to my leonardo at the same time.

What I'm trying to do:

I am trying to get an arducam to take photos and save them to an sd card using an example provided in the arducam library.

What hardware am I using?

- Arduino Leonardo
- Arducam mini OV5642_MINI_5MP_PLUS
- Micro Sd card adapter Catalex v1.0 11/01/2013 with 16GB toshiba micro sd card

The problem:

When I run the "ArduCAM_Mini_5MP_Plus_Multi_Capture2SD" example provided in the arducam library, I receive the following error: "SPI interface error!".

When I take power away from the SD card adapter (By pulling the Vcc cable out), the message goes away and the following message appears: "SPI interface OK"

At this stage, the sketch goes a few more steps before getting to a message saying the sd card not found (as expected, I pulled the vcc cable out from the sd card adapter).

I've double and tripple checked I have the cables going to the correct SPI pins

A few notes:
a. The sd card adapter works when the camera is not connected, I can write files to it (I've been logging months of data on it with the leonardo).
b. the camera works when the sd card is not connected - I used the "ArduCAM_Mini_5MP_OV5642_Plus_Functions" example, again provided in the arducam library to test this.
c. I've tried powering it by both the leonardo 5v power supply and an external power supply.
d. I've tried two separate breadboards

A diagram of my wiring is attached.

Any help is much appreciated
Thanks

SurferTim

The Catalex SD card module has two versions. One is compatible with other SPI devices, and the other is not. The difference is the state of the MISO line. In one module, the MISO line is not released by the CS input. This design flaw makes it incompatible with any other SPI devices,

jockwr

Ah damn. Thanks for the answer.

Do you happen to know which version allows multiple SPI connections?

Go Up