Tuesday, May 10, 2011

microSD ATmega32 Data-Logger

Hi friends,

aim of this project is to present a way to store a large quantity of data into microSD card in files with FAT32 format. Here, ATmega32 is used for data collection and microSD interface. The data is received from in-build 8-channel ADC of ATmega32. One channel is used for reading temperature from LM35 sensor and remaining channels are used for simply reading voltages and storing them.

This project can be used to interface 8 different sensors with ADC of ATmega32, similar to the LM35 used here. The data is stored in CSV (comma separated values) format, which can be read using a PC/Laptop with Microsoft Excel or other compatible software. A snapshot of the excel file is given later in this post.

This project is an example of how to use the microSD FAT32 library presented in my earlier post. In that post, the files were created using hyper-terminal and entering data with the PC keyboard, since that demonstrates the file creation and it's easy to debug. But many users have requested to make the file creation independent of the terminal, done inside the microcontroller, so I'm showing here how to use those functions independent of terminal. If you have directly landed on this page, it would be more helpful if you visit the original post first as it would be a better starting place for learning SD or FAT32 functions.

Here is the schematic (click on the images for larger view or download PDF):

The project contains RTC interface (for date and time storage), RS232 (for connection with PC) and a microSD module. Here, the hyper-terminal connection is required only for setting RTC date and time. Once the date/time are set, the RS232 connection is not required anymore for normal data-logging operation (It can be used for debugging purpose if there is a problem).

The microSD module used here is from eXtreme Electronics.
The module is shown in the figure here. Other than the microSD socket, this low-cost module also contains on-board 3.3v regulator for the microSD card, a 5v-3.3v level converter and other safety features required for the card. This module is used here as it provides a stable interface and makes the the card compatible with 5v supply and 5v signals of microcontroller.

Connect the RS232 cable with the circuit. Set-up hyper terminal with 19200 baud, no parity, 8-bit data, 1 stop-bit and flow-control as 'None'

Connect the power cable and power on the circuit while keeping the push-button pressed

Green LED will glow in the circuit board

A menu will be displayed on the Hyper terminal as shown in the figure below. Select desired option and follow the displayed instructions

When date/time is set or debugging done, select option '0' to come out of the menu and start functioning a s data-logger

At this point, the RS232 cable can be removed

Operation as Data-Logger:

Connect the power cable and power on the circuit

Green LED will glow

Whenever the data-logging is required, press the push-button

Red LED will glow, indicating that the recording has started

To stop recording, press the push-button again, recording will stop and red LED will turn off

Files stored in the card can be read using a PC card-reader or using hyper-terminal with the circuit started in debugging mode

The operation is very simple as it uses just one push-button and an LED indication. In case of any error in accessing the card, red LED will blink continuously. In such a case, you can start circuit in debug mode (with terminal) and see the error messages.

Files are stored with the date as a name and .CSV extension. For example, data-logging done on 10 May 2011 would be stored in "10052011.CSV" file. Since the date is the name of file, everyday a single file is created and all the data recording done in a day goes into single file, no matter how many times the recording is stopped/started. First column of the file shows date, second shows time and next 8 columns show data from the 8 channels.

A file created during testing is shown in the figure below, where 5 sec interval was set for measurements (click on the image to enlarge it). Here channel-0 was used for LM35 temperature sensor, and remaining channels measure voltage. 5v was connected to channel-1 and 3v Li cell was connected to channel-3 (Channel 2 & 4 show some small voltages due to noise from voltages connected to nearby channels, which can be corrected by using bypass caps).

The interval between two measurement cycles is defined in main.c file, which can be set as per the user requirement. Basically, the program forms a dataString in every measurement cycle and appends this string to the file, if the file already exists or it creates a new file (for example, during the first recording in a day). You may go through the comments in the source code file for more info.

Note: Make sure that RTC circuit is properly connected, otherwise the code will simply hang waiting for receiving date & time from RTC

Download project files
--------------------------------------
The source code is written in AVR-GCC format using winAVR with AVRStudio-4, complete AVRStudio project folder can be downloaded from here:

