View previous topic :: View next topic |
Author |
Message |
MarcoGatoSilva
Joined: 20 Oct 2022 Posts: 6 Location: chile
|
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Sat Oct 22, 2022 5:38 am |
|
|
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
|
|
Posted: Sat Oct 22, 2022 9:56 am |
|
|
Hi temtronic,
The pic I'm using runs at 3.3v. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19495
|
|
Posted: Sun Oct 23, 2022 7:08 am |
|
|
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: 1345
|
|
Posted: Mon Oct 24, 2022 9:47 am |
|
|
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: 566 Location: Ottawa, Ontario, Canada
|
|
Posted: Tue Oct 25, 2022 11:06 am |
|
|
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 |
|
|
|