<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8014888555955763990</id><updated>2012-01-31T05:03:18.599-08:00</updated><category term='serial EEPROM'/><category term='DIY (Do-It-Yourself)'/><category term='3310 LCD'/><category term='ATmega8'/><category term='RS422'/><category term='Thermometer'/><category term='Precision Rectifier'/><category term='M32 Starter&apos;s Kit'/><category term='RS232'/><category term='PWM'/><category term='DAC'/><category term='Data Acquisition'/><category term='LCD'/><category term='4x4 matrix keyboard'/><category term='SPI'/><category term='RC Car'/><category term='i2c'/><category term='ATmega32'/><category term='DTMF telephone'/><category term='DS1307'/><category term='Telephone Ring Detector'/><category term='Nokia 3310 LCD'/><category term='DTMF Decoder'/><category term='ADC'/><category term='AVR Programmer'/><category term='ADXRS150_gyro'/><category term='RTC'/><category term='USB converter'/><category term='FAT32'/><category term='microSD / SDHC'/><category term='IR'/><category term='Visual C++'/><category term='Caller ID unit'/><category term='ATmega128'/><category term='rate or position measurement'/><category term='Motor Control'/><title type='text'>Design with Microcontrollers</title><subtitle type='html'>DharmaniTech - Blog devoted to circuit designs and ideas around microcontrollers!!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-5636091250458627863</id><published>2011-05-10T05:29:00.000-07:00</published><updated>2011-05-17T06:59:08.429-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Acquisition'/><category scheme='http://www.blogger.com/atom/ns#' term='microSD / SDHC'/><category scheme='http://www.blogger.com/atom/ns#' term='RS232'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega32'/><title type='text'>microSD ATmega32 Data-Logger</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/-l9JKUVyDmMo/TclFJoxMGuI/AAAAAAAAAb8/8CSYpK02UI0/s1600/excel-sheet.JPG"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/-Npy76Fg2q7s/Tckv94oIuXI/AAAAAAAAAbM/aLuxyXetW5A/s1600/dl1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 345px;" src="http://3.bp.blogspot.com/-Npy76Fg2q7s/Tckv94oIuXI/AAAAAAAAAbM/aLuxyXetW5A/s400/dl1.JPG" alt="" id="BLOGGER_PHOTO_ID_5605063951458548082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-iH_CCznFHTE/TclOCMJ1DuI/AAAAAAAAAcE/EgQg_qpw6kk/s1600/dl_off.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 356px; height: 400px;" src="http://1.bp.blogspot.com/-iH_CCznFHTE/TclOCMJ1DuI/AAAAAAAAAcE/EgQg_qpw6kk/s400/dl_off.JPG" alt="" id="BLOGGER_PHOTO_ID_5605097010768449250" border="0" /&gt;&lt;/a&gt;Hi friends,&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;This project is an example of how to use the microSD FAT32 library presented in my &lt;a href="http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html"&gt;earlier post&lt;/a&gt;. 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 &lt;a href="http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html"&gt;original post&lt;/a&gt; first as it would be a better starting place for learning SD or FAT32 functions.&lt;br /&gt;&lt;br /&gt;Here is the schematic (click on the images for larger view or &lt;a href="https://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_DataLogger.pdf?attredirects=0&amp;amp;d=1"&gt;download PDF&lt;/a&gt;):&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-8pF9QoLX39Y/Tck0H7F6TeI/AAAAAAAAAbc/dTQ4aCwXnB0/s1600/sd_dl_sch1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 391px; height: 400px;" src="http://1.bp.blogspot.com/-8pF9QoLX39Y/Tck0H7F6TeI/AAAAAAAAAbc/dTQ4aCwXnB0/s400/sd_dl_sch1.JPG" alt="" id="BLOGGER_PHOTO_ID_5605068521965506018" border="0" /&gt;&lt;/a&gt;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).&lt;br /&gt;&lt;br /&gt;The microSD module used here is from &lt;a href="http://store.extremeelectronics.co.in/home.php"&gt;eXtreme Electronics&lt;/a&gt;.&lt;a href="http://3.bp.blogspot.com/-UWZlsCNg_WY/Tck5bEw7WSI/AAAAAAAAAbk/GdJkALHshzk/s1600/MicroSDBreakoutIso.jpg"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 218px; height: 188px;" src="http://3.bp.blogspot.com/-UWZlsCNg_WY/Tck5bEw7WSI/AAAAAAAAAbk/GdJkALHshzk/s320/MicroSDBreakoutIso.jpg" alt="" id="BLOGGER_PHOTO_ID_5605074348537501986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;The module is available at: &lt;a href="http://store.extremeelectronics.co.in/MicroSD-TF-Module.html"&gt;http://store.extremeelectronics.co.in/MicroSD-TF-Module.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The schematic also shows two LEDs and a push-button. The LEDs are used for indications of power and recording and the push-button is used to start-stop recording.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Operation of the circuit:&lt;/span&gt;&lt;br /&gt;-----------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 0, 204);"&gt;For setting RTC date/time (or for debugging mode):&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Connect the microSD module, insert the microSD card&lt;/li&gt;&lt;li&gt;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'&lt;/li&gt;&lt;li&gt;Connect the power cable and power on the circuit &lt;span style="font-weight: bold;"&gt;while keeping the push-button pressed&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Green LED will glow in the circuit board&lt;/li&gt;&lt;li&gt;A menu will be displayed on the Hyper terminal as shown in the figure below. Select desired option and follow the displayed instructions&lt;/li&gt;&lt;li&gt;When date/time is set or debugging done, select option '0' to come out of the menu and start functioning a s data-logger&lt;/li&gt;&lt;li&gt;At this point, the RS232 cable can be removed&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/-xd1D29KoVps/Tck9zqQukpI/AAAAAAAAAb0/MEpcNUBogVE/s1600/menu.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 357px; height: 198px;" src="http://4.bp.blogspot.com/-xd1D29KoVps/Tck9zqQukpI/AAAAAAAAAb0/MEpcNUBogVE/s400/menu.JPG" alt="" id="BLOGGER_PHOTO_ID_5605079168966365842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(102, 0, 204);"&gt;Operation as Data-Logger:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Connect the power cable and power on the circuit&lt;/li&gt;&lt;li&gt;Green LED will glow&lt;/li&gt;&lt;li&gt;Whenever the data-logging is required, press the push-button&lt;/li&gt;&lt;li&gt;Red LED will glow, indicating that the recording has started&lt;/li&gt;&lt;li&gt;To stop recording, press the push-button again, recording will stop and red LED will turn off&lt;/li&gt;&lt;li&gt;Files stored in the card can be read using a PC card-reader or using hyper-terminal with the circuit started in debugging mode&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;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 &amp;amp; 4 show some small voltages due to noise from voltages connected to nearby channels, which can be corrected by using bypass caps).&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/-l9JKUVyDmMo/TclFJoxMGuI/AAAAAAAAAb8/8CSYpK02UI0/s1600/excel-sheet.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 383px; height: 400px;" src="http://2.bp.blogspot.com/-l9JKUVyDmMo/TclFJoxMGuI/AAAAAAAAAb8/8CSYpK02UI0/s400/excel-sheet.JPG" alt="" id="BLOGGER_PHOTO_ID_5605087243104164578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;Note: Make sure that RTC circuit is properly connected, otherwise the code will simply hang waiting for receiving date &amp;amp; time from RTC&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download project files&lt;/span&gt;&lt;br /&gt;--------------------------------------&lt;br /&gt;The source code is written in AVR-GCC format using winAVR with AVRStudio-4, complete AVRStudio project folder can be downloaded from here:&lt;br /&gt;&lt;br /&gt;- &lt;a href="https://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_Datalogger_ver1.0.zip?attredirects=0&amp;amp;d=1"&gt;&lt;span style="font-weight: bold;"&gt;Download Source Code&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download schematic:&lt;br /&gt;- &lt;a href="https://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_DataLogger.pdf?attredirects=0&amp;amp;d=1"&gt;Schematic (PDF)&lt;/a&gt;&lt;br /&gt;- &lt;a href="https://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_DataLogger.sch?attredirects=0&amp;amp;d=1"&gt;Schematic (EAGLE)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;References:&lt;/span&gt;&lt;br /&gt;--------------&lt;br /&gt;Visit my &lt;a href="http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html"&gt;earlier post &lt;/a&gt;for the references on SD card &amp;amp; FAT32 which are given at the end of the post&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-5636091250458627863?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/5636091250458627863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=5636091250458627863' title='53 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5636091250458627863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5636091250458627863'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2011/05/microsd-atmega32-datalogger.html' title='microSD ATmega32 Data-Logger'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Npy76Fg2q7s/Tckv94oIuXI/AAAAAAAAAbM/aLuxyXetW5A/s72-c/dl1.JPG' height='72' width='72'/><thr:total>53</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-6450971461873601647</id><published>2010-12-07T21:58:00.000-08:00</published><updated>2010-12-18T08:19:25.112-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='microSD / SDHC'/><category scheme='http://www.blogger.com/atom/ns#' term='FAT32'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual C++'/><title type='text'>microSD FAT32 testing using Visual C++</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/TQze-z0rWoI/AAAAAAAAAZ8/Zqn7xKq1C8Q/s1600/2.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 250px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/TQze-z0rWoI/AAAAAAAAAZ8/Zqn7xKq1C8Q/s400/2.JPG" alt="" id="BLOGGER_PHOTO_ID_5552057611285387906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;&lt;br /&gt;this post presents a way for testing and learning the FAT32 system on microSD/ SDHC cards without building the hardware with microcontroller, thanks to &lt;span style="font-weight: bold;"&gt;Henry Yiu&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;This project uses the FAT32 library available in my &lt;a href="http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html"&gt;previous post&lt;/a&gt;, but does away with the microcontroller part. So, you can use this code with a PC and USB card reader and get insight of the FAT32 data structure by accessing data from the card in raw as well as in FAT format.&lt;br /&gt;&lt;br /&gt;This code can be used as a confidence building step for those who are not comfortable with directly building the hardware part. Once the FAT is understood, one can go ahead with development of hardware and customization of the software.&lt;br /&gt;&lt;br /&gt;This may look like hardcore software thing, but it's not so. It can be tested by anybody with little knowledge of programming and determination to understand the FAT / sd card formats.&lt;br /&gt;&lt;br /&gt;Step by step procedure for testing of the code is explained later.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 153);"&gt;Here are the Henry's words for the project:&lt;/span&gt;&lt;br /&gt;-----------------------------------------------------------------------&lt;br /&gt;When trying to build a microcontroller to access an SD card, I came  across this web site which details the hardware and software of how to use an Atmel AVR  microcontroller to access an SD card.  But I wanted to test out the FAT32  file system code before actually building the hardware.  Therefore, I  wrote this code to run on Visual C++ to enable me to test the FAT32 code  without actually building the hardware.&lt;br /&gt;&lt;br /&gt;Tracing the code can reveal  many compatibility problems between how the official FAT32 documentation  and how Microsoft Windows actually implement the FAT32 system.  There  are a few interesting things I found for Windows XP.  Maybe you can find more using  various trace methods and many different brands of SD cards.&lt;br /&gt;&lt;br /&gt;The things I found are, for example:&lt;br /&gt;&lt;br /&gt;1. After adding or deleting files in Windows XP, the FSinfo next free  cluster upper 16-bit is always zero.&lt;br /&gt;2. Adding new files in Windows XP updates the directory structure, but  does not set the next entry to empty.&lt;br /&gt;3. Deleting files in Windows XP does not set the FSinfo structure next  free cluster to a lower numbered cluster of the deleted file.&lt;br /&gt;&lt;br /&gt;Recommended softwares (All the three are available for free):&lt;br /&gt;---------------------------------------------------------------------------------&lt;a href="http://www.microsoft.com/express/Downloads/"&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Microsoft Visual C++ Express&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a style="color: rgb(51, 51, 255);" href="http://mh-nexus.de/en/hxd/"&gt;HxD Hex Editor and Disk Editor&lt;/a&gt;&lt;br /&gt;&lt;a style="color: rgb(51, 51, 255);" href="http://support.microsoft.com/kb/311272"&gt;The DevCon command-line utility functions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;How to use: Only five files:&lt;br /&gt;MAIN.CC, SDCARD.CC, FAT32.CC, FAT32.H, GLOBAL.H.&lt;br /&gt;&lt;br /&gt;Use Microsoft Visual C++ Express to build these files with the default  built option.  Then you can step through the program to learn the boot  record structure, the FAT table, and how clusters are linked together.   You can also use HxD Hex Editor (Extras -&gt; Open Physical Disk) to  study the SD card content.  Since data is cached in Windows, you need to  unplug and plug the USB card reader for write or delete command to be  visible in Windows.  The DevCon utility allows you to do so without the  need to actually do a hardware plug and unplug.  Then you can test the  FAT32 system using a batch file.&lt;br /&gt;&lt;br /&gt;Enjoy&lt;br /&gt;BR - Henry Yiu&lt;br /&gt;&lt;br /&gt;You can download the complete project folder from here:&lt;br /&gt;&lt;a style="font-weight: bold; color: rgb(51, 51, 255);" href="https://sites.google.com/a/dharmanitech.com/microsd-fat2-testing/1/FAT32_VC_121.zip?attredirects=0&amp;amp;d=1"&gt;microSD-FAT32 with Visual C++ &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Many thanks to Henry for allowing to share his work&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 153);"&gt;Here is the step-by-step procedure of how to use the code:&lt;/span&gt;&lt;br /&gt;----------------------------------------------------------------------------------------&lt;br /&gt;(well, this assumes that you have already done some basic background study on FAT32 and microSD cards, may be by reading a few articles on them, since some theoretical knowledge would really help in making sense of the results you get)&lt;br /&gt;&lt;br /&gt;(the folder which you download already contains the .exe file, but we'll assume that it is not there, to make the procedure complete)&lt;br /&gt;&lt;br /&gt;1. Install and open VC++ express&lt;br /&gt;&lt;br /&gt;2. Create a new project (select 'empty project' when asked). Enter the location and project-name. Here we'll select project-name as 'sdcard', and location as desktop&lt;br /&gt;&lt;br /&gt;3. Project window will open. Now, go back to desktop and copy the  5 files (MAIN.CC, SDCARD.CC, FAT32.CC, FAT32.H, GLOBAL.H) from the downloaded folder, into the folder created by the VC++&lt;br /&gt;&lt;br /&gt;4. Go back to VC++ window and add the header files and source files into respective categories displayed at left side window panel. The panel will now look like this (here main file is open):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/TP9iYtmDjGI/AAAAAAAAAZE/l_Sg1DFCLCI/s1600/1.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 435px; height: 271px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/TP9iYtmDjGI/AAAAAAAAAZE/l_Sg1DFCLCI/s400/1.JPG" alt="" id="BLOGGER_PHOTO_ID_5548261442639334498" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;5. Now, from the top menu-line, under 'debug', select 'build solution'. This will build the project files. The build window at the bottom of the page is shown in this figure:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/TP9jSp6r7WI/AAAAAAAAAZM/KmYw9Vhupys/s1600/2.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 422px; height: 263px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/TP9jSp6r7WI/AAAAAAAAAZM/KmYw9Vhupys/s400/2.JPG" alt="" id="BLOGGER_PHOTO_ID_5548262438084537698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;6. Now, select 'start debugging' under the same 'debug' menu. This is to make sure that the .exe file is generated.  Okay, now you are ready with the .exe file. It will be stored in the 'debug' folder inside the project directory. In our case directory is 'sdcard' on the desktop.&lt;br /&gt;&lt;br /&gt;7. It's time to test the .exe file. So, connect the USB card reader, insert a microSD card (make sure the card is already formatted with FAT32, you can also store some files for checking the read feature of the code)&lt;br /&gt;&lt;br /&gt;8. Open windows command prompt. In the command prompt, go to the project directory, 'debug' folder. Now, type 'sdcard' or 'sdcard.exe'. This will display the available options. This is described in this figure:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/TP9lxlZSapI/AAAAAAAAAZU/TFNGtB0hkn0/s1600/3.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 429px; height: 219px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/TP9lxlZSapI/AAAAAAAAAZU/TFNGtB0hkn0/s400/3.JPG" alt="" id="BLOGGER_PHOTO_ID_5548265168469912210" border="0" /&gt;&lt;/a&gt;9. Using the command shown in the above figure, you can select 'read', 'write', 'delete' etc. options, as per the command format. After every command executed, it would display 'success!'. If any error, it would display an error message. Some of the file operations are shown here:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/TP9ni0FRwYI/AAAAAAAAAZc/9Z_aSEBysYA/s1600/4.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 422px; height: 250px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/TP9ni0FRwYI/AAAAAAAAAZc/9Z_aSEBysYA/s400/4.JPG" alt="" id="BLOGGER_PHOTO_ID_5548267113737732482" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;10. Once you have performed some operations in last step by creating, deleting files, you need to remove the card and re-insert for checking out the files. (The re-inserting thing is not required if you use the DevCon utility as suggested by Henry). The files which are created will contain random data, as this code is mainly to understand FAT. What is important is that windows should not display that the file is corrupt. This figure shows the results of operations we did in the last step, by opening the card in windows after re-insert:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/TP9n0259pnI/AAAAAAAAAZk/VuRdFXhuLgM/s1600/5.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 415px; height: 257px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/TP9n0259pnI/AAAAAAAAAZk/VuRdFXhuLgM/s400/5.JPG" alt="" id="BLOGGER_PHOTO_ID_5548267423733229170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;11. Now, the next step is to see how to use the HxD Hex Editor to understand what we did in the previous steps:  Install and open the HxD. From the top menu-line, under 'extras', select 'open disk', select the drive letter of the card and press OK, or select 'physical disks' &amp;amp; then 'removable disk1'. This will open the card memory area, starting with the first sector of the card. Here in the first sector, you can see how the boot sector or MBR (master boot record) of your card looks like.&lt;br /&gt;&lt;br /&gt;12. Using the 'find' menu, search for the text string, the name of any file stored in the card. This will take you to the FAT (File Allocation Table) area of the card. (you need to use 'search' option, as sometimes the FAT sector will be located far away and you'll be tired of scrolling down. Alternatively, using the boot-sector data, you can manually calculate the FAT's starting sector number and directly go there by entering the sector number in the box at upper right corner). Here you can see how files are arranged in FAT, by their names, starting cluster numbers etc. Following figure shows the occupied part of FAT and shows location of 'newfile.txt', which we created in step 9.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/TP9s5vysnUI/AAAAAAAAAZs/QCh5DwvfK4A/s1600/6.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 428px; height: 249px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/TP9s5vysnUI/AAAAAAAAAZs/QCh5DwvfK4A/s400/6.JPG" alt="" id="BLOGGER_PHOTO_ID_5548273005281189186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This is really useful in understanding the effects of creation, deletion of files on FAT table &amp;amp; FSinfo sector, to gain a real insight of the FAT32. And this understanding helps a lot while debugging your code when you make the actual hardware.&lt;br /&gt;&lt;br /&gt;It also helps understanding the differences in file handling by the microcontroller FAT32 code and the windows, as you can check the card data in HxD after using either of them. It'll help in debugging  by bridging in the troublesome differences.&lt;br /&gt;&lt;br /&gt;Here are the additional testing suggestions by Henry:&lt;br /&gt;------------------------------------------------------------------------&lt;br /&gt;&lt;div&gt;In order to start debugging, you will need to enter command lines.   You can either change the #if1 to #if0 in main(), or use the Visual C++  command argument input:  In Visual C++, select the "Project", then  "SDCard Properties", then select "Debugging", and then "Command  Argunments", then enter the command.  For example:" -w2  e:   test1.txt".  &lt;/div&gt; &lt;div&gt;&lt;br /&gt;To trace the detail of the FAT32 system, you would go to the end of  the getBootSectorData() function and select "Run to Cursor".  Then you  would record these two important sector numbers:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;div&gt;    unusedSectors + reservedSectorCount = starting sector of the  FAT table&lt;/div&gt; &lt;div&gt;    firstDataSector = starting sector of the data area&lt;/div&gt; &lt;div&gt;&lt;br /&gt;Now you can open the HxD hex editor to see how these two sectors  and how they are being changed by the program once you start stepping  through the program.  You can press F10 to single step, or F11 to step  into a function, or right click on a line and set a breakpoint, then  press F5 to run to the breakpoint.  You need to press F5 in HxD hex  editor to refresh the display in order to see any changes the program  made to the SD card. &lt;/div&gt; &lt;div&gt;&lt;br /&gt;Once you have master this procedure, you can try doing file  transfer between Windows XP and the program, for example, writing a file  in Windows XP and reading it back by the program etc.  You can also use  HxD hex editior to view how Windows XP changes the card when it create  or delete files on the card.&lt;/div&gt; &lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;Enjoy the testing, It's really a fun!!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-6450971461873601647?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/6450971461873601647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=6450971461873601647' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/6450971461873601647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/6450971461873601647'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2010/12/microsd-fat32-testing-using-visual-c.html' title='microSD FAT32 testing using Visual C++'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_zqABT3suzXE/TQze-z0rWoI/AAAAAAAAAZ8/Zqn7xKq1C8Q/s72-c/2.JPG' height='72' width='72'/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-6361121885096351087</id><published>2009-01-31T02:56:00.000-08:00</published><updated>2011-05-10T22:44:06.998-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='microSD / SDHC'/><category scheme='http://www.blogger.com/atom/ns#' term='RS232'/><category scheme='http://www.blogger.com/atom/ns#' term='FAT32'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega8'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega32'/><title type='text'>SD/SDHC Card Interfacing with ATmega8 /32 (FAT32 implementation)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/SYQxS83ZYfI/AAAAAAAAAPk/GAVn6wavCGQ/s1600-h/SD_setup.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 433px; height: 262px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/SYQxS83ZYfI/AAAAAAAAAPk/GAVn6wavCGQ/s320/SD_setup.JPG" alt="" id="BLOGGER_PHOTO_ID_5297413263340429810" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;Here is my project on interfacing of SD Card (microSD). microSD cards are available very cheap nowadays, a great option for having a huge memory in any embedded system project. It is compatible with SPI bus, so the interfacing is easy.  SD card adapters are also easily available in market, one can easily make a bread-board adapter by soldering few pins on it. Following figures show the SD card pin-out &amp;amp; the bread-board adapter design by soldering 7-pins of a breakout header on the microSD adapter (Click on images for larger view).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/SYQyx7EZHAI/AAAAAAAAAPs/EcS3c3YhBTQ/s1600-h/SD_adapter1.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 194px; height: 155px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/SYQyx7EZHAI/AAAAAAAAAPs/EcS3c3YhBTQ/s200/SD_adapter1.JPG" alt="" id="BLOGGER_PHOTO_ID_5297414894945639426" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SYQzBqyMTJI/AAAAAAAAAP0/37qlijBjp1Y/s1600-h/SD_adapter2.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 169px; height: 157px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SYQzBqyMTJI/AAAAAAAAAP0/37qlijBjp1Y/s200/SD_adapter2.JPG" alt="" id="BLOGGER_PHOTO_ID_5297415165452242066" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/SYQzKx0xOKI/AAAAAAAAAP8/c9PvJ0xIrYw/s1600-h/SD_pinout.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 168px; height: 172px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/SYQzKx0xOKI/AAAAAAAAAP8/c9PvJ0xIrYw/s200/SD_pinout.JPG" alt="" id="BLOGGER_PHOTO_ID_5297415321960921250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I had started this project with 1GB microSD card from SanDisk (later on tested with transcend cards also). The microcontroller is AVR ATmega8 or ATmega32 running at &lt;span style="color: rgb(204, 0, 0);"&gt;8Mhz&lt;/span&gt; internal clock. MAX232 is used to interface the circuit with PC for monitoring the data. A 3.3v supply is used for powering the mega8, microSD and max232 (though the specified supply for max232 is 5v, it works comfortably at 3.3v).7 pins of the microSD are used here, shown in the figure of pin-out.&lt;br /&gt;&lt;br /&gt;Schematic for ATmega8 is shown here (&lt;span style="color: rgb(255, 0, 0);"&gt;updated on 10 May 2010&lt;/span&gt;, SD series resistors are removed, as they were limiting the speed of SPI bus. 51k pullups are added on CMD/DAT lines. This gives better stability with different cards. Also, two 3.6v zeners are added to protect SD in case when the ISP programmer voltage levels are of 5v. these diodes are not required if your programmer has settings for 3.3v output)&lt;br /&gt;&lt;span style="font-size:85%;"&gt;(Note: VCC &amp;amp; GND pins of MAX232 are not shown in the schematic, but they must be connected in the actual hardware)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/S-d-qSljX4I/AAAAAAAAAWA/_FbQEDRj32k/s1600/Sd_M8_Sch.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 445px; height: 285px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/S-d-qSljX4I/AAAAAAAAAWA/_FbQEDRj32k/s400/Sd_M8_Sch.JPG" alt="" id="BLOGGER_PHOTO_ID_5469479537473707906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Following is the schematic for ATmega32, without RTC (updated on &lt;span style="color: rgb(255, 0, 0);"&gt;10 May 2010&lt;/span&gt;):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/S_EhXQS-NSI/AAAAAAAAAWQ/x5kRQ3OsCoU/s1600/SD_M32.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 415px; height: 359px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/S_EhXQS-NSI/AAAAAAAAAWQ/x5kRQ3OsCoU/s400/SD_M32.JPG" alt="" id="BLOGGER_PHOTO_ID_5472191705627112738" border="0" /&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;Following is the schematic for ATmega32, with RTC (added on &lt;/span&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;17 May 2010&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;)&lt;/span&gt;. Here two supply voltages are used, 3.3v for SD &amp;amp; 5v for remaining ICs.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/S_EwMNYzDhI/AAAAAAAAAW4/MHHY0U-xAhM/s1600/SD_M32_RTC.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 424px; height: 296px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/S_EwMNYzDhI/AAAAAAAAAW4/MHHY0U-xAhM/s400/SD_M32_RTC.JPG" alt="" id="BLOGGER_PHOTO_ID_5472208008542096914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The aim of this project was to learn interfacing of SD card and to understand the data transfer in raw format as well as in FAT32 format. I started with raw data transfer, sending some data to any block of the microSD, reading a block of it, reading and writing multiple blocks, erasing multiple blocks. All this in raw format. I used RS232 for viewing the data read by microcontroller from SD card. The uc sends the data to HyperTerminal. Similarly, to write data to card, the data was fed thru HyperTerminal, by typing some text.&lt;br /&gt;&lt;br /&gt;Once raw data transfer achieved, I formatted the card with windowsXP (FAT32) and loaded it with some text files, directories and other files (all stored in root directory of the card). After that I wrote the FAT32 routines to read files, get file list (using HyperTerminal again), finding the total/free memory of card. All this data is sent to HyperTerminal by the uc.&lt;br /&gt;&lt;br /&gt;Following is the HyperTerminal window showing different options:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/Sa1oOv3FtVI/AAAAAAAAARU/-A4enDBeY-g/s1600-h/main+menu.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 218px; height: 218px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/Sa1oOv3FtVI/AAAAAAAAARU/-A4enDBeY-g/s320/main+menu.JPG" alt="" id="BLOGGER_PHOTO_ID_5309014138314667346" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Options 0 to 4 are low level functions dealing with raw data. If you use option 0, 1 or 3, you may have to reformat the card before using the FAT32 routines.&lt;br /&gt;0: Erases selected number of blocks strating from selected block&lt;br /&gt;1: Writes data to specified SD block address. Data to be entered in HyperTerminal using PC keyboard&lt;br /&gt;2: Readss data of specified SD block address. Data is displayed on HyperTerminal window&lt;br /&gt;3. Writes selected number of blocks strating from selected block&lt;br /&gt;4. Reads selected number of blocks strating from selected block&lt;br /&gt;&lt;br /&gt;Here, the multiple-block functions related to  options 3 &amp;amp; 4 are disabled due to memory constraint as that time mega8 was used for testing and these functions are not required for FAT32 testing. While testing with mega32,  options 3 &amp;amp; 4 can be enabled by removing  a macro  (#define  FAT_TESTING_ONLY) defined in SD_routines.h.&lt;br /&gt;&lt;br /&gt;Options 5 to 9 are related to FAT32 . Only short file names are supported right now, 8byte name+3bytes extension. If you store a long name file in SD, it will be displayed by these routines in short name format only.&lt;br /&gt;For testing these options, format the card with FAT32 file system and store some directories and text files (because text files can be read &amp;amp; checked thru HyperTerminal).&lt;br /&gt;&lt;br /&gt;5: Displays list of available directories and files with size (in the root directory of the card)&lt;br /&gt;6: Reads a specified file and displays the file contents on HyperTerminal&lt;br /&gt;7: Create/Append file with specified name, enter text from HyperTerminal&lt;br /&gt;8: Deletes any existing file with specified name&lt;br /&gt;9: Displays total &amp;amp; free memory of the card (using FSinfo sector of the SD card)&lt;br /&gt;&lt;br /&gt;Following figures show the HyperTerminal window when options 5 &amp;amp; 9 are selected:&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;These figures show menu from Ver2.3 or earlier. Menu style is changed from Ver_2.4 onwards, which is shown in the update history&lt;/span&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/Sa1o-E76NnI/AAAAAAAAARk/llBKemYY9WI/s1600-h/file+list.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 219px; height: 317px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/Sa1o-E76NnI/AAAAAAAAARk/llBKemYY9WI/s320/file+list.JPG" alt="" id="BLOGGER_PHOTO_ID_5309014951425881714" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/Sa1orywQ8hI/AAAAAAAAARc/VWDai3qGrE0/s1600-h/memory.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 230px; height: 257px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/Sa1orywQ8hI/AAAAAAAAARc/VWDai3qGrE0/s320/memory.JPG" alt="" id="BLOGGER_PHOTO_ID_5309014637307556370" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;Note&lt;/span&gt;: HyperTerminal is used here at 19200 baudrate, No parity, Flow Control 'none'.&lt;br /&gt;&lt;br /&gt;This project needs very few components and can be done easily at home. Try it out!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:100%;"  &gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;u&gt;&lt;br /&gt;Download the source code files from here&lt;/u&gt;&lt;/span&gt;:&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Download here the zipped source code files modified  for mega32, written in winAVR-AVRStudio.&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold; color: rgb(0, 0, 153);" href="https://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_GCC_V2.4.1_M32.zip?attredirects=0&amp;amp;d=1"&gt;Version 2.4.1 (RTC added for Date/Time entries)&lt;/a&gt;&lt;a href="http://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_GCC_V2.4_M32.zip?attredirects=0&amp;amp;d=1"&gt; &lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;17 May 2010/24 Apr 2011&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a style="font-weight: bold; color: rgb(0, 0, 153);" href="http://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_GCC_V2.3_M32.zip?attredirects=0&amp;amp;d=1"&gt;Version 2.3 (SDHC support added)&lt;/a&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; 09 May 2010&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="http://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_GCC_V2.2_M32.zip?attredirects=0&amp;amp;d=1"&gt;&lt;span style="font-weight: bold;"&gt;Version 2.2 (No SDHC support)&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;  &lt;span style="font-size:85%;"&gt;13 Sep 2009&lt;br /&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/a/dharmanitech.com/sd-mega32-code-v2-0/Home/SD_M32.sch?attredirects=0&amp;amp;d=1"&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Download EAGLE schematic file of Ver 2.4&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;Download/view source code fil&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 0);"&gt;es V2.1  (for ATmega8)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;:&lt;/span&gt;&lt;br /&gt;Following  files are compiled using winAVR inside AVRStudio. This Version does not  support SDHC cards. Also, append file feature is not available.&lt;br /&gt;1.&lt;a style="font-weight: bold;" href="http://docs.google.com/Doc?id=ddmkwx3z_31hj57x7v8"&gt; SD_main.c&lt;/a&gt;&lt;br /&gt;2.&lt;a style="font-weight: bold;" href="http://docs.google.com/Doc?id=ddmkwx3z_33ft2tprgq"&gt; SD_routines.c  &amp;amp; SD_routines.h&lt;/a&gt;&lt;br /&gt;3.&lt;a style="font-weight: bold;" href="http://docs.google.com/Doc?id=ddmkwx3z_325nttgxdb"&gt; FAT32.c &amp;amp;  FAT32.h&lt;/a&gt; (Ver 2.1, last  updated-&lt;span style="color: rgb(255, 0, 0);"&gt;13 Sep 09&lt;/span&gt;)&lt;br /&gt;4. &lt;a style="font-weight: bold;" href="http://docs.google.com/Doc?id=ddmkwx3z_34fzczvjcw"&gt;SPI_routines.c  &amp;amp; SPI_routines.h&lt;/a&gt;&lt;br /&gt;5. &lt;a style="font-weight: bold;" href="http://docs.google.com/Doc?id=ddmkwx3z_35d8tsr6fp"&gt;UART_routines.c  &amp;amp; UART_routines.h&lt;/a&gt;&lt;br /&gt;6. &lt;a style="font-weight: bold;" href="http://docs.google.com/Doc?id=ddmkwx3z_37qcjc4scg"&gt;Makefile&lt;/a&gt;&lt;br /&gt;7.  &lt;a style="font-weight: bold;" href="http://docs.google.com/Doc?id=ddmkwx3z_36cx2pgzd4"&gt;HEX file&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;  &lt;/span&gt;(&lt;span style="color: rgb(0, 0, 0);"&gt;Ver  2.1, &lt;/span&gt; last updated-&lt;span style="color: rgb(255, 0, 0);"&gt;13 Sep 09&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Please  put up a comment or mail me if you find a bug in the code. The updates  are because of valuable suggestions &amp;amp; comments from the users of  this code. Thanks a lot!!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Related posts:&lt;/span&gt;&lt;br /&gt;You can visit my post of &lt;a style="color: rgb(51, 51, 255);" href="http://www.dharmanitech.com/2011/05/microsd-atmega32-datalogger.html"&gt;microSD ATmega32 Data-Logger&lt;/a&gt;, which uses modified FAT32 library for automatically creating files without using hyper terminal.&lt;br /&gt;If you want to test &lt;/span&gt;&lt;span&gt;FAT32 functions &lt;/span&gt;or learn more without making the microcontroller hardware, you can visit my post here: &lt;a style="color: rgb(51, 51, 255);" href="http://www.dharmanitech.com/2010/12/microsd-fat32-testing-using-visual-c.html"&gt;microSD-FAT32 using Visual C++&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Update History&lt;br /&gt;&lt;/span&gt;&lt;span&gt;-----------------------------------------------------------------------------&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Version 2.4:&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/S_EkpImNChI/AAAAAAAAAWw/KIqx-DaOm6I/s1600/with+RTC.JPG"&gt;&lt;img style="float: right; margin: 0pt 0pt 10px 10px; cursor: pointer; width: 222px; height: 164px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/S_EkpImNChI/AAAAAAAAAWw/KIqx-DaOm6I/s320/with+RTC.JPG" alt="" id="BLOGGER_PHOTO_ID_5472195311332821522" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;-   Real Time Clock circuit support is added for time &amp;amp; date entries in  the files. Now the current date of file creation and file update will be  entered in the FAT table (can be viewed by checking file 'properties'  using a PC)&lt;br /&gt;(The RTC will also be useful in data-logging with  time-stamp)&lt;br /&gt;- Three more options added in the Hyper Terminal menu for  displaying or updating RTC date &amp;amp; time. New menu is shown in the  above figure.&lt;br /&gt;&lt;br /&gt;Ver 2.4.1:&lt;br /&gt;- Same as 2.4, with a bug fix for RTC: 'twi_init' function added to define I2C clock freq. 100K@ 16MHz  (50k@8MHz). This was taking default values earlier, which was as high as 500K@8MHz, not desirable&lt;br /&gt;&lt;br /&gt;(Note: Version 2.2, 2.3 &amp;amp; 2.4 are tested on  ATmega32, but they can be adopted to any controller having RAM &amp;gt;= 1KB   and Flash &amp;gt;= 16KB)&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Current  memory usage (Ver_2.4):&lt;/span&gt;  Flash: &lt;span style="color: rgb(204, 0, 0);"&gt;12908 Bytes&lt;/span&gt;;    RAM: &lt;span style="color: rgb(204, 0, 0);"&gt;700  Bytes (appx.)&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Version 2.3:&lt;/span&gt;&lt;br /&gt;-  Support for &lt;span style="font-weight: bold;"&gt;SDHC&lt;/span&gt; cards added  (tested with SanDisk &amp;amp; Transcend microSD and microSDHC cards). The  initialization sequence and command formats are modified.&lt;br /&gt;- A bug  which was causing the program flow to go into infinite loop if the  character number 512 in a sector was a CR (Carriage Return, '\r'), in  the writeFile function. Thanks to &lt;span style="color: rgb(0, 153, 0);"&gt;David&lt;/span&gt;  &amp;amp; &lt;span style="color: rgb(0, 153, 0);"&gt;Piotr M.&lt;/span&gt; who pointed  it out in the comments.&lt;br /&gt;- Code is also tested successfully at 16MHz  clock (8MHz SPI clock) with for SD/SDHC cards.&lt;br /&gt;&lt;br /&gt;Follwing are the  Hyper Terminal windows showing card detection (One  window shows  baudrate as 38400, that was while testing for higher clock  speeds,  current code still uses 19200 baud and 8MHz internal clock of  Mega32).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();}  catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/S-bMf18bkQI/AAAAAAAAAVY/fs5wjWrsP5g/s1600/high+capacity.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 226px; height: 164px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/S-bMf18bkQI/AAAAAAAAAVY/fs5wjWrsP5g/s320/high+capacity.JPG" alt="" id="BLOGGER_PHOTO_ID_5469283644916601090" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/S-bMOMXxJRI/AAAAAAAAAVQ/UBaxZxTFih8/s1600/std+capacity.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 219px; height: 160px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/S-bMOMXxJRI/AAAAAAAAAVQ/UBaxZxTFih8/s320/std+capacity.JPG" alt="" id="BLOGGER_PHOTO_ID_5469283341699196178" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Version 2.2:&lt;/span&gt;&lt;br /&gt;-  Append file feature added. 'createFile' function replaced with  writeFile, which looks for the filename first, if the given file name  doesn't exist then it creates new file and writes data, but if the file  already exists, then it opens it and appends the entered data.&lt;br /&gt;- A  bug removed which was giving error related to use of 'LONG'&lt;br /&gt;- &lt;avr h=""&gt;&lt;avr h=""&gt;The FAT32.c &amp;amp; .h files are updated on &lt;/avr&gt;&lt;/avr&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;13 Sep 09&lt;/span&gt;&lt;avr h=""&gt;&lt;avr h=""&gt; &lt;/avr&gt;&lt;/avr&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;to  remove a bug which &lt;/span&gt;&lt;/span&gt;&lt;avr h=""&gt;&lt;avr h=""&gt;was limiting file  size to 32MB (Thanks to &lt;/avr&gt;&lt;/avr&gt;&lt;span style="color: rgb(0, 153, 0);" class="gI"&gt;&lt;span class="go"&gt;Kun-Szabo Marton&lt;/span&gt;&lt;/span&gt; who pointed  it out)&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Data transfer  rate&lt;/span&gt;: 1 raw data block (512 bytes) takes 4.15ms for reading or  writing (123.37 KBytes/s) at current 4 MHz SPI clock rate.  If you have  flash more than 8k, you can declare the SPI_receive() and SPI_transmit()  functions as 'inline' functions. This will increase the transfer rate  to 140 KBytes/s. These transfer rates can be further increased by using a  16MHz crystal (8 MHz SPI clock). FAT32 file reading is done at 78 to 91  KBytes/sec.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Version 2.1&lt;/span&gt;:&lt;br /&gt;- A bug  removed which stopped creating new files after 32*8 files in the root  directory&lt;br /&gt;- The root directory was unnecessarily getting expanded by  one cluster whenever a file was created. Fixed in the new version&lt;br /&gt;-  Also, the fixed cluster size of 8 sectors is removed, this version will  support other cluster sizes as well&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Version 2.0:&lt;/span&gt;&lt;br /&gt;- Support added for SD cards having first sector as MBR rather than the boot sector&lt;br /&gt;- createFile and deleteFile functions added&lt;br /&gt;- A bug fixed in reading files stord at far locations in memory also correction made to accept 8+3 char file name (by mistake, it was taking 7+3 earlier)&lt;br /&gt;- FSinfo sector used for storing total free cluster count &amp;amp;&lt;br /&gt;next free cluster number for faster file access&lt;br /&gt;- Instant freeMemory display (earlier it was taking more than 30secs) using FSinfo sector. FSinfo sector is updated now whenever a file is created or deleted&lt;br /&gt;- File memory size display in decimal, like windows (earlier it was in hex)&lt;br /&gt;- Raw SD functions multiple block read and write, which are not required for FAT32, are disabled using FAT32_TESTING_ONLY macro for getting extra space required by createFile &amp;amp; deleteFile changes (you can activate it if you have more than 8k flash) Right now flash is 99.9% full&lt;br /&gt;- Clock speed raised from 1Mhz to 8 MHz, new SPI speed (after SD initialization): 4MHz instead of 500K &amp;amp; baudrate: 19200 (for HyperTerminal) instead of 4800&lt;br /&gt;-------------------------------------------------------------------------------&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;avr h=""&gt;&lt;avr h=""&gt;&lt;/avr&gt;&lt;/avr&gt;&lt;avr h=""&gt;&lt;avr h=""&gt;&lt;/avr&gt;&lt;/avr&gt;&lt;avr h=""&gt;&lt;avr h=""&gt;&lt;span style="font-weight: bold;"&gt;References:&lt;/span&gt;&lt;br /&gt;1. &lt;a href="http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/fatgen103.doc"&gt;Microsoft's FAT32 specification document&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.cs.ucr.edu/%7Eamitra/sdcard/ProdManualSDCardv1.9.pdf"&gt;SanDisk SD mnual v1.9&lt;/a&gt;&lt;br /&gt;3. &lt;a href="http://www.sdcard.org/developers/tech/sdcard/pls/Simplified_Physical_Layer_Spec.pdf"&gt;SD-Simplified Physical Layer Spec. Ver 2.00&lt;/a&gt;&lt;br /&gt;4. &lt;a href="http://www.cs.ucr.edu/%7Eamitra/sdcard/Additional/sdcard_appnote_foust.pdf"&gt;F. Foust's Application Note on  SD&lt;/a&gt;&lt;br /&gt;5. &lt;a href="http://home.teleport.com/%7Ebrainy/fat32.htm"&gt;FAT32 Structure info, includes MBR details&lt;/a&gt;&lt;br /&gt;6. &lt;a href="http://www.pjrc.com/tech/8051/ide/fat32.html"&gt;Simple FAT32 Structure explanation&lt;/a&gt;&lt;br /&gt;&lt;/avr&gt;&lt;/avr&gt;&lt;avr h=""&gt;&lt;avr h=""&gt;7. &lt;a href="http://elm-chan.org/fsw/ff/00index_e.html"&gt;Chan's FAT library&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;ccd@dharmanitech.com&lt;/avr&gt;&lt;/avr&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-6361121885096351087?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/6361121885096351087/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=6361121885096351087' title='588 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/6361121885096351087'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/6361121885096351087'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html' title='SD/SDHC Card Interfacing with ATmega8 /32 (FAT32 implementation)'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_zqABT3suzXE/SYQxS83ZYfI/AAAAAAAAAPk/GAVn6wavCGQ/s72-c/SD_setup.JPG' height='72' width='72'/><thr:total>588</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-2943865233003721549</id><published>2009-01-09T04:30:00.000-08:00</published><updated>2011-05-15T07:30:03.473-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PWM'/><category scheme='http://www.blogger.com/atom/ns#' term='RC Car'/><category scheme='http://www.blogger.com/atom/ns#' term='Motor Control'/><category scheme='http://www.blogger.com/atom/ns#' term='IR'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega8'/><title type='text'>IR Remote Controlled Car (PWM motor control using ATmega8)</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SXDd_hCBTjI/AAAAAAAAAPE/ximVrniDyCY/s1600-h/IR_car2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 441px; height: 328px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SXDd_hCBTjI/AAAAAAAAAPE/ximVrniDyCY/s320/IR_car2.JPG" alt="" id="BLOGGER_PHOTO_ID_5291973645428674098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SXDdzV6--FI/AAAAAAAAAO8/_cfqsbTkiTo/s1600-h/IR_car1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 450px; height: 336px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SXDdzV6--FI/AAAAAAAAAO8/_cfqsbTkiTo/s320/IR_car1.JPG" alt="" id="BLOGGER_PHOTO_ID_5291973436287940690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi Friends,&lt;br /&gt;in my last post of &lt;a href="http://www.dharmanitech.com/2008/11/small-dc-motor-control-by-pwm-method.html"&gt;Simple DC motor Control&lt;/a&gt;, I've discussed controlling a small DC motor using the PWM method with MOSFET H-bridge. The circuit was build with microcontroller ATmega8.&lt;br /&gt;Here, I'm extending the same circuit to control the DC motor with IR remote control. The motor is fitted on a toy car wheels with gears, as shown in the figure above.&lt;br /&gt;&lt;br /&gt;Following is the schematic (Click on the image to enlarge it):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SWdGRxwryhI/AAAAAAAAAO0/hNE8QgDCee8/s1600-h/IR+controlled+car.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 405px; height: 230px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SWdGRxwryhI/AAAAAAAAAO0/hNE8QgDCee8/s320/IR+controlled+car.JPG" alt="" id="BLOGGER_PHOTO_ID_5289273558599191058" border="0" /&gt;&lt;/a&gt;The circuit uses two PWM channels of ATmega8 for controlling the speed and direction (reverse, forward) of the car, based on the command received from the IR remote. Here, a Sony TV remote was used. The IR codes were received by using TSOP1738 IR detector from Vishay. (Thanks a lot to Michael Spiceland from &lt;a href="http://tinkerish.com/blog/"&gt;tinkerish.com&lt;/a&gt;, for helping me out with the code for IR signal decoding!).&lt;br /&gt;&lt;br /&gt;Following buttons on the remote are used for control:&lt;br /&gt;'1' : Start motor&lt;br /&gt;Volume+ : Increase speed&lt;br /&gt;Volume-: Reduce speed&lt;br /&gt;Channel+: Forward direction&lt;br /&gt;Channel-: Reverse Direction&lt;br /&gt;'0': Stop motor&lt;br /&gt;&lt;br /&gt;Check out the video (the LED blinks whenevr a key on the remote is pressed. The remote is not visible in the video as I was holding the camera and remote both!!)&lt;br /&gt;&lt;br /&gt;&lt;object width="335" height="278" class="BLOG_video_class" id="BLOG_video-1ca53d3ee97801ad" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"&gt;&lt;param name="movie" value="http://www.youtube.com/get_player"&gt;&lt;param name="bgcolor" value="#FFFFFF"&gt;&lt;param name="allowfullscreen" value="true"&gt;&lt;param name="flashvars" value="flvurl=http://v21.nonxt3.googlevideo.com/videoplayback?id%3D1ca53d3ee97801ad%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330191354%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D291D41157D8BF42E8E75F8CA993745949B447317.512F24162D891F7C7336FAE8501B9230B58EC655%26key%3Dck1&amp;amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D1ca53d3ee97801ad%26offsetms%3D5000%26itag%3Dw160%26sigh%3DjUI60SSC8pC8vBMCwhsnFlQ6VbY&amp;amp;autoplay=0&amp;amp;ps=blogger"&gt;&lt;embed src="http://www.youtube.com/get_player" type="application/x-shockwave-flash"width="335" height="278" bgcolor="#FFFFFF"flashvars="flvurl=http://v21.nonxt3.googlevideo.com/videoplayback?id%3D1ca53d3ee97801ad%26itag%3D5%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1330191354%26sparams%3Did,itag,ip,ipbits,expire%26signature%3D291D41157D8BF42E8E75F8CA993745949B447317.512F24162D891F7C7336FAE8501B9230B58EC655%26key%3Dck1&amp;iurl=http://video.google.com/ThumbnailServer2?app%3Dblogger%26contentid%3D1ca53d3ee97801ad%26offsetms%3D5000%26itag%3Dw160%26sigh%3DjUI60SSC8pC8vBMCwhsnFlQ6VbY&amp;autoplay=0&amp;ps=blogger"allowFullScreen="true" /&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;The coding is done with ICCAVR compiler. It can be easily adapted to other compilers with minor changes. Complete code is given here:&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold; color: rgb(0, 0, 153);" href="http://docs.google.com/Doc?id=ddmkwx3z_24dh6npfg2"&gt;View Code on Google Docs&lt;/a&gt;&lt;br /&gt;&lt;a style="font-weight: bold; color: rgb(0, 0, 153);" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/IRPWM.zip?attredirects=0&amp;amp;d=1"&gt;Download source code files (zip)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download datasheet &amp;amp; further info:&lt;br /&gt;&lt;a href="http://www.alldatasheet.com/datasheet-pdf/pdf/26589/VISAY/TSOP1738.html"&gt;TSOP1738 datasheet&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.sbprojects.com/knowledge/ir/sirc.htm"&gt;Info on Sony remote control codes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks &amp;amp; Regards,&lt;br /&gt;ccd@dharmanitech.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-2943865233003721549?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/2943865233003721549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=2943865233003721549' title='50 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/2943865233003721549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/2943865233003721549'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2009/01/ir-remote-controlled-car-pwm-motor.html' title='IR Remote Controlled Car (PWM motor control using ATmega8)'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zqABT3suzXE/SXDd_hCBTjI/AAAAAAAAAPE/ximVrniDyCY/s72-c/IR_car2.JPG' height='72' width='72'/><thr:total>50</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-5843344276379662232</id><published>2008-11-30T05:09:00.000-08:00</published><updated>2011-05-15T07:17:04.298-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='4x4 matrix keyboard'/><category scheme='http://www.blogger.com/atom/ns#' term='LCD'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega32'/><title type='text'>4x4 Matrix Key-board Interfacing with ATmega32</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/STKQ8yUTHkI/AAAAAAAAANs/ajOESHMhIXM/s1600-h/Matrix_Keypad.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 385px; height: 242px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/STKQ8yUTHkI/AAAAAAAAANs/ajOESHMhIXM/s320/Matrix_Keypad.JPG" alt="" id="BLOGGER_PHOTO_ID_5274437487577734722" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi guys,&lt;br /&gt;Here is a project for beginners to interface a 16-key (4x4) keypad with ATmega32 using 8-pins i.e. one port of the microcontroller. This is useful particularly where we need more keys but don't want to spend more uC pins for interfacing.&lt;br /&gt;The 4x4 keypad is a standard one available in the market. I've used here one from my &lt;a href="http://www.dharmanitech.com/2008/10/home-made-double-layer-atmega32-pcb-for.html"&gt;earlier project&lt;/a&gt;. The LED shown in the schematic is just extra, which can be used anyway you like.&lt;br /&gt;Here, the mega32 reads the code of key pressed and sends relevant character to display on LCD 2nd line. The first line displays 'WELCOME' all the time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download&lt;/span&gt;&lt;br /&gt;------------------&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/matrixKBwinAVR.zip?attredirects=0&amp;amp;d=1"&gt;&lt;span style="font-weight: bold;"&gt;Source Code&lt;/span&gt; (AVR-GCC, winAVR, AVRStudio format)&lt;/a&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/Matrix_KBCodeVision.zip?attredirects=0&amp;amp;d=1"&gt;&lt;span style="font-weight: bold;"&gt;Source Code&lt;/span&gt; (CodeVision AVR format)&lt;/a&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/matrixKB4bitLCD.zip?attredirects=0&amp;amp;d=1"&gt;&lt;span style="font-weight: bold;"&gt;Source Code&lt;/span&gt; with &lt;span style="font-weight: bold;"&gt;4-bit LCD&lt;/span&gt; Implementation (ICCAVR)&lt;/a&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="http://docs.google.com/Doc?id=ddmkwx3z_21fb4jxzhc"&gt;&lt;span&gt;&lt;span style="font-weight: bold;"&gt;Source Code&lt;/span&gt; (ICCAVR) with &lt;span style="font-weight: bold;"&gt;Schematic&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 153);"&gt; on Google Docs&lt;/span&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="http://docs.google.com/Doc?id=ddmkwx3z_23d7hsb5fm"&gt;&lt;span style="font-weight: bold;"&gt;HEX file&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-5843344276379662232?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/5843344276379662232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=5843344276379662232' title='41 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5843344276379662232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5843344276379662232'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/11/4x4-matrix-key-board-interfacing-with.html' title='4x4 Matrix Key-board Interfacing with ATmega32'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_zqABT3suzXE/STKQ8yUTHkI/AAAAAAAAANs/ajOESHMhIXM/s72-c/Matrix_Keypad.JPG' height='72' width='72'/><thr:total>41</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-9039620861672238579</id><published>2008-11-22T11:31:00.001-08:00</published><updated>2011-05-15T07:23:06.295-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PWM'/><category scheme='http://www.blogger.com/atom/ns#' term='Motor Control'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega8'/><title type='text'>Simple PWM DC motor control using MOSFET H-Bridge with AVR ATmega8</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SSheqD8W9UI/AAAAAAAAANE/Vky1CYC_CBc/s1600-h/motor+control+hardware.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 361px; height: 294px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SSheqD8W9UI/AAAAAAAAANE/Vky1CYC_CBc/s320/motor+control+hardware.JPG" alt="" id="BLOGGER_PHOTO_ID_5271567440543151426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;here is a very simple project of controlling a small DC-motor (taken from an old personal cassette player) with ATmega8. The ATmega8 is having three PWM channels, out of which two are used here. PWM waveforms are fed to MOSFET (RFD3055) H-bridge.&lt;br /&gt;Here, direction is controlled using a two-position toggle switch and speed of the motor is controlled by two push-buttons, one for increasing the speed and other for reducing.&lt;br /&gt;The schematic is geiven here (click on the image to enlarge):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SShhr5Lur9I/AAAAAAAAANU/ap-j59gZL6o/s1600-h/motor+control+sch.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 397px; height: 239px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SShhr5Lur9I/AAAAAAAAANU/ap-j59gZL6o/s320/motor+control+sch.JPG" alt="" id="BLOGGER_PHOTO_ID_5271570770549452754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;When switch SW1 is closed, OC1A channel is active which will feed the PWM signal to Q1 &amp;amp; Q4 MOSFETs. The OC1B pin will remain low keeping the Q3 &amp;amp; Q2 in OFF condition. When SW1 is toggled to open position, OC1A pin will become low, making Q1 &amp;amp; Q4 OFF and OC1B will feed the PWM signal to Q3 &amp;amp; Q2, resulting in the change in the direction of current flow hrough motor. Hence, motor rotation direction will change.&lt;br /&gt;The speed is controlled by Push-buttons S2 &amp;amp; S3. Pressing S2 will increase the speed in fixed steps. Similarly, pressing S3 will reduce the speed in fixed steps.&lt;br /&gt;&lt;br /&gt;The closer look to the motor and the circuit:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SShjUgtzkQI/AAAAAAAAANc/iq5YQhBmlss/s1600-h/motor.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 194px; height: 156px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SShjUgtzkQI/AAAAAAAAANc/iq5YQhBmlss/s200/motor.JPG" alt="" id="BLOGGER_PHOTO_ID_5271572567867756802" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SShjhWRo50I/AAAAAAAAANk/DZRYCPQYsqM/s1600-h/circuit.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 232px; height: 156px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SShjhWRo50I/AAAAAAAAANk/DZRYCPQYsqM/s200/circuit.JPG" alt="" id="BLOGGER_PHOTO_ID_5271572788403562306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here on the bread-board, I've used two push-buttons but the direction control switch is replaced by a small wire which was connected to ground or kept open for changing the direction (since I was not having the toggle switch in stock at the moment). The bread-board also includes 6-pin In-System Programming connector which is not shown in the schematic.&lt;br /&gt;&lt;br /&gt;(The InSystemProgramming (ISP) connector is shown in my earlier posts, hence omitted here!! But, if you are new to ISP, refer to my post &lt;a href="http://www.dharmanitech.com/2008/09/diy-avr-programmers.html"&gt;DIY AVR Programmers&lt;/a&gt; to make one yourself!!)&lt;br /&gt;&lt;br /&gt;The schematic and code for this PWM motor control can be downloaded from here:&lt;br /&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="http://docs.google.com/Doc?id=ddmkwx3z_16gg6kmdhp"&gt;&lt;span style="font-weight: bold;"&gt;Schematic &amp;amp; Code&lt;/span&gt;&lt;/a&gt;&lt;span style="color: rgb(0, 0, 153);"&gt; on Google Docs&lt;/span&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/PWM_CodeVision.c?attredirects=0&amp;amp;d=1"&gt;&lt;span style="font-weight: bold;"&gt;Source code in CodeVision format (C file)&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Download datasheet: &lt;a href="http://www.datasheetcatalog.org/datasheets/90/346683_DS.pdf"&gt;RFD3055&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks!&lt;br /&gt;---------&lt;br /&gt;ccd@dharmanitech.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-9039620861672238579?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/9039620861672238579/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=9039620861672238579' title='74 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/9039620861672238579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/9039620861672238579'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/11/small-dc-motor-control-by-pwm-method.html' title='Simple PWM DC motor control using MOSFET H-Bridge with AVR ATmega8'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_zqABT3suzXE/SSheqD8W9UI/AAAAAAAAANE/Vky1CYC_CBc/s72-c/motor+control+hardware.JPG' height='72' width='72'/><thr:total>74</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-7021048192773187951</id><published>2008-10-20T09:53:00.000-07:00</published><updated>2010-12-18T07:57:57.487-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LCD'/><category scheme='http://www.blogger.com/atom/ns#' term='ADC'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega32'/><title type='text'>8-Channel ADC Project with ATmega32</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/SPy-OADwqkI/AAAAAAAAAMA/OflKt1cPtJo/s1600-h/ch0.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 222px; height: 102px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/SPy-OADwqkI/AAAAAAAAAMA/OflKt1cPtJo/s320/ch0.jpg" alt="" id="BLOGGER_PHOTO_ID_5259287612605114946" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SPy-U-SQgbI/AAAAAAAAAMI/oOnix-bAXT8/s1600-h/ch1.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 215px; height: 103px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SPy-U-SQgbI/AAAAAAAAAMI/oOnix-bAXT8/s320/ch1.jpg" alt="" id="BLOGGER_PHOTO_ID_5259287732388135346" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;here is a small project of Analog to Digital Converter using ATmega32 which is having on-chip 8-channel ADC.&lt;br /&gt;The circuit also consists of an intelligent 16x2 LCD for displaying the value of the voltage applied at each channel. There is also a push-button to scroll throgh the different channels. The schematic is as shown in the figure:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SPy971BeigI/AAAAAAAAAL4/ybW_9fxT4Jw/s1600-h/ADC+Testing.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 350px; height: 344px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SPy971BeigI/AAAAAAAAAL4/ybW_9fxT4Jw/s320/ADC+Testing.JPG" alt="" id="BLOGGER_PHOTO_ID_5259287300405103106" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;When powered on, the LCD displays"ADC Testing.." on the first line and the value of the voltage applied at the channel0 on the second line. When the push-button is pressed, the second line displays the value of channel1. Like-wise, all the channels can be checked one-by-one by pressing   the push-button. The channel count will roll back to channel0 after going to channel7.&lt;br /&gt;&lt;br /&gt;The displays shown in the pictures on top show values at channel0 and channel1. Here a AA battery was connected to channel0 and the channel1 was connected with the +5v supply.&lt;br /&gt;A 9-pin connector is used for ADC, 8 ADC channel pins and 1 ground pin. (the values displayed on LCD will fluctuate for a channel if nothing is connected to that channel)&lt;br /&gt;&lt;br /&gt;The software is created in C using ImageCraft ICCAVR compiler.&lt;br /&gt;The Schematic and code for this project can be downloaded here:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt; &lt;a href="http://docs.google.com/Doc?id=ddmkwx3z_11ggxpm6f9"&gt;Download Schematic and Code&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://docs.google.com/Doc?id=ddmkwx3z_14c3f879cv"&gt;&lt;span style="font-weight: bold;"&gt;Download HEX file&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks!!&lt;br /&gt;-----------&lt;br /&gt;ccd@dharmanitech.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-7021048192773187951?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/7021048192773187951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=7021048192773187951' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/7021048192773187951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/7021048192773187951'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/10/adc-project-with-atmega32.html' title='8-Channel ADC Project with ATmega32'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_zqABT3suzXE/SPy-OADwqkI/AAAAAAAAAMA/OflKt1cPtJo/s72-c/ch0.jpg' height='72' width='72'/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-3579903142872364657</id><published>2008-10-09T06:13:00.001-07:00</published><updated>2010-12-18T07:56:16.173-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='4x4 matrix keyboard'/><category scheme='http://www.blogger.com/atom/ns#' term='DIY (Do-It-Yourself)'/><category scheme='http://www.blogger.com/atom/ns#' term='LCD'/><category scheme='http://www.blogger.com/atom/ns#' term='RS422'/><category scheme='http://www.blogger.com/atom/ns#' term='RS232'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega32'/><title type='text'>Home-made Double Layer ATmega32 PCB for RS232/RS422 Communication testing</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SO4D8m7FqcI/AAAAAAAAALQ/9yb4TgmIDpE/s1600-h/pcb_ready.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 223px; height: 214px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SO4D8m7FqcI/AAAAAAAAALQ/9yb4TgmIDpE/s320/pcb_ready.JPG" alt="" id="BLOGGER_PHOTO_ID_5255142154963364290" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/SO4ED8eLUbI/AAAAAAAAALY/lLKg459WWR8/s1600-h/pcb_working.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 230px; height: 213px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/SO4ED8eLUbI/AAAAAAAAALY/lLKg459WWR8/s320/pcb_working.JPG" alt="" id="BLOGGER_PHOTO_ID_5255142281006764466" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hi guys,&lt;br /&gt;after making my single layer starter's kit &lt;a href="http://www.dharmanitech.com/2008/08/make-yourself-atmega32-starters-kit.html"&gt;M32_Card&lt;/a&gt;, I was looking for making a double layer M32 PCB at home. So, here is my attempt to make it. Well, it didn't turn out to be as difficult as I had thought it to be earlier. I had to dump one PCB before making this one as the top-layer routine was not solder-friendly!!&lt;br /&gt;&lt;br /&gt;I've made this one mainly for an application where RS232 &amp;amp; RS422 testing was required. It uses MAX232 &amp;amp; MAX488 ICs from for those serial communication. Selection between RS232 &amp;amp; RS422 is through jumpers. The board is using ATmega32 controller, just like my single layer pcb. It also has 4x4 matrix keyboard, an LCD interface, ADC connector, SPI connector (for In System Programming), a reset switch and an LED for beginner's programming. It operates with the standard 12v DC adapter.&lt;br /&gt;&lt;br /&gt;Here is the schematic (click on the image to enlarge):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SO4Gq9kRthI/AAAAAAAAALg/ZomAlPlnooQ/s1600-h/schematic.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 387px; height: 308px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SO4Gq9kRthI/AAAAAAAAALg/ZomAlPlnooQ/s320/schematic.JPG" alt="" id="BLOGGER_PHOTO_ID_5255145150338938386" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;There is a small mistake here in the schematic, the RX/TX pin connections in the RS232 connector are swapped, which I found while testing the PCB. So, I had to correct it by cutting those two tracks and placing jumpers. After the correction, the communication with PC was established.  The schematic is similar to the M32_Card, accept that I've removed the RTC DS1307 and placed the MAX488. Also, the individual push buttons are replaced with the 16 key matrix key-board.&lt;br /&gt;Click here to get more info and for downloading code to &lt;a href="http://www.dharmanitech.com/2008/11/4x4-matrix-key-board-interfacing-with.html"&gt;interface the 4x4 matrix keyboard&lt;/a&gt; shown here&lt;br /&gt;&lt;br /&gt;The PCB  etching is done with Ferric Chloride. In making the double layer PCB, as I don't have any PTH (printed through holes) facility, I've put small pieces of single core wire into the holes and soldered both sides. Check out the top and bottom layers here&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SO4ILwTACJI/AAAAAAAAALo/9LiM8SbaWFM/s1600-h/top+layer.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 218px; height: 205px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SO4ILwTACJI/AAAAAAAAALo/9LiM8SbaWFM/s320/top+layer.JPG" alt="" id="BLOGGER_PHOTO_ID_5255146813224126610" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SO4Ic39srDI/AAAAAAAAALw/7mJ_nb8z5us/s1600-h/bottom+layer.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 233px; height: 203px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SO4Ic39srDI/AAAAAAAAALw/7mJ_nb8z5us/s320/bottom+layer.JPG" alt="" id="BLOGGER_PHOTO_ID_5255147107340037170" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If you have an application where the circuit can not be contained in a single layer, a home-made double layer PCB is worth a try!!&lt;br /&gt;&lt;br /&gt;Thanks!&lt;br /&gt;---------&lt;br /&gt;ccd@dharmanitech.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-3579903142872364657?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/3579903142872364657/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=3579903142872364657' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/3579903142872364657'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/3579903142872364657'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/10/home-made-double-layer-atmega32-pcb-for.html' title='Home-made Double Layer ATmega32 PCB for RS232/RS422 Communication testing'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_zqABT3suzXE/SO4D8m7FqcI/AAAAAAAAALQ/9yb4TgmIDpE/s72-c/pcb_ready.JPG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-3552413638300268938</id><published>2008-10-03T06:19:00.000-07:00</published><updated>2011-05-15T06:45:31.757-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SPI'/><category scheme='http://www.blogger.com/atom/ns#' term='i2c'/><category scheme='http://www.blogger.com/atom/ns#' term='Nokia 3310 LCD'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega8'/><category scheme='http://www.blogger.com/atom/ns#' term='Thermometer'/><category scheme='http://www.blogger.com/atom/ns#' term='3310 LCD'/><title type='text'>Thermometer using DS1621 and Nokia 3310 LCD interfaced with ATmega8</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SOYcz-aAjvI/AAAAAAAAAKw/I8ZdIwcbt_M/s1600-h/Thermometer.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 441px; height: 293px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SOYcz-aAjvI/AAAAAAAAAKw/I8ZdIwcbt_M/s320/Thermometer.JPG" alt="" id="BLOGGER_PHOTO_ID_5252917694625255154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;in my last post I had discussed &lt;a href="http://www.dharmanitech.com/2008/09/nokia-3310-lcd-interfacing-with-atmega8.html"&gt;Nokia 3310 LCD interfacing with AVR ATmega8&lt;/a&gt;. It's really fun to work with this LCD.&lt;br /&gt;&lt;br /&gt;Now, here I'm presenting one application with the same LCD: Designing a thermometer using DS1621 temperature sensor IC. DS1621 is 8-pin sensor from Maxim, with temp range of -55 to +125 degree C, which can be interfaced with microcontroller over two-wire serial i2c bus. It has operating voltage range from 2.7 to 5.5v. I'm operating it here at 3.3v, same as the one driving the LCD and ATmega8. DS1621 doesn't require any external components to measure temperature. It has got continuous or one-shot temperature reading capability to save power.&lt;br /&gt;Check out the schematic:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SOYflGhdBbI/AAAAAAAAAK4/mtbjy7myWeg/s1600-h/thermo_sch.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 354px; height: 254px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SOYflGhdBbI/AAAAAAAAAK4/mtbjy7myWeg/s320/thermo_sch.JPG" alt="" id="BLOGGER_PHOTO_ID_5252920737640809906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I'm using here LM317 for getting 3.3v supply, any 3.3v rgulator can be used to replace it. The LED is only for checking the health of the circuit incase nothing comes up on display. The circuit is programmed to update temperature appx. every second.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SOYhRV8_mgI/AAAAAAAAALA/rw8OjpMAmZk/s1600-h/thermo_screen.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 218px; height: 186px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SOYhRV8_mgI/AAAAAAAAALA/rw8OjpMAmZk/s320/thermo_screen.JPG" alt="" id="BLOGGER_PHOTO_ID_5252922597208726018" border="0" /&gt;&lt;/a&gt;I've taken help of LFG application for generating different sizes of fonts for the LCD, thanks o the author M.Ebrahimy. The application can be downloaded from here:&lt;br /&gt;&lt;a href="http://www.elvand.com/en/Download.asp"&gt;LCD Font Generator&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I've created library functions for DS1621 interface with AVR using ICCAVR compiler. This functions can be used with i2c base routines discussed in my earlier posts. You can download the project source code here.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download&lt;/span&gt;&lt;br /&gt;------------------&lt;br /&gt;&lt;a href="http://docs.google.com/Doc?id=ddmkwx3z_15d9p47cgq"&gt;&lt;span style="font-weight: bold;"&gt;HEX file&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/3310Thermometer.zip?attredirects=0&amp;amp;d=1"&gt;Source code&lt;/a&gt; &lt;span style="color: rgb(0, 0, 153);"&gt;(including the 3310 &amp;amp; DS1621 Libraries)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(Do you wanna use this HEX file but don't want my name on the display?? Well, just learn how to play with hex file from &lt;a href="http://www.keil.com/support/docs/1584.htm"&gt;intel HEX-file tutorial&lt;/a&gt;, find ascii characters of my name in the hex file and replace them with yours!!)&lt;br /&gt;&lt;br /&gt;Download Datasheets:&lt;br /&gt;    1. &lt;a href="http://pdfserv.maxim-ic.com/en/ds/DS1621.pdf"&gt;DS1621&lt;/a&gt;&lt;br /&gt;    2. &lt;a href="http://www.atmel.com/dyn/resources/prod_documents/2486s.pdf"&gt;ATmega8&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks!!&lt;br /&gt;---------&lt;br /&gt;Contact: ccd@dharmanitech.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-3552413638300268938?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/3552413638300268938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=3552413638300268938' title='58 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/3552413638300268938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/3552413638300268938'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/10/thermometer-design-using-ds1621.html' title='Thermometer using DS1621 and Nokia 3310 LCD interfaced with ATmega8'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_zqABT3suzXE/SOYcz-aAjvI/AAAAAAAAAKw/I8ZdIwcbt_M/s72-c/Thermometer.JPG' height='72' width='72'/><thr:total>58</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-5224989857586891308</id><published>2008-09-21T12:17:00.000-07:00</published><updated>2011-05-15T06:46:37.356-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SPI'/><category scheme='http://www.blogger.com/atom/ns#' term='Nokia 3310 LCD'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega8'/><category scheme='http://www.blogger.com/atom/ns#' term='3310 LCD'/><title type='text'>NOKIA 3310 LCD interfacing with ATmega8</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SNevCf2bHAI/AAAAAAAAAJg/IA94AT-DB3w/s1600-h/setup.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 426px; height: 350px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SNevCf2bHAI/AAAAAAAAAJg/IA94AT-DB3w/s320/setup.jpg" alt="" id="BLOGGER_PHOTO_ID_5248856348167969794" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SNex_dIBunI/AAAAAAAAAJw/DD-JUromt-E/s1600-h/lcd+back-2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 433px; height: 191px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SNex_dIBunI/AAAAAAAAAJw/DD-JUromt-E/s320/lcd+back-2.JPG" alt="" id="BLOGGER_PHOTO_ID_5248859594431773298" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;&lt;div&gt;using graphic LCD in a project gives itreally a good look and flexibility of displaying different characters and shapes. But, the graphic LCDs are quite costly. &lt;/div&gt;&lt;div&gt;The NOKIA 3310 LCD provides a really low-cost solution to add a small graphic display into your project and also good for learning purpose. The LCD  is SPI bus compatible, saving many pins for other uses. It operates at 3.3v.&lt;br /&gt;&lt;br /&gt;Here is a small circuit for interfacing the 3310 LCD with AVR microcontroller ATmega8. The schematic includes LCD connection with SPI port of ATmega8 with other connections required by LCD. The 3.3v is generated using adjustable voltage regulator LM317 (I was not having any 3.3v regulator at the moment). An LED is also connected with microcontroller just for making sure that the controller is working, particularly when you don't see anything on the display!&lt;br /&gt;&lt;br /&gt;Here is the schematic and the pin details of the LCD (click on the image to enlarge it):&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SVy-AeDWE9I/AAAAAAAAAOc/H5jpo4xaCEc/s1600-h/schematic.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 399px; height: 288px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SVy-AeDWE9I/AAAAAAAAAOc/H5jpo4xaCEc/s320/schematic.JPG" alt="" id="BLOGGER_PHOTO_ID_5286308977902490578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/SNeu4LOFkqI/AAAAAAAAAJY/AV2PgnYkv7s/s1600-h/screens.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 418px; height: 196px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/SNeu4LOFkqI/AAAAAAAAAJY/AV2PgnYkv7s/s320/screens.JPG" alt="" id="BLOGGER_PHOTO_ID_5248856170831385250" border="0" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;br /&gt;The connector of LCD is 'touch' type. So, I made a small connecor PCB with tracks touching to the pins of LCD. The pcb was pasted at backside of LCD using cello tapes as shown in the back-view image&lt;br /&gt;.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SNe0UjYUMbI/AAAAAAAAAKA/uoFwXYBugGo/s1600-h/lcd+back+n+pcbs.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 447px; height: 248px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SNe0UjYUMbI/AAAAAAAAAKA/uoFwXYBugGo/s320/lcd+back+n+pcbs.JPG" alt="" id="BLOGGER_PHOTO_ID_5248862155911213490" border="0" /&gt;&lt;/a&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;  &lt;/div&gt;&lt;div&gt;  &lt;/div&gt; &lt;div&gt;&lt;div&gt; &lt;/div&gt; &lt;/div&gt; &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SNajqOcIq2I/AAAAAAAAAIo/M9vF5xC2XAM/s1600-h/BackView.jpg"&gt;&lt;/a&gt;&lt;div&gt; &lt;/div&gt; &lt;div&gt;&lt;div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div&gt;&lt;div&gt; &lt;/div&gt; &lt;/div&gt;&lt;div&gt;&lt;div&gt; &lt;/div&gt; &lt;/div&gt;&lt;br /&gt;The program routines are written in C with ICCAVR compiler. I've created a library for this display. The low-cost, easy availability has made me relly like this display.&lt;br /&gt;I'm going to use it for &lt;div&gt;  &lt;/div&gt; doing other stuffs, too!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;----------------&lt;/span&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/NOKIA_3310LCD_routines.zip?attredirects=0&amp;amp;d=1"&gt;3310 Library (ICCAVR)&lt;/a&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/3310_routines_GCC.zip?attredirects=0&amp;amp;d=1"&gt;3310 Library (AVR-GCC, winAVR, AVRStudio)&lt;/a&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/3310LCD_CV.zip?attredirects=0&amp;amp;d=1"&gt;3310 project  (CodeVision AVR)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Check out my thermometer project with this display:&lt;br /&gt;&lt;a href="http://www.dharmanitech.com/2008/10/thermometer-design-using-ds1621.html"&gt;Thermometer with Nokia3310&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download datasheets:&lt;br /&gt;1. &lt;a href="http://www.google.co.in/url?sa=t&amp;amp;source=web&amp;amp;ct=res&amp;amp;cd=1&amp;amp;url=http%3A%2F%2Fwww.atmel.com%2Fdyn%2Fresources%2Fprod_documents%2F2486s.pdf&amp;amp;ei=UanWSLODHone6QOr2PSFDg&amp;amp;usg=AFQjCNE5C2A2W-LVHnko5370shoLZVmTtA&amp;amp;sig2=acgo9T4XmnX4QGNmqHSzUg"&gt;ATmega8&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.nxp.com/acrobat_download/datasheets/PCD8544_1.pdf"&gt;PCD8544 - nokia 3310 display controller&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thanks!!&lt;br /&gt;--------&lt;br /&gt;ccd@dharmanitech.com&lt;br /&gt;&lt;div&gt;  &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-5224989857586891308?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/5224989857586891308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=5224989857586891308' title='87 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5224989857586891308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5224989857586891308'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/09/nokia-3310-lcd-interfacing-with-atmega8.html' title='NOKIA 3310 LCD interfacing with ATmega8'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zqABT3suzXE/SNevCf2bHAI/AAAAAAAAAJg/IA94AT-DB3w/s72-c/setup.jpg' height='72' width='72'/><thr:total>87</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-4070966362940116246</id><published>2008-09-13T15:09:00.000-07:00</published><updated>2011-05-15T07:07:48.755-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Acquisition'/><category scheme='http://www.blogger.com/atom/ns#' term='M32 Starter&apos;s Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='ADC'/><title type='text'>Using M32_Card for Data Acquisition with on-board 8 channnel ADC</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SMw7qdDl2lI/AAAAAAAAAHg/Ja1blCRGTvQ/s1600-h/ccd1.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 123px; height: 250px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SMw7qdDl2lI/AAAAAAAAAHg/Ja1blCRGTvQ/s200/ccd1.JPG" alt="" id="BLOGGER_PHOTO_ID_5245633266520021586" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SMw_o3ibcqI/AAAAAAAAAHo/bInRE2nKMBE/s1600-h/M32_1.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 322px; height: 236px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SMw_o3ibcqI/AAAAAAAAAHo/bInRE2nKMBE/s200/M32_1.jpg" alt="" id="BLOGGER_PHOTO_ID_5245637637315457698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;I'm showing here  one more application of the home-made M32_Card discussed in my earlier post. The microcontroller of the card is having 8-channel, 10 bit resolution ADC which can be used for analog data acquisition. Using the hyper terminal for the selection of menu, ADC can be selected to display value of the analog voltage applied to each channel (at the 9-pin header pin; 8 ADC channels &amp;amp; 1 GND).&lt;br /&gt;The microcontroller reads the voltage at each channel and sends the data to PC via RS232 cable. At reciving end (PC), the incoming data can be converted into excel format to store the values at regular time intervals.&lt;br /&gt;As shown in the screen-shot of the hyper terminal, I had connected here the 5v Vcc to Channel 0 and an Li cell to channel 7.&lt;br /&gt;The M32 can also send a time impression along with the channel data using the on-board RTC DS1307 to record the voltage variation with time.&lt;br /&gt;&lt;br /&gt;The project source code files can be downloaded from here:&lt;br /&gt;&lt;a style="font-weight: bold; color: rgb(0, 0, 153);" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/Data_acqui_M32.zip?attredirects=0&amp;amp;d=1"&gt;Download Source Code&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;--------&lt;br /&gt;ccd@dharmanitech.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-4070966362940116246?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/4070966362940116246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=4070966362940116246' title='21 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/4070966362940116246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/4070966362940116246'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/09/using-m32card-for-data-acquisition-with.html' title='Using M32_Card for Data Acquisition with on-board 8 channnel ADC'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_zqABT3suzXE/SMw7qdDl2lI/AAAAAAAAAHg/Ja1blCRGTvQ/s72-c/ccd1.JPG' height='72' width='72'/><thr:total>21</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-1014596200518879215</id><published>2008-09-03T03:30:00.000-07:00</published><updated>2010-12-18T08:10:11.904-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY (Do-It-Yourself)'/><category scheme='http://www.blogger.com/atom/ns#' term='AVR Programmer'/><title type='text'>DIY AVR Programmers</title><content type='html'>Hi guys,&lt;br /&gt;for those who are trying to make AVR kit at home, an AVR programmer which can be simple to make will be really useful, as it'll avoid buying the programmer!! Here I'm giving a few webpage links on how to make a programmers yourself.&lt;br /&gt;&lt;br /&gt;- Here is a simple AVR serial programmer, works with PC serial port, easy to make:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SL5uU2cmN8I/AAAAAAAAAG4/nEoQifzu27A/s1600-h/at_prog_photo_complete.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 177px; height: 131px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SL5uU2cmN8I/AAAAAAAAAG4/nEoQifzu27A/s200/at_prog_photo_complete.jpg" alt="" id="BLOGGER_PHOTO_ID_5241748320797734850" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SL5wPme6iGI/AAAAAAAAAHA/zb65eUz8NCU/s1600-h/atprog.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 257px; height: 131px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SL5wPme6iGI/AAAAAAAAAHA/zb65eUz8NCU/s200/atprog.gif" alt="" id="BLOGGER_PHOTO_ID_5241750429636397154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For complete info check out the webpage:&lt;br /&gt;&lt;a href="http://extremeelectronics.co.in/avr-tutorials/part-iii-making-programmer-and-target/"&gt;AVR Serial programmer from Extremeelectronics.co.in&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- For using the serial programmer discussed above, a driver software is required to be installed in your pc. Download it from here:&lt;br /&gt;&lt;a href="http://www.lancos.com/prog.html"&gt;PonyProg : AVR serial programmer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SL50L1zYw2I/AAAAAAAAAHI/9ZbQ3g_4T-k/s1600-h/USB-AVR-PROG.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 238px; height: 175px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SL50L1zYw2I/AAAAAAAAAHI/9ZbQ3g_4T-k/s200/USB-AVR-PROG.jpg" alt="" id="BLOGGER_PHOTO_ID_5241754763075830626" border="0" /&gt;&lt;/a&gt;If you are using a laptop which doesn't have serial port then you can buy a low-cost AVR USB programmer shown in the figure. Visit this webpage for buying it:&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;a href="http://shop.extremeelectronics.co.in/product_info.php?cPath=21&amp;amp;products_id=28"&gt;AVR USB Programmer&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is one more option for buying a cheap USB programmer for AVR at around $15 cost:&lt;br /&gt;&lt;a href="http://www.micro4you.com/store/usbasp-avr-usb-isp/prod_52.html"&gt;AVR USB Programmer lite&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SduQIcmpkpI/AAAAAAAAASk/W61KhZxaoYY/s1600-h/usbasp.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 186px; height: 154px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SduQIcmpkpI/AAAAAAAAASk/W61KhZxaoYY/s320/usbasp.jpg" alt="" id="BLOGGER_PHOTO_ID_5322005859460027026" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And if you want to make an USB programmer yourself, check out here an easy to make AVR USB programmer:&lt;img src="file:///C:/DOCUME%7E1/CCDHAR%7E1/LOCALS%7E1/Temp/moz-screenshot-1.jpg" alt="" /&gt;&lt;img src="file:///C:/DOCUME%7E1/CCDHAR%7E1/LOCALS%7E1/Temp/moz-screenshot-2.jpg" alt="" /&gt;&lt;br /&gt;&lt;a style="color: rgb(0, 0, 153);" href="http://www.fischl.de/usbasp/"&gt;DIY AVR USB Programmer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- Atmel has given a detailed document on design of In-System Programmer for AVR. It inclludes the schematic of the programmer. Download this pdf document from here:&lt;br /&gt;&lt;a href="http://www.atmel.com/dyn/resources/prod_documents/DOC0943.PDF"&gt; In-System Programmer for AVR, from Atmel&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- For those who like pc parallel port better, here is a page containing data on how to make a parallel port AVR programmer along with the download for the pc:&lt;br /&gt;&lt;a href="http://www.speedy-bl.com/avr-prog-e.htm"&gt;Parallel port programmer for AVR&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- Here is another parallel port programmer from AVRdude:&lt;br /&gt;&lt;a href="http://www.bsdhome.com/avrdude/"&gt;AVRdude parallel port programmer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- One more parallel port programmer using AT90S1200 microcontroller, with schematic and the .asm file. (Note: it need a pre-programmed AT90S1200 IC).  Check out more on the webpage:&lt;a href="http://electrons.psychogenic.com/modules/arms/art/5/AVRInSystemProgrammer.php"&gt;&lt;br /&gt;Psychogenic PPI AVR Programmer&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;- Apart from these, some more free designs are there, you'll find them by googling!! And if you want to buy, there are plenty of them available!!!&lt;br /&gt;&lt;br /&gt;Hope this info is useful for your project work..&lt;br /&gt;Thanks!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-1014596200518879215?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/1014596200518879215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=1014596200518879215' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/1014596200518879215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/1014596200518879215'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/09/diy-avr-programmers.html' title='DIY AVR Programmers'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zqABT3suzXE/SL5uU2cmN8I/AAAAAAAAAG4/nEoQifzu27A/s72-c/at_prog_photo_complete.jpg' height='72' width='72'/><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-2756618262822325869</id><published>2008-08-30T03:01:00.000-07:00</published><updated>2011-05-15T07:01:16.904-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DIY (Do-It-Yourself)'/><category scheme='http://www.blogger.com/atom/ns#' term='DS1307'/><category scheme='http://www.blogger.com/atom/ns#' term='LCD'/><category scheme='http://www.blogger.com/atom/ns#' term='M32 Starter&apos;s Kit'/><category scheme='http://www.blogger.com/atom/ns#' term='RS232'/><category scheme='http://www.blogger.com/atom/ns#' term='RTC'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega32'/><title type='text'>Make-Yourself ATmega32 Starter's Kit with LCD, I2C, SPI, RTC, ADC interfaces</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SLkoW52P28I/AAAAAAAAAFM/8CfkpPRVmPU/s1600-h/DSC00172.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 211px; height: 191px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SLkoW52P28I/AAAAAAAAAFM/8CfkpPRVmPU/s320/DSC00172.jpg" alt="" id="BLOGGER_PHOTO_ID_5240264015372868546" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/SLknJpd5pjI/AAAAAAAAAFE/dFL604AKQ0A/s1600-h/DSC00168.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 227px; height: 194px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/SLknJpd5pjI/AAAAAAAAAFE/dFL604AKQ0A/s320/DSC00168.jpg" alt="" id="BLOGGER_PHOTO_ID_5240262688125855282" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;here is my home-made kit of ATmega32 microcontroller interfacing. The ATmega32 controller is rich with features like onboard 32kB in-System programmable flash, 1 KB EEPROM, 2KB SRAM, 10bit ADC (8 channel), SPI bus inteface, TWI (compatible with I2C bus) interface, an USART, analog comparator, etc. That's why I've selected it to load my kit with all those features.&lt;br /&gt;&lt;br /&gt;This M32 card is having an LCD inteface with contrast adjustment, an RS232 port for connecting with PC, a connector for 8 analog voltage inputs to measure by ADC, a Real Time Clock IC DS1307 from maxim with battery back-up, four general purpose keys, two keys for generating interrupts and an LED.&lt;br /&gt;The circuit can be powered by an easily available 12v DC adapter. The voltage regulator IC 7805 used to convert the input into regulated 5v supply.&lt;br /&gt;&lt;br /&gt;See below the kit in powered on condition and the schematic (click to enlarge the images)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SLksklsXEFI/AAAAAAAAAFc/RdUU7gmLKYQ/s1600-h/DSC00176.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 205px; height: 175px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SLksklsXEFI/AAAAAAAAAFc/RdUU7gmLKYQ/s320/DSC00176.jpg" alt="" id="BLOGGER_PHOTO_ID_5240268648527368274" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SLp8dnL3NwI/AAAAAAAAAGM/4wGUNgnMLp0/s1600-h/M32_Schematic.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 241px; height: 173px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SLp8dnL3NwI/AAAAAAAAAGM/4wGUNgnMLp0/s320/M32_Schematic.JPG" alt="" id="BLOGGER_PHOTO_ID_5240637964575782658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The PCB is completely home-made, using the etching technique with the Ferric Chloride chemical. If you want to know how to make a PCB yourself from your layout, visit following webpage,  it's really helpful:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://electrons.psychogenic.com/modules/arms/art/10/pcb_howto.php"&gt;http://electrons.psychogenic.com/modules/arms/art/10/pcb_howto.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The schematic and layout of the M32_card shown here are prepared using EAGLE. It's a single layer board for making the home-preparation easy. Check out the bottom layer and the layouts in the pics below:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SLp9AsMprQI/AAAAAAAAAGU/nOVrj71vCWg/s1600-h/M32_sch.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 223px; height: 173px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SLp9AsMprQI/AAAAAAAAAGU/nOVrj71vCWg/s320/M32_sch.JPG" alt="" id="BLOGGER_PHOTO_ID_5240638567216688386" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_zqABT3suzXE/SLp9nP2keYI/AAAAAAAAAGc/0my8qnwjBqM/s1600-h/M32_pcb.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 217px; height: 172px;" src="http://1.bp.blogspot.com/_zqABT3suzXE/SLp9nP2keYI/AAAAAAAAAGc/0my8qnwjBqM/s320/M32_pcb.JPG" alt="" id="BLOGGER_PHOTO_ID_5240639229622778242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The software for the ATmega32 controller is written using imageCraft AVR compiler. The software contains code for LCD interface, use of RTC and communication with PC with RS232 port.  Using the Hyper terminal in windows, the functionality of the kit can be checked, as I've mentioned in my previous post of RTC_EEPROM interface with ATmega128.&lt;br /&gt;Sown below are the pics of RTC circuit in test and related screen shot of the hyper terminal while interacting with the M32_Card&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/SLzaeXXckyI/AAAAAAAAAGo/9DpEV3GVRew/s1600-h/RTC_display.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 265px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/SLzaeXXckyI/AAAAAAAAAGo/9DpEV3GVRew/s200/RTC_display.jpg" alt="" id="BLOGGER_PHOTO_ID_5241304281555702562" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/SL9u4fMEKYI/AAAAAAAAAHQ/fOLW1pvJ2HA/s1600-h/M32_screenShot.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 141px; height: 260px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/SL9u4fMEKYI/AAAAAAAAAHQ/fOLW1pvJ2HA/s200/M32_screenShot.JPG" alt="" id="BLOGGER_PHOTO_ID_5242030408006379906" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The complete source code files including new addition of ADC (check out &lt;a href="http://www.dharmanitech.com/2008/09/using-m32card-for-data-acquisition-with.html"&gt;Here&lt;/a&gt;) can be downloaded below.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Download&lt;/span&gt;&lt;br /&gt;----------------&lt;br /&gt;&lt;a style="font-weight: bold;" href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/M32_Card.zip?attredirects=0&amp;amp;d=1"&gt;Source code&lt;/a&gt;&lt;br /&gt;&lt;a href="https://sites.google.com/a/dharmanitech.com/project-zips/zips/M32_BoardPCB.zip?attredirects=0&amp;amp;d=1"&gt;&lt;span style="font-weight: bold;"&gt;PCB files &lt;/span&gt;(in PDF &amp;amp; EAGLE formats)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;Datasheets:&lt;/div&gt;&lt;div style="text-align: left;"&gt;      &lt;a href="http://www.atmel.com/dyn/resources/prod_documents/doc2503.pdf"&gt;ATmega32&lt;/a&gt;      &lt;a href="http://datasheets.maxim-ic.com/en/ds/DS1307.pdf"&gt;DS1307&lt;/a&gt;       &lt;a href="http://www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf"&gt;MAX232&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;br /&gt;--------&lt;br /&gt;ccd@dharmanitech.com&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-2756618262822325869?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/2756618262822325869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=2756618262822325869' title='191 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/2756618262822325869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/2756618262822325869'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/08/make-yourself-atmega32-starters-kit.html' title='Make-Yourself ATmega32 Starter&apos;s Kit with LCD, I2C, SPI, RTC, ADC interfaces'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zqABT3suzXE/SLkoW52P28I/AAAAAAAAAFM/8CfkpPRVmPU/s72-c/DSC00172.jpg' height='72' width='72'/><thr:total>191</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-5618075143757883308</id><published>2008-08-14T14:57:00.000-07:00</published><updated>2010-12-18T07:18:47.847-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='serial EEPROM'/><category scheme='http://www.blogger.com/atom/ns#' term='DS1307'/><category scheme='http://www.blogger.com/atom/ns#' term='i2c'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega128'/><category scheme='http://www.blogger.com/atom/ns#' term='RS232'/><category scheme='http://www.blogger.com/atom/ns#' term='RTC'/><title type='text'>Interfacing RTC &amp; serial EEPROM using i2c bus, with ATmega128 uC</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_zqABT3suzXE/STggK8W6eCI/AAAAAAAAAN0/3WQF7JEff-4/s1600-h/RTC_EEPROM_Sch.jpeg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 311px; height: 273px;" src="http://4.bp.blogspot.com/_zqABT3suzXE/STggK8W6eCI/AAAAAAAAAN0/3WQF7JEff-4/s320/RTC_EEPROM_Sch.jpeg" alt="" id="BLOGGER_PHOTO_ID_5276002335837550626" border="0" /&gt;&lt;/a&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/STggStWeQPI/AAAAAAAAAN8/OUAfUj3mqxg/s1600-h/RTC_EEPROM_Hyp.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 124px; height: 272px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/STggStWeQPI/AAAAAAAAAN8/OUAfUj3mqxg/s320/RTC_EEPROM_Hyp.JPG" alt="" id="BLOGGER_PHOTO_ID_5276002469248123122" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;here is my experiment with i2c bus for interfacing serial EEPROM (24C256) and RTC (DS1307) using AVR microcontroller ATmega128. The circuit is also provided with an RS232 port for connecting with PC to send commands for reading/writing EEPROM or setting date/time in RTC (Click on images to enlarge them).&lt;br /&gt;&lt;br /&gt;Communication with PC is done through Hyper Terminal. A screen shot of the message sent to PC by microcontroller immediately after power ON is shown in the figure at the left, where the user is asked to enter choice from the menu options related to EEPROM and RTC. User can store data in EEPROM, or set RTC date and time by entering them using PC keyboard.&lt;br /&gt;Hyper Terminal is used with 19200 Baud, No parity, No hardware flow control settings.&lt;br /&gt;&lt;br /&gt;When the circuit is powered on, a welcome message is displayed on the Hyper Terminal window and a menu with 9 options (0-8) is displayed (refer to the figure). The options are explained here:&lt;br /&gt;&lt;br /&gt;0: Erase EEPROM      (fills eeprom with 0xff bytes)&lt;br /&gt;1: Write EEPROM      (starts writing eeprom starting with 0x0000 address)&lt;br /&gt;2: Read EEPROM       (reads eeprom starting with 0x0000 address)&lt;br /&gt;3: Write eeprom page (writes one page of eeprom at specified page number)&lt;br /&gt;4: Read eeprom page  (Reads one page of eeprom at specified page number)&lt;br /&gt;5: Display RTC Date   (Displays current date from RTC)&lt;br /&gt;6: Display RTC time    (Displays current time from RTC)&lt;br /&gt;7: Update RTC Date   (Setting new date in RTC)&lt;br /&gt;8: Update RTC time   (Setting new time in RTC)&lt;br /&gt;&lt;br /&gt;The option is selected from PC keyboard. While writing to eeprom or RTC the data is entered using PC keyboard as specified by the program.&lt;br /&gt;&lt;br /&gt;The software routines include DS1307 library, 24C256 library &amp;amp; I2C library along with the main function.&lt;br /&gt;&lt;br /&gt;The code is written in C using winAVR (inside AVRStudio). The complete project folder can be downloaded here in zip format (&lt;span style="color: rgb(255, 0, 0);"&gt;updated on 25-April-2009, &lt;span style="color: rgb(51, 51, 51);"&gt;earlier it was in ICCAVR&lt;/span&gt;&lt;/span&gt; format):&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://sites.google.com/a/dharmanitech.com/rtc-and-serial-eeprom-code/Home/RTC_EEPROM.zip?attredirects=0"&gt;Download Complete Source code &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Datasheets:&lt;br /&gt;&lt;a href="http://www.atmel.com/atmel/acrobat/doc2467.pdf"&gt;ATmega128&lt;/a&gt;      &lt;a href="http://datasheets.maxim-ic.com/en/ds/DS1307.pdf"&gt;DS1307&lt;/a&gt;     &lt;a href="http://www.ramtron.com/files/datasheets/FM24C256ds_r3.2.pdf"&gt;FM24C256&lt;/a&gt;       &lt;a href="http://www.datasheetcatalog.org/datasheet/texasinstruments/max232.pdf"&gt;MAX232&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Thanks!&lt;br /&gt;&lt;br /&gt;(&lt;span style="color: rgb(255, 0, 0);"&gt;last updated on 25-April-2009&lt;/span&gt;)&lt;br /&gt;---------&lt;br /&gt;ccd@dharmanitech.com&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-5618075143757883308?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/5618075143757883308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=5618075143757883308' title='75 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5618075143757883308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5618075143757883308'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/08/interfacing-rtc-serial-eeprom-using-i2c.html' title='Interfacing RTC &amp; serial EEPROM using i2c bus, with ATmega128 uC'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_zqABT3suzXE/STggK8W6eCI/AAAAAAAAAN0/3WQF7JEff-4/s72-c/RTC_EEPROM_Sch.jpeg' height='72' width='72'/><thr:total>75</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-6651113832407932123</id><published>2008-08-06T10:08:00.000-07:00</published><updated>2008-09-03T06:30:25.470-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Precision Rectifier'/><title type='text'>opamp Precision Rectifier</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/SJnmZ7V7wQI/AAAAAAAAADQ/YcbIBrDxDMs/s1600-h/precRect.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_zqABT3suzXE/SJnmZ7V7wQI/AAAAAAAAADQ/YcbIBrDxDMs/s320/precRect.JPG" alt="" id="BLOGGER_PHOTO_ID_5231465775268348162" border="0" /&gt;&lt;/a&gt;Hi friends,&lt;br /&gt;this is a simple opamp precision rectifier. Very useful in rectifying or making bipolar signals unipolar, specially in small signals where we cannot afford to have that 0.7v drop across the normal diode bridge rectifier.&lt;br /&gt;The circuit shown here gives rectified output going only in the negative direction, as my application required it that way. But if you want rectified positive output, just reverse the direction of both the diodes and you'll get it!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-6651113832407932123?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/6651113832407932123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=6651113832407932123' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/6651113832407932123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/6651113832407932123'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/08/opamp-precision-rectifier.html' title='opamp Precision Rectifier'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zqABT3suzXE/SJnmZ7V7wQI/AAAAAAAAADQ/YcbIBrDxDMs/s72-c/precRect.JPG' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-495726090145799976</id><published>2008-07-27T09:08:00.000-07:00</published><updated>2010-12-18T08:12:15.824-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='USB converter'/><category scheme='http://www.blogger.com/atom/ns#' term='RS232'/><title type='text'>USART-to-USB converter using FT232BM chip</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_zqABT3suzXE/SIyenbCSo3I/AAAAAAAAADI/8YL_41gwmRY/s1600-h/FT232BM.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_zqABT3suzXE/SIyenbCSo3I/AAAAAAAAADI/8YL_41gwmRY/s320/FT232BM.JPG" alt="" id="BLOGGER_PHOTO_ID_5227727667579757426" border="0" /&gt;&lt;/a&gt;Hi guys,&lt;br /&gt;  here is an easy an popular way to start using USB in your designs without going into learning the complicated USB protocol. This circuit converts normal USART signals from any microcontroller into USB compatible signals which can be directly connected to the PC. If u r designing a circuit and u need pc interface, then this is the best way, use USB, as the RS232 ports are disappearing from PCs and laptops very fast.&lt;br /&gt;&lt;br /&gt; This circuit is as suggested by FTDI's datasheet for the device FT232BM. It also includes an EEPROM to input your device name which will appear in PC when u connect your circuit to PC. The Tx and Rx LED indication is also provided.&lt;br /&gt;&lt;br /&gt; Drivers for this IC are available free on FTDI's website mentioned below. The drivers create virtual serial comm ports, hence keep the USB protocol completely in background. U can program yr controller just like u r designing it for RS232 communication!!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;New!&lt;/span&gt; (21 May 2010)&lt;br /&gt;&lt;br /&gt;FTDI has released a RS232 to USB converter in DB9 connector package, an easiest way to migrate from RS232 to USB without any change in your PCB, you can have the footprint of DB9 female connector but place this module instead and you are USB ready!! Really cool!!!&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_zqABT3suzXE/S_YcLCGyeRI/AAAAAAAAAXA/mhnCF1WASes/s1600/rs232-usb.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 141px;" src="http://3.bp.blogspot.com/_zqABT3suzXE/S_YcLCGyeRI/AAAAAAAAAXA/mhnCF1WASes/s400/rs232-usb.JPG" alt="" id="BLOGGER_PHOTO_ID_5473593372984899858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;More info:  http://www.ftdichip.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-495726090145799976?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/495726090145799976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=495726090145799976' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/495726090145799976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/495726090145799976'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/07/usart-to-usb-converter-using-ft232bm.html' title='USART-to-USB converter using FT232BM chip'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_zqABT3suzXE/SIyenbCSo3I/AAAAAAAAADI/8YL_41gwmRY/s72-c/FT232BM.JPG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-4742969276480836892</id><published>2008-07-26T10:29:00.000-07:00</published><updated>2010-10-31T23:00:52.658-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Telephone Ring Detector'/><title type='text'>Ring Detector for Caller ID Unit</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_zqABT3suzXE/SIti_-Ve9qI/AAAAAAAAADA/2r7r0xNyh4w/s1600-h/ring+detector.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 458px; height: 150px;" src="http://bp2.blogger.com/_zqABT3suzXE/SIti_-Ve9qI/AAAAAAAAADA/2r7r0xNyh4w/s320/ring+detector.JPG" alt="" id="BLOGGER_PHOTO_ID_5227380643697981090" border="0" /&gt;&lt;/a&gt;Hi Friends,&lt;br /&gt;   this is an addition to the &lt;a href="http://www.dharmanitech.com/2008/07/hi-friends-one-more-circuit-dtmf.html"&gt;caller ID circuit&lt;/a&gt; of my previous post. For deciding whether call is received call or missed call, u need to monitor the ringing signal along with the off-hook detector signal, which is discussed in the last post. If the off-hook detector signal goes low (i.e. receiver lifted) before the ringing signal stops, then the call is labeled as received call, otherwise it is a missed call.&lt;br /&gt;  This small circuit converts the ringing signal (sine wave 90vrms) into 5v dc pulses which can be directly fed to microcontroller pin. The circuit outputs a pulse for each ring. The delay between two pulses is to be monitered and if it exceeds 4 sec, then ring is dead, hence, the call is missed call.!&lt;br /&gt; Try it out..&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-4742969276480836892?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/4742969276480836892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=4742969276480836892' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/4742969276480836892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/4742969276480836892'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/07/ring-detector-for-caller-id-unit.html' title='Ring Detector for Caller ID Unit'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_zqABT3suzXE/SIti_-Ve9qI/AAAAAAAAADA/2r7r0xNyh4w/s72-c/ring+detector.JPG' height='72' width='72'/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-4697997196391189965</id><published>2008-07-25T06:11:00.000-07:00</published><updated>2010-12-18T08:07:29.707-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DTMF Decoder'/><category scheme='http://www.blogger.com/atom/ns#' term='Caller ID unit'/><category scheme='http://www.blogger.com/atom/ns#' term='DTMF telephone'/><title type='text'>Design Caller ID using DTMF decoder MT8870</title><content type='html'>&lt;a href="http://bp2.blogger.com/_zqABT3suzXE/SInTNjOZPrI/AAAAAAAAACw/lwI65X2uaeE/s1600-h/DTMF+Decoder.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5226941072287547058" style="margin: 0px auto 10px; display: block; text-align: center; width: 368px; height: 234px;" alt="" src="http://bp2.blogger.com/_zqABT3suzXE/SInTNjOZPrI/AAAAAAAAACw/lwI65X2uaeE/s320/DTMF+Decoder.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi friends,&lt;br /&gt;&lt;div&gt;one more circuit: DTMF decoder interface for designing Caller ID Unit. It's very simple circuit using DTMF decoder MT8870 (or CM8870). As shown in the circuit, u'll receive an interrupt ( if NAND output is connected to INT of the microcontroller) whenever u receive a call or make a call and then u can use yr program to read the digits coming out of pin 11 to 14 of the MT8870. I designed the circuit with additional features like seperating received calls, missed calls, dialled numbers along with telephone directory.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Download datasheet:&lt;/div&gt;&lt;div&gt;                          &lt;a href="http://www.datasheet4u.com/download.php?id=268108"&gt;MT8870&lt;/a&gt;&lt;/div&gt;&lt;div&gt;                          &lt;a href="http://www.datasheetcatalog.org/datasheet/calmicro/CM8870.pdf"&gt;CM8870&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;To determine whether number is dialled or received, u need to know whether receiver is on-hook or off-hook. following simple circuit will give u that indication:&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://bp0.blogger.com/_zqABT3suzXE/SInTEjuvfiI/AAAAAAAAACo/bzLs7NdhK28/s1600-h/off-hook+detector.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5226940917804400162" style="margin: 0px auto 10px; display: block; text-align: center; width: 372px; height: 277px;" alt="" src="http://bp0.blogger.com/_zqABT3suzXE/SInTEjuvfiI/AAAAAAAAACo/bzLs7NdhK28/s320/off-hook+detector.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I had used microcontroller 8951 with16x2 LCD and Dallas nvRAM for storing numbers and names. The code is in assembly language. It's really easy to make this one with lot of variations. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;Check out my next post on &lt;a href="http://www.dharmanitech.com/2008/07/ring-detector-for-caller-id-unit.html"&gt;telephone ring detector&lt;/a&gt; to check whether the call is received call or missed call.&lt;br /&gt;&lt;br /&gt;----------&lt;br /&gt;ccd@dharmanitech.com&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-4697997196391189965?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/4697997196391189965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=4697997196391189965' title='68 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/4697997196391189965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/4697997196391189965'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/07/hi-friends-one-more-circuit-dtmf.html' title='Design Caller ID using DTMF decoder MT8870'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_zqABT3suzXE/SInTNjOZPrI/AAAAAAAAACw/lwI65X2uaeE/s72-c/DTMF+Decoder.JPG' height='72' width='72'/><thr:total>68</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-5617255868729209188</id><published>2008-07-17T11:28:00.000-07:00</published><updated>2010-12-18T08:15:45.715-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rate or position measurement'/><category scheme='http://www.blogger.com/atom/ns#' term='ADXRS150_gyro'/><title type='text'>Rate or Position measurement using Solid State Gyroscope</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_zqABT3suzXE/TQzeAfpOmWI/AAAAAAAAAZ0/TohtCnnb1ZY/s1600/gyro_pcb_lcd.JPG"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 213px;" src="http://2.bp.blogspot.com/_zqABT3suzXE/TQzeAfpOmWI/AAAAAAAAAZ0/TohtCnnb1ZY/s400/gyro_pcb_lcd.JPG" alt="" id="BLOGGER_PHOTO_ID_5552056540716767586" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;updated:14/08/08&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Hi friends,&lt;br /&gt;here is a circuit to measure rate of a rotating object using solid state gyro ADXRS150 (used here is DIP sized evaluation version). this circuit gives output of -10v to +10v for rate upto 80 deg/sec in both the directions (i.e. -80 to +80 deg/sec). A direction o/p logic signal is also there to feed to microcontroller. Temperature of gyroscope also can be measured with onchip ADC of the microcontroller like ATmega32 (describd in previos post), which can be used for temperature compensation of the gyro o/p.&lt;br /&gt;&lt;br /&gt;find the detailed datasheet of ADXRS150 here:&lt;br /&gt;&lt;a href="http://www.analog.com/static/imported-files/data_sheets/ADXRS150.pdf"&gt;ADXRS150 Datasheet&lt;/a&gt;&lt;br /&gt;&lt;span class="a"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-5617255868729209188?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/5617255868729209188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=5617255868729209188' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5617255868729209188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/5617255868729209188'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/07/hi-friends-here-is-circuit-to-measure.html' title='Rate or Position measurement using Solid State Gyroscope'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_zqABT3suzXE/TQzeAfpOmWI/AAAAAAAAAZ0/TohtCnnb1ZY/s72-c/gyro_pcb_lcd.JPG' height='72' width='72'/><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-2311838066247620653</id><published>2008-07-13T10:55:00.001-07:00</published><updated>2010-12-18T07:55:13.890-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DAC'/><category scheme='http://www.blogger.com/atom/ns#' term='ATmega32'/><category scheme='http://www.blogger.com/atom/ns#' term='3310 LCD'/><title type='text'>interfacing ATmega32</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_zqABT3suzXE/SHpDv3RxzvI/AAAAAAAAACA/Pu0inwu5Tg4/s1600-h/ATmega32_interface.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_zqABT3suzXE/SHpDv3RxzvI/AAAAAAAAACA/Pu0inwu5Tg4/s320/ATmega32_interface.JPG" alt="" id="BLOGGER_PHOTO_ID_5222561207460941554" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Hi techies!!&lt;br /&gt;  This is one more of my circuits, interfacing ATmega32 with an LCD and a DAC. it also includes two general purpose push-buttons and In System Programming connector. The controller is operating with 14.7456 MHz frequency crystal, convenient for generating standard baud rates (for RS422 communication whic i used in my actual project, not shown here).&lt;br /&gt;&lt;br /&gt; The Atmel AVR controller ATmega32 is a very powerful chip with 1 MIPS/MHz throughput and contains a lots of on-chip peripherals like UART, SPI, 32bits I/O, TWI(I2C compatible), versatile timer/counters and lot more..&lt;br /&gt;the LCD and DAC driver functions are written in C(using imageCraft compiler)&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://docs.google.com/Doc?id=ddmkwx3z_8dqcmssfq"&gt;Download schematic &amp;amp; code for LCD interfacing&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-2311838066247620653?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/2311838066247620653/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=2311838066247620653' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/2311838066247620653'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/2311838066247620653'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/07/interfacing-atmega32.html' title='interfacing ATmega32'/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_zqABT3suzXE/SHpDv3RxzvI/AAAAAAAAACA/Pu0inwu5Tg4/s72-c/ATmega32_interface.JPG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8014888555955763990.post-2071935574663348950</id><published>2008-07-12T04:35:00.000-07:00</published><updated>2008-07-12T04:44:32.981-07:00</updated><title type='text'></title><content type='html'>&lt;span style="font-weight: bold;"&gt;Hi&lt;/span&gt; all the&lt;span style="color: rgb(0, 0, 153);"&gt; &lt;span style="font-weight: bold;"&gt;techy&lt;/span&gt;&lt;/span&gt; guys!!! welcome to this blog!&lt;br /&gt;I love designing things with microcontroller,&lt;br /&gt;so here I m, to share the my ideas with you guys and to know your ideas!!&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;Start Blogging!!!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8014888555955763990-2071935574663348950?l=www.dharmanitech.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.dharmanitech.com/feeds/2071935574663348950/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8014888555955763990&amp;postID=2071935574663348950' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/2071935574663348950'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8014888555955763990/posts/default/2071935574663348950'/><link rel='alternate' type='text/html' href='http://www.dharmanitech.com/2008/07/hi-all-techy-guys-welcome-to-this-blog.html' title=''/><author><name>CC Dharmani</name><uri>http://www.blogger.com/profile/13217855743473839524</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>
