See code in last thread
Author Andy Neil Posted 12-Jun-2007 05:39 Toolset C51 Irrelecant code! Andy Neil Author: jamil rafar Posted: 12-Jun-2007 04:54 "what is wrong with this code plese"
Apart from the formatting, It appears to have nothing whatsoever with the topic of this thread!
Please start a new thread for a new topic!
"See code in last thread"
And how is anyone else supposed to know what thread you're referring to?!
You need to post your code here in your new thread!
You also need to explain: * What toolset & versions are you using?
* What specific chips are you using?
* What is the code supposed to do?
* What does it actually do?
* What debugging have you done so far to account for the difference?
I answer your quenstion 1 I use c version 12.00.8804 2 I dont understand your question 3 Code is not working 4 I want the code to work
unsigned char mmc_init(void) { unsigned int i; unsigned char response; MMC_CS_TRIS=0; MMC_VCC_KEY_TRIS=0; //out MMC_VCC_KEY=0; //MMC power ON MMC_DOUT_TRIS=1; //input MMC_DOUT_TRIS = 1; // dout as input. MMC_CS_TRIS = 0; // CS as output. MMC_CLK_TRIS = 0; // CLK as output. MMC_DI_TRIS = 0; // DI as output MMC_CLK = 1; mmc_powerup(); mmc_unselect(); for(i = 0; i < 10; ++i) mmc_read_write(0xFF); /* address card */ mmc_select(); /* reset card */ for(i = 0; ; ++i) { response = mmc_send_command_r1(CMD_GO_IDLE_STATE, 0); if(response == 1) break; if(i == 0x1ff) { mmc_unselect(); return 0; } } /* wait for card to get ready */ for(i = 0; ; ++i) { response = mmc_send_command_r1(CMD_SEND_OP_COND, 0); if(!(response & 1)) break; if(i == 0x7fff) { mmc_unselect(); return 0; } } /* set block size to 512 bytes */ if(mmc_send_command_r1(CMD_SET_
You did not answer all questions Andy asked.
Your posted code is not complete, so what use is it to look at it?
I answerde all the question that I understood so what else can I do???
"I answerde all the question that I understood so what else can I do???"
Hmm, let's see now:
Andy: * What toolset & versions are you using? Jamil: I use c version 12.00.8804
What c? C51, CARM, C251, etc.?
Andy: * What specific chips are you using? Jamil: I dont understand your question
Could be he's asking which microcontroller, but we'll wait for Andy to clear up this complex question.
Andy: * What is the code supposed to do? Jamil: Code is not working
You may be done then! If the code is supposed to "not work" and it doesn't, then it satisfies your requirements.
Andy: * What does it actually do? Jamil: I want the code to work
Then why did you answer "not working" for what it is supposed to do?
Andy: * What debugging have you done so far to account for the difference? Jamil: [silence]
"I answerde all the question that I understood"
They weren't difficult questions! If you really don't know what chips you are using, you certainly won't get very far with this!
Let's look again at the questions, and your answers:
Q: What toolset & versions are you using? A: I use c version 12.00.8804
'C' is just a language; The "Toolset" refers to the compiler, linker, etc that you use for your development.
When you made your post, you had to choose a toolset under "MCU (Architecture)"
You chose "Non-Specific (Generic)"; that is incorrect - you must be using one of the four specific Keil toolsets. Which is it?
It must be one of these: http://www.keil.com/product/
Q: What specific chips are you using? A: I dont understand your question
Each of Keil's toolsets covers a family of processors. To be able to answer questions about specific code, people need to know which particular member of the family you are using; ie, which specific chip. eg, there are many hundreds of different chips in the 8051 family!
It is also important to know about any other specific chips that are central to the understanding of your system.
Q: What is the code supposed to do? A: Code is not working
Now there's a logical contradiction!
If your code is supposed to "not work" and it does, in fact, not work - then it is actually working according to that requirement, isn't it!
Q: What does it actually do? A: I want the code to work
Well, doesn't everyone?!
Q: What debugging have you done so far to account for the difference? A: (none)
So you haven't even bother to try any debugging at all, then?
post a link to a website that give away crystal balls.
Jamil: If you expect anyone to answer by psychic powers you should ask at www.psychichhotline.com, not here.
You are frustrated that you do not get any answers, but refuse (there can be no other reason) to help those willing to help you. If you will not give the answers needed to determine the cause of your problem, nobody can help you.
Erik
re 'refuse' Q: What specific chips are you using? A: I dont understand your question
View all questions in Keil forum