Discussion in "8051 Discussion Forum" started by    Help    Dec 8, 2008.
Thu Dec 25 2008, 10:59 pm
#31
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.
Sat Dec 27 2008, 01:47 am
#32
use voltage divider for data & control lines
 empty like this.
Sat Dec 27 2008, 08:41 am
#33
Dear Fren,

I'm using transister to drive the data and control line. It work OK.

Now the testing board is working OK. May i know what's the next step to do the FAT system?

Please advice...
Thank you.


[ Edited Sat Dec 27 2008, 02:23 pm ]
 empty like this.
Sun Dec 28 2008, 01:47 am
#34
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.
Sun Dec 28 2008, 09:25 am
#35
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,..




[ Edited Sun Dec 28 2008, 09:57 am ]
Sun Dec 28 2008, 09:55 pm
#36
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
Sun Dec 28 2008, 11:07 pm
#37
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...
Fri Jan 02 2009, 09:39 am
#38
Dear Fren,

May i know what's the status now? I still waiting your reply.

Thank you.
Sat Jan 03 2009, 01:03 am
#39
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.
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
#40
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,.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am
Robertphype
Sat Apr 27 2024, 12:23 am