Go Down

Topic: Sd card and Sanguino (Read 1 time) previous topic - next topic

Leonidas

Hie everyone, i am working on a pretty big project that requires the use of an sd card, i bought the sd breakout board from cutedigi.com

http://www.cutedigi.com/product_info.php?products_id=4435

I want to connect it to my sanguino, i know that:

mosi - 5
miso - 6
sck - 7

but im not sure how to hook up the sd card,and another question is if i absolutely have to hook it up to the miso mosi sck pins? i can't hook it up to anything else? because i already used those pins, but i guess i could change them. any help guys? please and thank you! =)

PaulS

Code: [Select]
but im not sure how to hook up the sd card
You know which are the SPI pins (MOSI, MISO, SCK). Connect those on the SD card to the corresponding pins on the Sanguino.

Select a pin on the Sanguino to use as a SS (slave select) pin, and connect that to the SD card.

Then, connect ground and VCC (to 3.3V).

Quote
if i absolutely have to hook it up to the miso mosi sck pins?

Only if you want it to work.

Quote
i can't hook it up to anything else?

Not if you want it to work.


Leonidas

ok thanks, and i also have an mp3 decoder... it also takes miso mosi and sck... does that mean that i can't hook both up at the same time? :(

frank26080115


ok thanks, and i also have an mp3 decoder... it also takes miso mosi and sck... does that mean that i can't hook both up at the same time? :(


The entire point of having slave select or chip select pins on a SPI bus is so you can have multiple devices on one bus. The answer is: yes you can.

Also
Quote from: PaulS

Quote
i can't hook it up to anything else?

Not if you want it to work.


This is not entirely true, you can bit bang SPI if you are desperate.

-------------

Please see this project, http://www.instructables.com/id/Music-Playing-Alarm-Clock/ , the SPI bus is connected to both a SD card and a MP3 decoder, it is probably the perfect example of what you are trying to do
Freelance engineer, consultant, contractor. Graduated from UW in 2013.

Leonidas

oh ok, well i have an sd card and an mp3 decoder, what would be the best way to hook up both the spi's to the single arduino? or what is the usual method?

Leonidas

#5
Mar 31, 2011, 03:37 am Last Edit: Mar 31, 2011, 03:42 am by Leonidas Reason: 1
i guess i didnt, but thank you very much for bringing it to my attention =) that helps alot

Go Up