Sonsivri

Electronics => Projects => Topic started by: shams_iqbal on February 16, 2011, 12:41:46 12:41



Title: avr microcontroller based data logger with mith microsd card
Post by: shams_iqbal on February 16, 2011, 12:41:46 12:41
hi to all
    i am buliding avr microcontroller based data logger device  recently i bulded hardware but no idea about how to interface micro sd card with atmega8535 microcontroller using bascom avr even i am conflected about mmc and micro sd card what is diffrence in these two types regarding to interface and what minimum resorces is used to interfacing with microsd card my choice is to attach 2 gb microsd card (or less capicty 512 mb )with it so any one have practical info plz share it with me
regards


Title: Re: avr microcontroller based data logger with mith microsd card
Post by: DarkClover on February 16, 2011, 01:34:33 13:34
Well, MMC and SD had the same serial interface till they stopped to develop MMC furthermore.
The SD-Cards today have a parallel interface to provide faster data transfer. However they
are backward compatible and support the old serial interface also.

Have a look at: SD-Card Wiki (http://en.wikipedia.org/wiki/Secure_Digital)


Once you chose your cardtype it's juts upon you to interface it. There are lots of
examples out the net (Assembler, C,) and surely for BASCOM.
I don't know how to program in BASCOM since I use C and Assembler but have a look
at this: BASCOM-MMC (http://staff.ltam.lu/feljc/electronics/bascom/Speicherkarten_Low_Level.pdf)
It's in german but the BASCOM-Library should explain itself.

If you want a more comfortable way to handle data on a SD-Card, you should
think about implementing a file system like FAT or FAT32.

Greets DarkClover


Title: Re: avr microcontroller based data logger with mith microsd card
Post by: LabVIEWguru on February 16, 2011, 03:18:54 15:18
a link to this site was posted recently: http://elm-chan.org/   
look around on his site. He is a very, very sharp person and has many examples on his site. He also has a SD card file system (Fat 16, if I remember) that should be exactly what you need. There is also a link to a modified SD card file system on his site - all free!

If your micro has an SPI port, you are "home free" to interface to an SD card - it's that simple.


Title: Re: avr microcontroller based data logger with mith microsd card
Post by: engamor on February 17, 2011, 08:30:30 08:30
I confirm the good way to go is in LABviewguru post. The direct link to chan-fatfs is http://elm-chan.org/fsw/ff/00index_e.html , there you can find links to some AVR implementation as well and a very useful link to the memory card structure. I myself completed several projects starting from here, with good results. All of them are in C and made for the ARM architecture, but avr is popular too and should not be too much difficult to implement. Good luck!