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.

SD CARD: Write/Read multiple blocks to SD card

Status
Not open for further replies.

karan123

Member level 3
Joined
Feb 2, 2009
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,710
Hello,


I am using MDD Library for PIC24F interfacing with SD CARD 2GB ScanDisk.
I have not required any file system (like FAT).
So I have filtered out Simple MDD routine for using SDCARD as simple Memory as below:

char sendBuffer[] = "CHECK";
char sendBuffer1[] = "123456";
char recbuffer1[6];

char sendBuffer2[] = "ABCDEF";
char recbuffer2[6];
char send2[] = "2";
char receiveBuffer[50];

while (!MDD_MediaDetect());
MDD_InitIO(); // For Intilize Only Low Level Routine without FAT
MDD_SDSPI_InitIO();
MDD_SDSPI_MediaInitialize();


MDD_SDSPI_SectorWrite(0,(BYTE*)sendBuffer1,TRUE);


MDD_SDSPI_SectorRead(0,(BYTE*)recbuffer1);

UART2PrintString(recbuffer1);

MDD_SDSPI_SectorWrite(10,(BYTE*)sendBuffer2,TRUE);



MDD_SDSPI_SectorRead(10,(BYTE*)recbuffer2);

UART2PrintString(recbuffer2);
Nop();
Nop();

//---------------------------------------


t's Good that I can Write and Read sector (only one sector either 0 or 10) alternatively
by putting comment in program,.
But I can't read two sectors one by one in same program
Or You can say Write/Read multiple blocks to SD card


Any Suggestion For That?
i m testing on PC Hyper terminal ??



--
KR
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top