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]
View all questions in Keil forum