vinodstanur
Advanced Member level 3
- Joined
- Oct 31, 2009
- Messages
- 751
- Helped
- 114
- Reputation
- 234
- Reaction score
- 114
- Trophy points
- 1,333
- Location
- Kerala (INDIA)
- Activity points
- 7,054
You've really got a big job ahead of you now. Have fun reading.
Maverick - The Operating System
**broken link removed**
This is FAT32, but it's almost all the same, and has a good explanation of the structure:
Paul's 8051 Code Library: Understanding the FAT32 Filesystem
But i couldn't write to sector. It is showing to register. And i tried HxD hex editor. In that i can open disk but cant edit. So how could i edit disk?Another thing I found useful when I built a MMC/SD interface, was having a MMC/SD card reader and the WinHex program:
WinHex: Hex Editor & Disk Editor, Computer Forensics & Data Recovery Software
When you use WinHex you'll need to use the "physical" drive sector access so that you can see the actual sector 0, etc. Logical sectors are offset.
upand_at_them said:Very nice, Vinod. It sounds very good.
Are you able to read the cluster addresses into an array before playing the song? I haven't tried this myself, but I thought it might be a practical way of doing it. That way you don't have to find the next cluster address while the song is playing, you can simply go to the next array element and then load that cluster from the MMC.
void interrupt timer()
{
if(toggle==1)
{
{CCPR2L=play1[zz];}zz++;if(zz==64){zz=0;toggle=0;}
}
else if(toggle==0)
{
{CCPR2L=play2[zz];}zz++;if(zz==64){zz=0;toggle=1;}
}
TMR0=100;
TMR0IF=0;
}
void read(unsigned long int c)
{
for(i=0;i<=sect_per_clst;i++)
{
long1=512*c;
command(17,long1,0xff);
while(readdata!=0){spi_read();}
while(readdata!=0xfe){spi_read();}
for(g=0;g<4;g++)
{
while(toggle==0);
{for(zx=0;zx<64;zx++){spi_read();play2[zx]=readdata;}}
while(toggle==1);
{for(zx=0;zx<64;zx++){spi_read();play1[zx]=readdata;}}
}
spi_write(0xff);
spi_write(0xff);
c+=1;
}
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?