Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Why MMC reading speed is less compared to writing speed?

Not open for further replies.


Advanced Member level 3
Oct 31, 2009
Reaction score
Trophy points
Kerala (INDIA)
Activity points
Why the mmc reading speed is less compared to writing speed? I tried to write adc outputs to MMC in real time using a PIC16F877A. ADC input was the head phone output of my PC. I played a song in pc and recorded it to MMC via above mentioned method...
Now when i read the MMC , i could not hear the song(PWM output) due to the low reading speed.
So what i did is, i had introduced a 1ms delay in every byte write to MMC. Then i could just hear the recorded song even though its quality very very bad...So i understood that writing speed is very high compared to reading speed and if i introduce a delay of 1ms in writing loop, the speed is equalized . But its a big delay and it reduces the audio quality...

Now i think the time gap between each byte read is more compared to byte write..
Why it is like this?
Last edited:

I think you're going to run into a problem because of the limited RAM in that PIC. Ideally you'd want to be reading one sector (512 byes) while a routine is PWM'ing the previous sector.

Also, there's probably the same issue with writing. You'd want to be writing the cached sector to the MMC while sampling the ADC.

Are you running the PIC at 20MHz and using the built-in SPI peripheral? And are you sending the data to the MMC as fast as you can?...because the built-in SPI allows setting the speed.

Vinod, are you trying to write and read at the same time? I assumed you were recording the full audio to MMC, and then read it back.

My problem is solved...i unknowingly introduced a delay of 1ms in spi read. Now i removed it and i equalized the reading and writing time...Now the audio quality increased increased a lot!!!
Yes i am using the inbuild SPI of 877a. Actually i am not using the RAM as a buffer and in this case i cant. So i am reading the MMC and after every byte read i shift it to PWM register. Similarly in case of writing also...

Any way ones again thanks @upand_at_them for providing an excellent link which describes the writing and reading procedure of MMC.
Last edited:

Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to