Help 89c5131a with mmc card interface (SPI)!
Wed May 06 2009, 05:00 pm
the curious is that this functions are different depending if you are looking the pdf or the tutorial in this page , is it some kind of error in the web page?
Wed May 06 2009, 09:14 pm
Ha, yeah you are right! The webpage and the PDF file are different...
I recommend you stick with the PDF file...
I recommend you stick with the PDF file...
Thu May 07 2009, 11:47 am
pdf file is available to download check the link at the bottom of MMC tutorial index page. If you face any kind of problem do post here..
Thu May 07 2009, 02:50 pm
Another question , sorry for having so many questions , but i'm starting to programme this way , and i have a lot of questions . Well , the question is that in page 9 of the pdf ( sending a command to the SD Card ) , appears this line :
/* send CRC */
SPI_Byte((ThisCommand == CMD_GO_IDLE_STATE)? 0x95:0xFF);
Is the question mark correct ? THanks!
/* send CRC */
SPI_Byte((ThisCommand == CMD_GO_IDLE_STATE)? 0x95:0xFF);
Is the question mark correct ? THanks!
Thu May 07 2009, 03:26 pm
and another question.... the delay function that you use how exactly can you know the time of milisecons that it takes? Isn't that possible to know in C ? Thanks!
Thu May 07 2009, 07:06 pm
answering one by one
format is (condition) ? result if true : result if false
Now second question:
there is exactly no way to calculate delay using C. problem is different optimization produces different codes which produce different delays.. so there is just rough way to check put break points during call and just after the call to delay function. get the difference in time. of course you have to use a simulator
a = (x > y) ? x : y //the above is a standard style of writing if(x> y){ a = x; } else { a = y; }
format is (condition) ? result if true : result if false
Now second question:
there is exactly no way to calculate delay using C. problem is different optimization produces different codes which produce different delays.. so there is just rough way to check put break points during call and just after the call to delay function. get the difference in time. of course you have to use a simulator
labarbacue like this.
Fri May 08 2009, 04:01 pm
Thanks for answering ! now i understand a bit more . But i have another question about the turorial , my question is about the time function of the MMD card .... how can i write a time function if i dont have a real time clock? Is there any possibility to just fake the date ? The problem is that i dont really understand the function so i can't fake it . Thanks!!
Fri May 08 2009, 05:01 pm
another question is , when i compile with keil the following errors appears (they are not the only , but i don't know how to solve this , becaause it affects a library that we don't touch in the tutorial the tff . The error is the following :
compiling tff.c...
TFF.C(176): warning C206: 'LD_WORD': missing function-prototype
TFF.C(176): error C267: 'LD_WORD': requires ANSI-style prototype
Thank you very much for your help!!
compiling tff.c...
TFF.C(176): warning C206: 'LD_WORD': missing function-prototype
TFF.C(176): error C267: 'LD_WORD': requires ANSI-style prototype
Thank you very much for your help!!
Sat May 09 2009, 12:05 pm
for time function you can just return a fix time as you don't have RTC.
I will tell Dave to provide whole project in a zip will be helpful.
I will tell Dave to provide whole project in a zip will be helpful.
Sat May 09 2009, 02:21 pm
Hi ! Thank you for your response ! . Yeah it would be great to have the executable , but do you know another solution while Dave doesn't puts the download (becuase i'm a bit in a hurry these days , because it's a project that i have to present in a few days ....) . Only if possible , but thank you anyway!
Powered by e107 Forum System