Excellent! I think this will be easily portable to other AVRs, like ATmega128. Are the other files the same as in the earlier project? For example I2C? I have added other I2C peripherals and would like to reatin their functionality while implementing the datalogging features to the device.Perhaps a little "feature request": Would it be possible to keep datalogging running while temporarily ejecting the card (for the purposes to download the data to PC)? The data would be temporarily going to AVR internal EEPROM (or maybe even flash?) and after inserting the card back in, the data would be flushed. This way, no data would be lost in the process .. ?

The EEPROM part will ask for addition of little bit of hardware and some more software functions, which may not be required in case of most users. But yes, in case of non-stop data recording, even when the card is ejected, EEPROM part would be necessary. May be in the future I can provide this customization as a separate download, but till then, you can also give it a try to do the modifications.

Great job, and thanks. I am trying to configure this circuit as well.By the way, is it 8 Mhz-internal used or is it external 16MHz crystal?because i noticed that the schematic diagram written 16MHz external crystal, but the coding .c file mentioned 8MHz-internal. So which one is correct? I programmed the code into Atmega32 but cant see anything on the hyper terminal. If it is 8MHz-internal, how to configure it?

@Santosh: During the first start-up, as mentioned in the operation of the circuit, connect the RS232 cable, open hyper terminal (19200 baud, no parity, flow control-none) and power on the circuit while keeping the pushbutton pressed. You'll see the options on the terminal for setting date/time etc.

@Venice: Yes, the controller is working at 8MHz internal. The external crystal is optional. For setting the internal clock, you need to change the fuse values. You can use following values:Low fuse: 0xE4High fuse: 0xD9

For more details of fuse values, refer to 'memory programming' section of the avr datasheet.

I re-checked and yes, I have previously set the fuse bit correctly. However, I still cant see anything in hyper terminal although I pressed the button once the circuit is powered. Baud rate 19200 and COM port are all correct. Well, I will continue to try and to figure out which part is wrong.by the way,1) the button is active low right?2) in the schematic diagram, the microSD module, pin 6 connecting to PB3, from the extremeelectronics module, I saw pin 6 is CD. What is this pin? Since on MicroSD, there are only pins such as GND, VDD, CS, MOSI, MISO, SCK. So where comes the CD in normal MicroSD adapter.Please advice and thank you.

Hi Venice,if you want to see the full menu, you need to keep the button pressed while powering on, that means you press the button first and keep it pressed when you power the circuit on. But anyways, even if you don't press the button, you'd atleast get the first three lines on the terminal, mentioning the project title. May be you can recheck the RS232 connections, because the terminal would show atleast some garbage, if only the baudrate is not matching.

Yes, the button is active low.

The CD pin is actually 'Card Detect' pin which is a switch mechanically connected with card insert mechanism. I've shown it in the schematic, but not used it in the program, just to make the code compatible with previous versions. But it can be used to detect whether the card is really inserted or not.

@Paresh:No, it's not compulsory to use external module for the microSD card, it's used here to make job simpler. But if you don't have access to such a module, you can use method suggested in schematics of my previous post: http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html

@Anonymous:Yes, you can. Once the data is written and file is created or updated, you can stop the logging and go to debug mode as mentioned in the operational procedure, to read the file using hyper-terminal.

Great job! I'm currently building a similar project, using an Arduino nano. I'm using FAT16lib, works fine, but I will try FAT32 eventually. I'm also using LM35 sensors, combined with a RC damper (as in the datasheet), this gives better results. I'm waiting for some sensors (CO2, humidity, pressure, etc) that I've bought to complete my circuit.

Hi, I have managed to log the values into SD card.However, for the 3v lithium battery, should the '-' of the 3v batt common ground with the entire circuit?Because if I common ground the 3v batt with the entire circuit, the LED indicating error kept blinking once I press the button to start the data log. If without the 3v Li Batt, the data can be logged, but the time cannot keep counting once the circuit is power off. So what's the problem that causing the LED to keep blinking everytime when I common ground the '-' of 3v natt?

