you cannot use 16F877A mcu for interfacing with MMC as it does not have sufficient RAM to read and write data to the MMC.
MMC or sdcards read and write using 512 Bytes of data, you need to reserve at least 512 bytes of RAM as buffer, maybe you could write data once but cannot edit it as you will need to read the data into the RAM.
Better option is to use an mcu like 18LF2620, this is a 28 pin mcu runs on 3.3V this makes the mcu voltage levels compatible with the MMC, you do not need resistance dividers or level translators for converting from 5V to 3.3V and vice-versa.