Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com 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.

Mmc interface with pic 16f877a

Status
Not open for further replies.

BISH

Junior Member level 2
Joined
Nov 3, 2012
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,418
I want to interface MMC card/SD card with PIC16F877A using SPI protocol..i want the basic spi program for pic16f877a...
thanks in advance..
 

Last edited:

i'v gone through the links...but i'm getting error on mmc card usage in proteus....
>"can't create or open card image file.."

this is the error shown in proteus..
 

What is the size of the image and what is the image format?
What format it is (card format FAT16 or FAT32)?

(Sorry I can't help u in this even if u answer for my question because I didn't did these tests with SD/MMC. Still I'm struggling. If u can pls share some codes.
But if someone wants to help u those who worked on it this info will be helpful)
 

Hi,

i had cleared that problem....successfully created the image file..but now the protocol is not executing....i need "spi protocol for mmc card in pic16f series"...
 

can u share the code in Hi-tech C pls.

I'm using 16F877A. I'm trying to log data in XL (.xls or .xlsx) file formate in SD/MMC card.
 

it's ok jayanth. I'll try to convert and let u know.
 

hi all, thanks for ur guidence.....now i'm having the dobt that from where i'll get this function "spi_write(0xff);"....i'm using HITECH PICC TOOLSUITE......
 

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.
 

That is not true. Many people have already interfaced a simple PIC such as the 16F877A with a MMC/SD card. You only need the 512 bytes if your program relies on buffering.
 

Agreed, but its not simple as you may think..

They probably use an external RAM for buffering, or use only a part of the 512 bytes, say 300 bytes...the first technique would make the transfer slow, and the other is wasteful..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top