Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

SD Card thought

Status
Not open for further replies.
Atom, there's Fat12, Fat16 AND Fat32 with some complex minor or major alterations. Early SD cards came pre formated with FAT12, it's anyone's guess now days who's hiding what were in the bit tables nowdays. Though you can format the card yourself anyway you want. You can do bootable flash devices now using NTFS, EXT2 or whatever. There are no limits, the card is just a storage device, the formats of the data stored on it don't matter in the least bit. Except to the system accessing it. With bioses support booting to flash devices now, all bets are off as to what you'll find a flash device until you scan it.

Mongerson an 8, 16, or 32 bit microcontroller has no influence of any kind whatsever on the file system on the card in use. You can use an 8 bit micro to access a 32bit fat system, or a 32 bit micro to access a 12 bit FAT. You just gotta write the code to do it, just because it's an 8 bit micro only means that you need two use several instructions to deal with more than 8 bits.
 
Last edited:
Fat16 could do 4gig with 64kb clusters, obviously not a good choce for small file storage though
You're also forgetting all the other file systems out there, many of which are still actively used. The media type does not limit the filesystem used on it. The SD cards used in some cell phones don't use standard file systems (well they might but I don't know what one) so you can't read them in a PC and vice versa, at least not without the right software.
 
Last edited:
Sceadwian, I would say that it does have an influence of some kind whatsoever since you have to write the code to do it! If you have a 32 bit controller for instance, you may be able to read and write data faster, similarly with an 8 bit controller it may take more time but you'll still be able to do it. The fact remains that different controllers are going to require different code.

All I was looking to see is if anyone has gotten the dsPIC to initialize an SD card.
 
a lot of people have. There is a book ... one min...

Amazon.com: Programming 32-bit Microcontrollers in C: Exploring the PIC32 (Embedded Technology) (9780750687096): Lucio Di Jasio: Books

But mostly:
Amazon.com: Programming 16-Bit PIC Microcontrollers in C: Learning to Fly the PIC 24 (Embedded Technology) (9780750682923): Lucio Di Jasio: Books

thats a nice book.... It has a bunch of info... also.. init for all Micros are the same... its the actual registers from micro to micro that differs... Like SPI is different from PIC18F and PIC32 im sure...

You can use my SD code and just edit the SPI functions...
 
OK great, thanks for the links to the books. I'll check them out. However, I still have yet to see an example code for how it is done on a dsPIC. The Microchip example code (demonstration.c) shows you many features of how to do it on both PIC 24, as well as PIC 32, but not for the dsPIC.

I think I need to review my configuration registers to be sure I'm enabling the re mappable peripherals. That may be where the problem lies.

Thanks again,
- Michael
 
You haven't said much about how you intend to use it.
SD cards cannot readily replace RAM because there is a limited "write" endurance, how many times any given block of nonvolatile memory can be rewritten before it's worn out. Also they're typically slow to write, but they've gotten a lot faster in recent times.

I hear the SD card does some kind of logic running "under the hood" that moves around the physical location of the blocks on the memory cells to slow down the wear on any one cell. Or maybe it waits for a cell to become defective (readback-after-write does not agree), and then maps the block to a new cell. I don't know too much about that. Google does say that the endurance is between 10k-250k writes. That may seem like a lot, but if your code does 100 writes/sec to a single location, then it'll break the lower end of that in under 2 minutes.

The PIC cannot run program code read off external memory. The only way to accomplish this is to use a bootloader to self-write data read off the SD card into program memory and then run it from program memory.
 
Its mostly for reading. I intend on using it for image storage and sound perhaps. Like i wanted it for my remote control...

To hold all the icons, images and logos etc... Thats the most i can think of using it for. So far it works well....

Im waiting for a larger LCD so i can start the remote itself. I will be using a 2.4" LCD (TFT) as my display and maybe either have 2-5 main buttons and the touch screen.... or just pure touch
 
hey, so hows the project going... complete yet..?
I'm looking to do the same as what you did or are doing.. trying to get to display a BMP file from a micro SD card to a tft display using a dsPIC30F4011... now my trouble actually understanding how to get that BMP file..from the microSD to the dsPIC to the TFT display.....
my tft display is 320x240 pixels... 8bit, i ordered it from newhaven displays...
any help..
 
also, is there any difference.. in using a micro SD, and a regular SD card that you've used...? other then just the physical size...
 
Not sure i hear there is but i never ran into it. I used both with no issues....

From SD to PIC to LCD is very hard unless you have a software library for opening BMPs... I converted all images to uncompressed images with no header to use. Mainly because BMP file organization is funny and complex
 
Thanks for the link, just about to start reading that!

hey atomsoft.. how'd you manage to convert the image to an uncompressed image without the header...?
what format was the image...?

i found a site with an IMG to HEX converter...

**broken link removed**

just scroll down until software tool.. nd its there
 
Yeah i made my own in VB6 .. i lost it though. Im making a new one in VB NET tho! It will be done in a couple days... i have so many other projects being worked on.

My program will give the option for 8bit or 12bit and allow to save as file or copy to clipboard. I might add a option to open the saved file and also save as a jpg or something so you can restore lost images.
 
wow, man you seem to be realy busy 24/7 how do yuh manage...
how old are you?... you seem like a crazy programmer! lol
crazy in a good way loll
 
heh Thanks im 25, I dont know how i manage anything... so tired!! ALL THE TIME lol its crazy tho but heh... i find it better than being bored and doing nothing. :D

So where ya from? How old are you?
 
i'm 21.. from toronto!
so i'm using the micro SD card.. but its an A-Data 2GB micro sd.. now would the specs be any different then the Sandisk...SD card?...can't seem to find an A-data manaul or spec sheet!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top