AT89C52 interface SD Memory Card
Thu Dec 25 2008, 10:59 pm
Dear Fren,
I will try to make it work. If the thing is work i will let you know.
Ya, may i know how to drive the data from C52 to MMC/SD? The MMC/SD bus signal max voltage is only 3.6V.
Thank you.
I will try to make it work. If the thing is work i will let you know.
Ya, may i know how to drive the data from C52 to MMC/SD? The MMC/SD bus signal max voltage is only 3.6V.
Thank you.
Sun Dec 28 2008, 01:47 am
sending/receiving data both ok?
i mean sector reading/writing. well try to analyse the FAT code u downloaded from chan's website. you might need more ram i guess.
i mean sector reading/writing. well try to analyse the FAT code u downloaded from chan's website. you might need more ram i guess.
Sun Dec 28 2008, 09:25 am
Dear Fren,
Yup, sending and receiving data to sector are ok.
If using chan's FAT code just need 1kRAM. I already wire up external ram for my testing board.
I have download the coding but don't know how to start. Please can you guide me?
Thank you,..
Yup, sending and receiving data to sector are ok.
If using chan's FAT code just need 1kRAM. I already wire up external ram for my testing board.
I have download the coding but don't know how to start. Please can you guide me?
Thank you,..
[ Edited Sun Dec 28 2008, 09:57 am ]
Sun Dec 28 2008, 09:55 pm
sure.. i have downloaded the code, rev 0.06
I need to check the code for its interfacing.. you may need RTC too.. but let me check
I need to check the code for its interfacing.. you may need RTC too.. but let me check
Sun Dec 28 2008, 11:07 pm
Dear Fren,
Thank you very much,..
Ya, the latest version is 0.06. If we need RTC on testing, is ok..I will ready for that. On the coding part i just add in some the basic part in diskio.c. I have ready fren...
Thank you very much,..
Ya, the latest version is 0.06. If we need RTC on testing, is ok..I will ready for that. On the coding part i just add in some the basic part in diskio.c. I have ready fren...
Fri Jan 02 2009, 09:39 am
Dear Fren,
May i know what's the status now? I still waiting your reply.
Thank you.
May i know what's the status now? I still waiting your reply.
Thank you.
Sat Jan 03 2009, 01:03 am
Sorry my PC got crashed i got it installed fully yest. I just looked at main.c file of AVR code, and in that code, chan has shown the complete usage and i think we just need to test this FAT module isn't it?
so we will first try with reading directory entry from root itself. here is one case i got from main file. We just need to find out what minimum needed for this FATFS to work.
I think we also need to edit mmc.c driver file according to your code keeping the same name of functions. So check that file carefully. I think your first step to FATFS is this only, get your mmc code work with chan's library.
so we will first try with reading directory entry from root itself. here is one case i got from main file. We just need to find out what minimum needed for this FATFS to work.
case 'l' : /* fl [<path> ] - Directory listing */ res = f_opendir(&dir, ptr); if (res) { put_rc(res); break; } p1 = s1 = s2 = 0; for(;;) { res = f_readdir(&dir, &finfo); if ((res != FR_OK) || !finfo.fname[0]) break; if (finfo.fattrib & AM_DIR) { s2++; } else { s1++; p1 += finfo.fsize; } xprintf(PSTR("%c%c%c%c%c %u/%02u/%02u %02u:%02u %9lu %s\n"), (finfo.fattrib & AM_DIR) ? 'D' : '-', (finfo.fattrib & AM_RDO) ? 'R' : '-', (finfo.fattrib & AM_HID) ? 'H' : '-', (finfo.fattrib & AM_SYS) ? 'S' : '-', (finfo.fattrib & AM_ARC) ? 'A' : '-', (finfo.fdate > > 9) + 1980, (finfo.fdate > > 5) & 15, finfo.fdate & 31, (finfo.ftime > > 11), (finfo.ftime > > 5) & 63, finfo.fsize, &(finfo.fname[0])); } xprintf(PSTR("%4u File(s),%10lu bytes total\n%4u Dir(s)"), s1, p1, s2); if (f_getfree(ptr, &p1, &fs) == FR_OK) xprintf(PSTR(", %10luK bytes free\n"), p1 * fs-> csize / 2); break;
I think we also need to edit mmc.c driver file according to your code keeping the same name of functions. So check that file carefully. I think your first step to FATFS is this only, get your mmc code work with chan's library.
Sat Jan 03 2009, 09:28 am
Dear Fren,
Hope your there everything is fine.
Thank for your guid line..but i still very blur when study the code...still don't know where to start and do the testing. The coding look very complicated and theirs mmc code very much difference then us .
Thank you,.
Hope your there everything is fine.
Thank for your guid line..but i still very blur when study the code...still don't know where to start and do the testing. The coding look very complicated and theirs mmc code very much difference then us .
Thank you,.
Powered by e107 Forum System