Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

mmc command unsupported " "[MMC CMD] command unsup

Status
Not open for further replies.

hedisurfer

Newbie level 3
Joined
Nov 10, 2009
Messages
3
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Location
France
Activity points
1,309
mmc command unsupported

Hi everyone,

I'm trying these days to read a mmc card with the library of mikroC v3.2 of mmc so I used the function mmc_Fat_Init() but it doesn't work and in Proteus I obtain the message: "[MMC CMD] command unsupported".
I suppose that wires are well connected.

Here is the link for my schematic:

https://img12.imageshack.us/i/schematicp.jpg/


And here is my code:

// Glcd module connections
char GLCD_DataPort at PORTD;

sbit GLCD_CS1 at RB0_bit;
sbit GLCD_CS2 at RB1_bit;
sbit GLCD_RS at RB2_bit;
sbit GLCD_RW at RB3_bit;
sbit GLCD_EN at RB4_bit;
sbit GLCD_RST at RB5_bit;

sbit GLCD_CS1_Direction at TRISB0_bit;
sbit GLCD_CS2_Direction at TRISB1_bit;
sbit GLCD_RS_Direction at TRISB2_bit;
sbit GLCD_RW_Direction at TRISB3_bit;
sbit GLCD_EN_Direction at TRISB4_bit;
sbit GLCD_RST_Direction at TRISB5_bit;
// End Glcd module connections

// MMC module connections
sbit Mmc_Chip_Select at RC2_bit;
sbit Mmc_Chip_Select_Direction at TRISC2_bit;
// eof MMC module connections

// Variables for MMC routines
char buffer[512]= "";
char character;
unsigned long i, size;

void delay2S(){ // 2 seconds delay function
Delay_ms(2000);
}

void main() {

ADCON1 |= 0x0F; // Configure AN pins as digital
//CMCON |= 7; // Turn off comparators

Glcd_Init(); // Initialize GLCD
Glcd_Fill(0x00); // Clear GLCD

// Initialize SPI1 module
SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV64, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_LOW, _SPI_LOW_2_HIGH);
Delay_ms(250);

if(!Mmc_Init())
{
SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV4, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_LOW, _SPI_LOW_2_HIGH);
}

Glcd_Set_Font(Character8x7, 8, 7, 32);// Choose font, see __Lib_GLCDFonts.c in Uses folder

while(1) {

Glcd_Write_Text(buffer, 1, 7, 2); // Write string

}
}


Hope I'll find help here :)[/img]
 

Re: mmc command unsupported

I am not well aware of MMC cards or proteus , but after reading your question just gone for reading about that in the internet , and found a site where they have tried to do the same thing .

I am sending the site address to you , wishing that it can help you ....

https://www.sonsivri.com/forum/index.php?topic=1693.0 :D
 

Re: mmc command unsupported

Thanks for your reply. The pic of this circuit is coded in CCS while me I want to code it on mikroC. I saw many circuits like that but they never had my error :/
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top