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.

Does using SD card with microcontroller require an operating system?

Status
Not open for further replies.

matrixofdynamism

Advanced Member level 2
Advanced Member level 2
Joined
Apr 17, 2011
Messages
593
Helped
24
Reputation
48
Reaction score
23
Trophy points
1,298
Activity points
7,681
SD card and any other media backup device has file system when data is stored on it. Operating systems usually deal with these files systems and there are a wide variety of them. If one uses SD card with say Microchip PIC, will it require use of an operating system? I do not think that the PIC microcontrollers are suited for operating sytems. If the SD card can be read/written to without an operating system using bare metal code, how does the code deal with the file system on the SD card?
 

Hi,

it is not the problem of an OS.
You can even call your microcontroller software as your "special OS".

You could simple write data using SPI and direct addressing to the SD card. There is no problem.
But as soon as you want to use (read) the same SD card on a PC, then you need to take care of the complete file system handling.

If you want to keep it simple on your microcontroller you could store your data the way you want (raw). But to read it on the PC you need a tool that reads the SD card data as raw data without filesystem.
Then on the PC you can access the same way as on your microcontroller.

But you need this tool on every PC you want to access the raw SD card data.

There should be a way with VB. But i´ve never done this.
I´m sure there is a VB specialist that can assist you..

Klaus
 

You do not need an 'operating system' to read a file system. You just need a function library that understands the file system and how to access the SD. It's quite common to do this without an operating system. In fact, for FAT16 and an SD card (which does a lot of the hard work for you itself) it's really quite easy (well, easy if you grew up hacking around in MS-DOS and FAT16 on 10MB hard disks!)

Such libraries are readily available for PICs and work from at least PIC18 devices. The FAT16 file system is easiest to implement on smaller devices like the PIC18 with limited memory.

See here for a start:

https://www.microchip.com/wwwAppNotes/AppNotes.aspx?appnote=en532040
 
Microchip MDD library is an option.

After implementing it several years ago in a product (and fixing a number of library bugs), I came to the the conclusion that I would have better used the popular open source FatFS library.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top