@Venice:The battery -ve terminal has to be connected with common GND of the circuit. It's recommended in the datasheet of the chip, too. The problem you are facing must be related to some other connections, as I've used the RTC chip in this way in many of my circuits and I do not find such problem. You can check out if the +ve terminal of battery is touching to other lines. Do write back here if problem still persists, I will try to create it in my circuit to find how it happens.

sir myself biswajit from bbsr orissa. i am a big fan of your blog. i have tried all your posts and it works fine. but i have a doubt regarding that cluster, sector and block in microsd. i will be thankful if you help me out. thanks in advanc

I have tried to run this code in avrstudio 4 but at the time of 'build' operation it gives 43 numbers of error. (e.g- undefined reference to 'spi_init', undefined reference to twi_init' etc. Could anyone help me

@Anonymous: Hey man, lemme know what's wrong!! The only reason I find about the errors is that u might be using some other compiler!! Use winAVR with AVRStudio and you won't have fortune to see a single error as compared to your 43 errors!!!

hello..great post.may i ask a stupid question because i am getting started with building a uC project.can i start recording without press the button first??i am building a security system.i want to start recording all events captured by lm35 and magnetic switch after the system being activated and automatically stop recording after deactivate it.

Certainly u can do that.. U need not press the button at all, just put up the condition which makes the system to activate and deactivate, in place of pressing the button, you'll get the recording..! You need not press the button at all..

If you still have some confusion, send me your schematics and mention which input you are using for button input, I'll send u the modified code..

actually i built my first project using codeVision AVR compiler.then i found your post which is using winAVR.now i'm trying to understand your code.honestly i confuse whether i modify your code or keep using my code but with extra time for understanding your code and applying in my code.

i will send my last schematic.sorry because i'm very very newbie.i'm very grateful to you for your help.

I used your schematic of ATmega8 interfaced with SD card and the code that you have provided. I tried to fill the memory of 1GB card. I am able to write 128 text files only using FAT 32. If i write more files they are getting corrupted. I am able to write only 32 MB of 1GB card. Please suggest me how to access whole of 1 GB memory or how to write more than 128 text file into sd card?

hello sir...i like your idea of this project...and i intend to do this project for my final year project and i would like to combined it with this project (http://embedded-lab.com/blog/?p=2425) can you list all the components needed to build this data logger project....really appreciated if you can reply asap....here are my email peace_world91@yahoo.com

nice job and namastē for having shared it. Just a curiosity of mine: what is the maximum sample rate? I mean, according to the source it can goes up to 100 Hz (100 S/s) but the rtd you used has 1 s of resolution.BRLuca

@Luca: Ya, though I've mentioned the max. sampling of 100Hz (min. delay of 10ms), due to RTC's resolution limit, time will be written same for those readings taken during the same second. (Note: The actual max. rat will be less than 100Hz, since the delay loop written there doesn't account for overheads occurring in calling functions, writing to the card etc.)

Hai...Great work sir. Iam doing a project to send 32 bit data from atmega32 to pc using RS232 serial communication. I know to transfer 8 bit data but I dont know how to transfer 32 bit data. Please help me.

hi sir been trying to build and compile the source code given in thi post version 1.0 but it has so many undeclared functions. your assistance on this will highly be appreciated as it will help me in debugging of codes

I have tried to run this code in avrstudio 4 with AVRGCC compiler but at the time of 'build' operation it gives 43 numbers of error. (e.g- undefined reference to 'spi_init', undefined reference to twi_init' etc.i believe the winAVR you were refering to is the AVRgcc

Good Job, great work.However, I found there's a bug. Whenever the appended filesize equals to the multiples of the cluster size (512bytes), forexample, when I write 128 times of 20 bytes data, = 2560bytes. Starting from 2560bytes, the file will be corrupted and can't be recognised by Windows.

yes, there are bugs with corrupted files...my uC restarts, because of SD card writing failure and trying to write to the same file, the file is corrupted and uC restarts over and over again...could you tell me where is mistake in code?thank you

I'm very sorry about last comments, I'm newby in programming and electronics... i was looking for mistakes in code and analyzed doubtfull parts:) it is everything OK with code, my Xmega permanently restarted due to my fault, not because of the code... my hardware was bad -I forgot to put schottky to my switch mode power supply, so when uc was starting writing to SD card, voltage dropped down and BOD protection restarted uC...

can u please tell me how to attach file in any blog for new post. i have just now create my eblog nw i have copy my word document in one of the post but images r not copied to it....and i don't want to insert single image. i ust want to attached some file which i have made...so plz help me..i also want to create blogs.my email id is rinki.arora88@gmail.com

thats awesome sir... but i totally dont understand :), because maybe i havent learn avrgcc yet, i usual use codevision for the compiler, and the sintax little bit different between them...would you write it in codevision?thanks a lot.. :)

Hi I was going though your code which supports SDHC card. The routine which converts normal short file name into FAT format. I could not get this part of the code which is used for setting file extension. Can you please explain the concept used in this. For setting file extension we use first three letters of file extension. Are there any other rules also for that? What if file have only 2 character extension?Please reply soon

Respected Sir, Its great project, I am final year student, i choose your project for my final year project but i want to add another four different sensors for remaining port pins in portA so which kind of changes required in schematic as well as in your posted coding, i was tried to add by taking yours posted coding reference but bugs are in my coding still remains. I really want your valuable Guidance Sir.Thank you

Hi sir,Gr8 job.I am using silabs mcu i.e c8051f930 using this with SPI i need to write and read the data from micro sd please suggest whether your code is working with this fine or not?.Please let me know.Thanks.

Just drop by to say thanks a lot for the share!I had a datalogger project which log current, voltage, and temperature data for recording photovoltaic activities. At first I kinda confused but thanks again it's now Done!

Idea: Taking 200 Samples per second from ADC is normal. But the SD writing requires more time. You need a large RAM to store the intermediate results. And write to SD card when stop button is pressed, with the timestamp.

Very helpful project!If I am building the project (Eclipse, AVR Plugin, GCC) I get a flash size of 23.8kByte and 1kByte for RAM. Is that possible or do I something wrong?I just switched from IAR to Eclipse AVR GCC.

I understand your rutines works perfectly to others, however my files get corrupted if they grow bigger than 68kB(allways). I'm debbuging this very long, tried different SD-s, frequencies, configurations, even without clock chip. Using your original rutines.Do you have some possible clues for this?

The Hex file size doesn't matter. What matters is the code size displayed when you compile the code. That will be around 12-13 KBytes. So, don't worry about the 41k size of hex file itself.

(When you dump the code into microcontroller, the programmer doesn't dump the hex file itself into the controller, but first the hex file is decoded and only the code bytes are sent to the controller).

Hi,the link which you provided describes the usage of resistor divider method to measure voltages greater than 5v. You can also follow the same way.In C code, you'll just need to multiply the value read by ADC with your resistor divider constant. e.g. if you want to measure 20v, you need voltage divider of 4 atleast, and hence, you can multiply the ADC value in the code with 4 to display actual value.

hi great worke please post the proteus simulation for this fat32 format. i checked with hardware setup and it works fine but when i simulate with proteus i fails please upload it with .mmc file alsotank's

I found next issue. Code removes at least one cluster from free memory record even if you append one byte to the free space of last sector of existing file.Do I do something wrong or you have fix for this bug?

Myself Sumanta is facing a problem with storing data in microsd card through the adapter. I have not used Microsd module connector but has fixed the microsd adapter in the bredboard with wires soldered on it. I have done all the connections as they are in the circuit diagram of the datasheet. But after powering on the red LED is blinking and nothing is displayed into Hyperterminal. Can anyone please help me to sort out the problem.

Hi!Awesome blog...I recently worked on atmega32 project,I facing some interfacing problems in my project can u plz help me it's urgent.this is my final year project and i try my best to do it but I can't solve it,so plz help me..

My project is "Monitor and control of green house environment"(using atmega32)

Hi!Awesome blog...I recently worked on atmega32 project,I facing some interfacing problems in my project can u plz help me it's urgent.this is my final year project and i try my best to do it but I can't solve it,so plz help me..

My project is "Monitor and control of green house environment"(using atmega32)

I am not using the MICROSD module and microsd module connector but instead of that I am using Microsd adapter with memory card. I have soldered pins on microsd adapter and have fixed it on the Bredboard. Then I have wired it with ATMEGA32 according as shown in the circuit diagram of the datalogger. Will in that way the memory card cannot be accessed by the microcontroller. Please have your suggestions.

Hifirst excuse me because my english grammar is not good enough.I see your nice project on http://www.dharmanitech.com/2011/05/microsd-atmega32-datalogger.html and now I'm very glad too find you.I need a project like this for my school with avr codevision and 2 diferrences :

1 - I want to use an srf02 sonar module and log the distance + 2 ADC ports for voltage logging.

2 - I want the datasheet of microSD module to make the that in my home for my project.because in my country this module was not available.or if there is a way to connect the micro SD or SD directly to atmega32 can you tell me that ?

i implemented SD card with Atmega32 in my project work successfully with your original post. now i want to improve DATA transfer speed (>3.125 Mbps) can you suggest how can be improve. can you suggest me how can i use 4 bit SD MODE?or anyother way to improve speed?

hi your code is great. please help me with some problem.please tell me what changes in the code i need to make if i am using a 16 MHz external crystal with atmega16.I am ok with the fuse bit. I want to know for the changes in the code i will have to make

@MajidHi Majid, the project you mentioned needs some hardware at my side to experiment. I can't write code and give it to you without having hardware.

For the SD card module, you can use the method of using microSD card adapters which are available easily everywhere. Check out my previous post: http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html

@Satti You can first try to use 16MHz instead of 8 MHz. The SD protocol is not available free of cost. So, you need to use SPI protocol if you don't wanna buy the license for using SD protocol.

@Robotronicsfor 16 MHz, no need to change anything in the code. Just double the baudrate in the HyperTerminal which you are using to communicate. i.e. it's 19200 with 8 MHz, make it 38400 when you use 16 MHz. Rest of the things will fit in automatically.

@Anonymous:The storage in the FAT follows little endian format i.e. the least significant byte is stored first. The AVR also follows little endian format. Here, in mbr structure, 'signature' is declared as an integer, a two byte variable. Hence, when you read this two bytes from memory as an integer, the compiler automatically rearranges the number and puts the first byte as least significant byte and second byte as most significant. So, 0x55 and 0xaa become 0xaa55 as an integer (a single number). That's why while comparing also we need to compare mbr->signature with 0xaa55 and not with 0x55aa, even though in memory, 0x55 is stored first, followed by 0xaa. you can get more insight by searching on net about 'little endian' and 'big endian' difference.

Hello sir, I have been trying your project for quite a while now. but the problem is that when the menu appears on the hyper terminal, and i set the date it says date set failed, and similarly for setting the time it says time setting failed. i want to know what might be the problem. i have used DS1307 in the same manner as your schematic says and as most of the other projects on the internet say.

Hi I have a problem when I write a file, I got Error in getting cluster,I looked into the sd card and I found a sector with data followed by a blank sector, and the next with data, so what could be the solution?

I have run some test, and I found a problem when '\n' is the last character in sector, then in the next writeFile appears Error in getting cluster. I'm trying to solve the problem but I need to study the code in depth.

Hi I solved the problem, I've been studing the code and I found that in the writeFile function, a comparison if(i >= 512), when data=='\n' and i=512, the code doesn't update the End Of File and other things. So thats why in the next writeFile I got Error in getting the cluster.I tried to write files in a kingston sd card (1gb) but I couldn't, sd_fat_ini() doesn't recognize it.I would like to know how to create folders and put files there, do you have any references?

Are you able to change the date/time using the terminal? If the date/time is changing when you update on terminal, but then it remains constant in the log, then it's the crystal problem. The DS1307 is not getting the clock from the crystal and hence, it's not able to count the seconds up. You need to check the crystal, the connections of the crystal with IC and may be the IC itself.

Hi Sir, is the MAX232 and the DS1307 needed if i am not looking to set the time? Will it affect the operation of the entire system without the digital clock? Is it a need in order for the MicroSD to store values? Sorry if the question sounds noob because i am a beginner.

what is the maximum sampling rate i can record the data? Right now i am using Atmega128 with internal clock frequency 8MHZ (sony SDHC card, 4x class). Now for one writefile() function it takes nearly 50ms. Is it possible to reduce it to less than 10 ms.

Hi great work.I am trying to simulate this project with Proteus 7.7v.But i am facing problem with .mmc image file.Could u please suggest me how to create it and link with SD card. Whether the image should also be a FAT32 image.I actually tried by creating a image file with winimage software.But it is still not working.please help me as i don't own a Hardware to implement it.

We are developing a data logger using ATMega128 that stores data into an SD card. We start by porting your code. After minor modifications (comment out "GICR = 0x00;", replace UCSR with UCSR0, and modify the main function such that all messages displayed on LCD instead of PC terminal - code fragment attached), we were able to compile the project successfully. Unfortunately, when we run the program on the device to read a 2GB SD card formatted on a PC using FAT16 file system, it cannot detect the card and ends up with "Unknown card" message. Could you give us some clues on the problem? Anyone who successfully ported the code for ATMega128, please share your experience.Thank you very much in advance.

hallo CCin my project I'm using yur work as base, but i change to ATmega324P at 3,3Volt so i had to change the RTC to M41T81S. now i have a problem, my clock registers are little bit different and my year register is at 07h, so after every reset i overwrite the year by zeros. i cant find there you write the control byte at ds1307, because its the 07h register. can you please tell me there do you write the control register of ds1307!!!efrick@gmx.de

Dear Sir,This has reference to the Software for the SD Card DATALOGGER SD_Datalogger_ver1.0.I am using 2GB SD CArd. The System works fine. The *.CSV file is created properly. But if the file size exceeds 450k or so I am not sure exactly)the file is no more readable in PC ( i am reading the file using the Card Reader in PC).

In the same card if I give another file name then again it stores upto 450k and then is no more readable.Can you please tell me why is it so...

@Eugen:The RTC control registers are written by the functions RTC_writeTime() and RTC_writeDate() in the RTC_routines.c file. The sequence for writing these registers is as follows:- user enters the date and time using the terminal of PC- these date and time are stored in the strings date[ ] and time[ ] in the main function- from these strings, the array rtc_register[ ] is updated. These array registers are also individually defined as macros SECONDS, MINUTES etc. in the RTC_routines.h, for easier understanding- values from the array registers are written to RTC registers by calling functions RTC_writeDate and RTC_writeTime in RTC_routines.c

The Interval defined is 1000 which means 1 sec. I am getting the records every 1 sec. The file 01042013.csv is created and appended. the only problem is when it exceeds 400k or so.. ( i have correct file upto 386k and the file when it is 410k it is nonreadable.)In the PC through Card Reader when I try to open the file ( 416K) then it says " Cannot open g:\01042013 file. Make sure a disk is in the drive you specified." "the file or the directory \01042013 is corruptand unreadable. Please run the chkdsk utility.". I tried to run the chkdsk but still I cannot read the file.

I thought if the file exceeding 400k is creating a problem, i should make multiple files. I gave the limit to the file and after 250k(i.e 2500records as one record is 100 bytes ) i changed the name of the file. The various files are created but again i get the same problem. The files are not readable. Is it that the scanning is fast( Interval=1000 i.e 1sec).

Sir, did you find time to look into the problem.. For smaller size files the program is working ok. but i am not able to find out when the file gets corrupted. the AVR program does not give any error but when i try to open the file through card reader the file is not readable.. this happens after 400k or so. if you can give me some hints as to where to look for the bug i can try.. i tried but not getting anywhere.. please help.

in program we have made certain changes i.e.file name is taken from array.We have displayed every steps on LCD so that it will be easy for debugging.It shows that file is created but no file is made in SD card.So please suggest us for solving this problem. Our modified code is given below:

Sir, please help me in designing data logger which consists of temp, humidity,light intensity(ldr),and some keys like event logger.should I design it using avr or 8051 cotroller.Which one is suitable .Please reply me.Email ID- pavanpanchal4@gmail.com.

hi. I want to built data logger using avr atmega 16, rtc ,lcd ,3sensors .I want to store the recorded data in controllers internal EEPROM memoryi am not using external EEPROM memory . So please help me.

hi. I want to built data logger using avr atmega 16, rtc ,lcd ,3sensors .I want to store the recorded data in controllers internal EEPROM memoryi am not using external EEPROM memory . So please help me.

1. I am using an mmc module for arduino. It only 6 pins : Vcc, Gnd, Miso, Mosi, sck, and without cs or cd (i forget). How can i use this module to work for this project ? I used micro sd + adapter to connect it to the module.

2. Beside sandisk what is another type of micro sd can used in this project ?

3. And as in the picture above, you used sandisk, what class is it ? Can i use sandisk with 8Gb of size and class 10 ?

Sir,I am using ur FAT32 library. My program works fine. In my project I doesn't have RTC. so I define fixed time and date array as 05/05/2009 and time as 05:05:05 day Monday. Now as per your program the 05052009.csv file has to be created. the file is also created. but when I connect the SD card in PC, I couldn't see the file. I am using 2GB microSD card. My card is detected by program as "Standard (Ver 2.x)."

When I see the file via hyperterminal as per option 5, I could see that the file is present. So Kindly provide me where I am making mistake? Waiting for your reply.

Hello, "CC"I jave a commercial project that could shave a couple of weeks off design time if I could use some of Your code.May I use some routimes, if I accredit You for it?With thanksAndy Crofts, Oulu, Finlandandrew.crofts@ehp-tekniikka.fi

sir,i am doing project "attendance data logger with atmega 2560", for this my application is using 4x4 matrix keypad, 16x2 lcd, sd card and rtc, first we will create all the students numbers as a folders in sd card, while student entering in to class they will enter their number on keypad that time the "in time&date" will save on their particular folder in sd card, while they exiting from class they will enter their number on keypad again this time"out time" will save on their folder in sd card, how to do this please give me a suggestions

Hello.Maybe you have this project in Proteus? I draw the circuit in Proteus, starts, but constantly produces an error - "Card Initialization failed .." Maybe not properly connected ... Please contact us help. Thanks in advance.Good day...

Hello Dharmani Sir, this is a great project. It will be of immense help for us if you please describe the detial procedure of compiling, building and making the HEX files using WinAVR and AVR Studio 4. Waiting to hear from you sir. You can also mail me the procedure. Email: astatinstar2438@gmail.com

Sir, I made the circuit and burnt the HEX file. I also attached microSD card via the module you showed from eXtremeElectronuics. In putty (baud=19200,bit=8,parity=None,flow=none), it is showing garbage values once I power On the circuit. Hyperterminal not showing anything with same speed setting. The red LED is constantly blinking. Green LED not glowing. Please help me. For my programmer, as I mentioned in the previous mail, it is showing the attached setting. There is no such option for Low fuse = 0xE4 & High fuse = 0xD9. I do not understand where lies the problem. It will be of immense help if you please help me. Or atlest tell me which programmer to use for burning the HEX file.

Hi Sir,Thanks a lot for your reply. Now I could get the message on my hyperterminal. But the problem is it is showing "SD card not detected" about 3 to 4 seconds after showing the first message. I am using 8GB class 10 SDHC 1, San Disk micro SD card. I have formatted it in Windows 8, FAT32, default allocation size. I am using the micro sd cared adapter from extreme electronics that you have shown in your blog. Please tell me what may be the problem. Is there any specific setting for formatting the SD card. Is there any debug mode that I might try? Waiting very eagerly for your valuable response.

Hi, I could log data into SD card after much trying and of course your help. But there are little issues that I found:1. The red LED starts blinking(as in card is not initialized error) after 60 seconds or 90 seconds(this time is random) after start of data logging and nothing gets logged in the card..2. The green LED never glows. Can you please say anything about this?3. If I want to log voltage from a step down transformer(basically I want to log the AC mains voltage by a 230-0-5 Transformer). Is that possible? Where should the two leads from the transformer secondary should go to the circuit?4. One more thing is the message on the hyperterminal does not always come at once every time. I have to switch off the circuit, remove the sd card module and sometimes remove the microcontroller and place them back again after some time, then the message comes properly. What might be the possible cause of this?5. Is the sd card module from extreme electronics necessary, or can I directly connect the micro sd card to the pins. If so what will bw the connections?6. Can I use Atmega8 instead of AtMega32?Please suggest Sir.

This is one of the most incredible blogs Ive read in a very long time. The amount of information in here is stunning, like you practically wrote the book on the subject. Your blog is great for anyone who wants to understand this subject more. Great stuff; please keep it up!www.mcafee.com/mis/retailcard

Fantastic!! you are doing good job! I impressed. Many bodies are follow to you and try to some new.. After read your comments I feel; Its very interesting and every guys sahre with you own works. Great!! McAfee Activate

Hi,I implemented your code in Mega32. That was great.I'm gonna make the system with Atmega64. RTC, USART and other components work fine, but I got stuck in MMC.Below is the changes, please have a look:

Fantastic!! you are doing good job! I impressed. Many bodies are follow to you and try to some new.. After read your comments I feel; Its very interesting and every guys sahre with you own works. Great!! www.mcafee.com/activate

This is one of the most incredible blogs Ive read in a very long time. The amount of information in here is stunning, like you practically wrote the book on the subject. Your blog is great for anyone who wants to understand this subject more. Great stuff; please keep it up!WWW.MCAFEE.COM/MLS/RETAILCARD

norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product. norton.com/setup

mcafee.com/activate Online Help – Step by Step guide for McAfee Activate, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Activate McAfee product. Just fill the form below and will get in touch with you as quick as possible. mcafee.com/activate

norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product. norton.com/setup

office.com/setup Online Help – Step by Step guide for office Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup office product. office.com/setup

norton.com/setup sells Retail Cards which is available in many retail stores. Norton Retail Cards allow you to download your security product from the internet rather than installing from a CD. Downloading security product from the internet ensures you, your setup is the most recent version. Due to viruses and other malicious software it is very tough to install Norton product for normal computer users.norton.com/setup sells Retail Cards which is available in many retail stores. Norton Retail Cards allow you to download your security product from the internet rather than installing from a CD. Downloading security product from the internet ensures you, your setup is the most recent version. Due to viruses and other malicious software it is very tough to install Norton product for normal computer users.mcafee.com/activate have the complete set of features which can protect your digital online and offline life of the computing devices, and it not only help you to protect it but also it can maintain the stability of your computer.office.com/setup Help – Step-by-Step guide for Microsoft Office – Activate, Donwload & complete installation from office.com/setup online. We are providing independent support service if in case you face problem to activate or install Microsoft office product.twitch.tv/activate

McAfee provides all round protection not just from malwares or infected files; it defends by blocking all the unwanted threats like phishing, scams. Once you installed your McAfee Retail card through www.mcafee.com/activate, you will get complete protection for your devices.

norton.com/setup Online Help – Step by Step guide for Norton Setup, Download & complete installation online. We are providing independent support service if in case you face problem to activate or Setup Norton product.

Safe Landing, Welcome!!

Hi techies,this blog is created for sharing design ideas of circuits based on microcontrollers!! Be it any controller, i don't mind! my favourite microocntrollers are AVRs from Atmel (Microchip)Have a say if you find anything useful or the opposite on this blog!! You can also share your comments on the designs!

Free Datasheets

Translate this page

Subscribe To

Copyright (c) 2009-2018 CC DharmaniDisclaimer: Information presented on this blog is on a cost-free basis and though it is tested with best of my knowledge to make it error-free, no warranty is given for any mistake and hence no responsibility taken for any faults. Try it at your own risk! -CC Dharmani