1

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)?

Peter Mortensen
  • 1,676
  • 3
  • 17
  • 23
user34282
  • 11
  • 3

2 Answers2

1

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.

Ricardo
  • 6,134
  • 19
  • 52
  • 85
Pete Kirkham
  • 1,976
  • 12
  • 16
  • 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. – user34282 Dec 17 '13 at 14:10
0

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.

Butzke
  • 1,012
  • 12
  • 27