pepillo
Advanced Member level 4
I am building an MP3 player with MMC/SD card interface to a PIC18F4550 through SPI, but I cannot get any response from the card, here are the details, anyone can help me?
- When I read from the card, the MISO line is all the time high or "1". I expect to receive an R1 command or "0x01" but I see no movement on the line.
- I am implementing the SPI read and write routines as "bit banging", with data valid on the rising edge of the clock
- The card and the microcontroller are powered at 3.3V
- There are no other chips using SPI on the bus
- The command initialization sequence is correct (the first command I send is CMD0, including staffing zeroes and the corresponding precalculated CRC).
- The socket is for MMC cards (has 2 pins less at the edges) and the card is a microSD, but this shouldn't affect no?
- The card is a microSD in an adapter to SD, instead of a proper SD, this shouldn't be a problem either?
- Do I need to send the SPI commands at an specific frequency or bitrate? The PIC is running off a 20MHz oscillator and the SPI routine is bit-banged so it should be relatively slow but this should help.
- The card is not broken as I can read and write using on my laptop's MMC/SD card reader
- Any consideration regarding data polarity?
I have followed the directions given by and the SD card Association.
I have no idea what else I can try... Anyone who has worked in a similar project can assist? Thx
- When I read from the card, the MISO line is all the time high or "1". I expect to receive an R1 command or "0x01" but I see no movement on the line.
- I am implementing the SPI read and write routines as "bit banging", with data valid on the rising edge of the clock
- The card and the microcontroller are powered at 3.3V
- There are no other chips using SPI on the bus
- The command initialization sequence is correct (the first command I send is CMD0, including staffing zeroes and the corresponding precalculated CRC).
- The socket is for MMC cards (has 2 pins less at the edges) and the card is a microSD, but this shouldn't affect no?
- The card is a microSD in an adapter to SD, instead of a proper SD, this shouldn't be a problem either?
- Do I need to send the SPI commands at an specific frequency or bitrate? The PIC is running off a 20MHz oscillator and the SPI routine is bit-banged so it should be relatively slow but this should help.
- The card is not broken as I can read and write using on my laptop's MMC/SD card reader
- Any consideration regarding data polarity?
I have followed the directions given by and the SD card Association.
I have no idea what else I can try... Anyone who has worked in a similar project can assist? Thx