How to start a read and write program to sd card with dsPIC 33 microcontroller

Thread Starter

Jay@009

Joined May 27, 2016
3
Hi all,

My name is Jay. I am new to this microcontroller projects. As a part of my project I have to program the dsPIC 33 microcontroller to read and write the data to SD card. I don't have any idea how to start and all. Can anyone help me out???

Thanks in advance.
 

AlbertHall

Joined Jun 4, 2014
12,346
Have you looked at and understood how the interface to the SD cards works. After that have you looked at the data sheet for the dsPIC33 and considered which features of that controller might be useful for communicating with an SD card.

If you look around on www you will sites with examples of Microchip controllers interfaced to SD cards.
 

Thread Starter

Jay@009

Joined May 27, 2016
3
Hi AlbertHall, first of all thanks for your reply.
I gone through the few examples of how to interface sd cards. As I mentioned earlier I am new to this field so I thought if I get some more information and few examples of code to read and write to sd card will be a great help for me. That is the reason I posted here.
 

ErnieM

Joined Apr 24, 2011
8,377
Hi Jay, welcome to the forums!

You are starting this the right way, looking for examples. It would take years to redo this on your own.

The Microchip Applications Library (MAL) has such examples for many devices. Sorry but I am on my phone today so I can't look up any details but they have done the heavy lifting for you.

Go check the Microchip site and download their libs, and compiler too if you have not as of yet.
 

takao21203

Joined Apr 28, 2012
3,702
MAL is old technology.

You can try Japanese petit fs it's middleware you only need to adapt a small amount of code.

The IO functions need to be adapted. Software serial port is just a few lines. For hardware spi you need to study the datasheet.

Or you can try mplabx Harmony. And the device configurator.

They need some learning efforts so petit fs could be easier and faster.
 

takao21203

Joined Apr 28, 2012
3,702
So Jay, have you installed latest MPLABX, XC16 compiler, added the configurator plug-in?

Usually you need a small TFT as well. These are not difficult to adapt all kinds used for Arduino. But you need to understand io port properly.

There's quite a few prerequisites and if you don't have experience with embedded C it can be daunting to put all together.
Hi all,

My name is Jay. I am new to this microcontroller projects. As a part of my project I have to program the dsPIC 33 microcontroller to read and write the data to SD card. I don't have any idea how to start and all. Can anyone help me out???

Thanks in advance.
 

JohnInTX

Joined Jun 26, 2012
4,787
I agree with @ErnieM . If you are just starting out, use the Microchip tools and libraries unless there is a compelling reason to try something else. Many of us are familiar with Microchip's stuff and you can also get further help form them. Not so much with 3rd party stuff. I'm not saying you can't do it but 3rd party stuff adds another dimension that may complicate more than help.

Just my .03
 

Thread Starter

Jay@009

Joined May 27, 2016
3
Hi, thanks to one and all for the way you are responding to my query. I installed MPLAB X with XC16 compiler. I know C programming but I am not aware of embedded C, but I will start reading what is required to interface SD card with micro controller.

Once again thanks to one and all.
 

ErnieM

Joined Apr 24, 2011
8,377
The actual name now is the Microchip Library for Applications (MLA). Here it is: http://www.microchip.com/mplab/microchip-libraries-for-applications

When you get that look towards the C:\microchip\mla\v2016_04_27\apps\fileio folders, I believe this is the closest sample you will find.

What I didn't find was documentation: what development kit this is for, what the code does... that good stuff. I'm sure it exists somewhere, perhaps you may be better served by asking on Microchip's own forums.
 
Top