CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Do mmcsd.c and fat.c drivers in Code Library work in Pic24 ?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MarcoGatoSilva



Joined: 20 Oct 2022
Posts: 6
Location: chile

View user's profile Send private message

Do mmcsd.c and fat.c drivers in Code Library work in Pic24 ?
PostPosted: Fri Oct 21, 2022 6:08 am     Reply with quote

Hi,

Has anyone made the libraries work in PIC24?

http://www.ccsinfo.com/forum/viewtopic.php?t=53787
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Oct 22, 2022 5:38 am     Reply with quote

I have never tried but....

1st step is to be SURE to have PROPER logic level translators between PIC24 and the memory cards ! If you're running a 5volt PIC you'll need something.
MarcoGatoSilva



Joined: 20 Oct 2022
Posts: 6
Location: chile

View user's profile Send private message

PostPosted: Sat Oct 22, 2022 9:56 am     Reply with quote

Hi temtronic,

The pic I'm using runs at 3.3v.
Ttelmah



Joined: 11 Mar 2010
Posts: 19195

View user's profile Send private message

PostPosted: Sun Oct 23, 2022 7:08 am     Reply with quote

I've got SD's running on several PIC24's, but use the Brush Electronics
drivers. I think there was a thread a while ago, asking about the standard
drivers. Use the ones in the code library, not the standard ones,and
remember you do need the pull up resistors on the lines or the card
is not guaranteed to wake correctly.
Also remember you do need the really good decoupling capacitor, right
adjacent to the SD card. The surges these produce on the supply, make
this essential.
Remember if the card is modern, it'll almost certainly need an SDHC driver.
Look at this thread:
[url]
http://www.ccsinfo.com/forum/viewtopic.php?t=52490
[/url]
jeremiah



Joined: 20 Jul 2010
Posts: 1314

View user's profile Send private message

PostPosted: Mon Oct 24, 2022 9:47 am     Reply with quote

OP, they don't work out of the box. they need some mods to run on pic24 as the libraries are designed for 8 bit, particularly the fat.c, but the mmc one needed some mods too. I managed to get the mmc one to work after modifying for 16bit and moving the initialization around a bit, but didn't manage to get the fat.c one yet. In the end, I payed the 140 bucks to get the brush electronics driver and used that. It didn't work out of the the box for my particular PIC24 chip as it had a different SPI module, but the driver owner told me what to change and I had it up and running in just a couple of hours.

Also, if you are a current CCS customer with a maintenance agreement active, you can try emailing or calling CCS tech support. They at one point were working on a port of the microchip libraries for this and may have something for you.
benoitstjean



Joined: 30 Oct 2007
Posts: 542
Location: Ottawa, Ontario, Canada

View user's profile Send private message

PostPosted: Tue Oct 25, 2022 11:06 am     Reply with quote

As TTelmah said, the Brush Electronics driver is perfect. Been using it on the PIC24EP512GP806 for 6+ years and it works as expected.... And for the price, you avoid all the trouble to write your own (at your salary, whatever it may be, it's probably worth it)....

Good luck
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group