1
\$\begingroup\$

I am attempting to connect a microSD breakout board to a LilyPad Arduino USB. The microSD board has previously been connected to an Arduino Duemilanove.

In the Duemilanove setup, the following connections were made successfully:

(SD) -> Duemilanove

  • (CS) -> Pin 10 (SS)
  • (DI) -> Pin 11 (MOSI)
  • (DO) -> Pin 12 (MISO)
  • (CLK) -> Pin 13 (SCK)

Plus 5 V and ground.

I have attempted to replicate this with the LilyPad USB, following the schematic.

(SD) -> LilyPad USB

  • (CS) -> Pin D17 (SS)
  • (DI) -> Pin D16 (MOSI)
  • (DO) -> Pin D14 (MISO)
  • (CLK) -> Pin D15 (SCK)

However, the problem is, I cannot locate this digital pins physically on the LilyPad USB. I believe they are the six pins in a rectangle formation next to analogue port A2, but I do not know which are which. Following the forum post LilyPad USB v1.1 and SPI, I have tried that combination, but I have not had any results.

What is the order of the six pins? Also, where is the SS pin (that doesn't seem to be included there)?

\$\endgroup\$
1
\$\begingroup\$

The programming header will have MISO, MOSI and SCK. Use a multimeter to check continuity from the header to the Atmega32u4 pins.

The mapping between Atmega32u4 and Arduino pin numbers is here. I don't see a digital pin 17 in the mapping, so use a digital pin which exists and change the library. The schematic shows A2, A3, A4, A5, D2, D3, D9, D10 and D11 as the 9 IO pins on the exterior of the pcb, or you could bodge wire directly to another pin of the MCU.

\$\endgroup\$
  • \$\begingroup\$ Thank you, this has worked, I used D2 as the CS pin. Maybe I will connect it to the MCU in the future, but for now this works. \$\endgroup\$ – user34282 Dec 17 '13 at 14:10
0
\$\begingroup\$

You were right with the pinout.

I've looked at the Eagle files of Lilypad PCB and the image that has in the forum its right, the pinout its like this:

enter image description here

All the pins are correct and really connected at the MCU. Maybe have some problem in the program, some port definition, or something like this.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.