All posts by Avinash

About Avinash

Avinash Gupta is solely focused on free and high quality tutorial to make learning embedded system fun !

AVR Project – ATmega8 Based Smart Code Lock

Here is a project for beginners using Atmel AVR ATmega8. The project uses some techniques that are very useful for designers to learn and utilize. Alphanumeric LCD Module Interfacing. 4×4 Keypad interfacing. PWM Control of LED (Used to dim the back-light of LCD, like in some Nokia Phones) Basic Circuit design for AVR MCUs Connecting relays and other current demanding devices. AVR Studio and project management. compiling using free avr-gcc compiler. Using eXtreme Burner – AVR to burn hex code to AVR MCU. NOTE: Don’t waste time finding each part running from shop to shop. Get all the parts with exact specification in a ready to use kit! Purchase ATmega8 based smart code lock KIT.   Fig.: ATmega8 Based Code Lock Fig.: ATmega8 Based Code Lock Project     Functions of the Project. This device can be used to code protect any electrical device (like an electronic door, lock or safe). The user must enter a correct password to gain access. The password is entered using the built in 4×4 keypad matrix. The main LCD Module is used to display messages to the user. As soon as correct password is entered the relay is activated. This is indicated by a LED which is placed near the relay. The relay remains on as long as the user wishes. You just need […]

Product Preview – AVR Graphical LCD Development Board

To bring graphic LCD to the reach of every embedded system engineer we have developed a complete hardware and software suite that can be used to develop rich graphical application easily and quickly. More information on graphical programming with GLCD and AVR ATmega series MCU is discussed in the following articles. Part I – Introduction to GLCD and Hardware Setup Part II – Downloading and Installing ProGFX! Part III – Explains Graphic Primitive Functions. Part IV – Font and Text Handling Functions. The aim is to create a common hardware and software platform to create and share graphical applications. The user can concentrate only on application level, leaving the low level details handled by ProGFX. The advantage is that the end application can be easily shared among the user of ProGFX boards. The applications are more usable because any ProGFX programmer can easily understand the application logic (due to clean uniform api) and modify the application to suit their need. eXtreme Electronics, India will work towards releasing many open source ProGFX applications for their users. AVR Graphical LCD Development Board   AVR Graphical LCD Development Board     Product Features Out of the Box performance (Just bring it out and power up!) Step by step tutorial to learn Graphic Programming. Can be programmed by ISP Programmer. On board ATmega32A PU […]

Microtouch – 2.4 by Adafruit and Rossum

I found this amazing stuff today morning. I haven’t tried it yet, but It looks like a perfect solution for using TFT and Touch Screen with AVRs. I mean perfect because its more than a hardware. It promises a nice Application Framework (kind of like MFC for AVR), Low level driver for TFT and Touch screen, A windows simulator for rapid application development. TFTs and Touch screen are sold by many these days but rarely any of them are of any use (because of lack of Application framework and other tools) Will surly give it a try when it comes in stock. Microtouch Official Page At first when I saw the Video, I thought It was fake. Smooth sprite animation without using double buffering on 8 bit CPU, looks impossible? It cannot be double buffered as it needs at least 150KB of RAM but the MCU had just 2.5K! But I had to belive it as it was on Adafruit. I don’t know hows its happening, I mean how they achive such frame rates. Once I tried to interface 320×240 QVGA TFT with AVR, it was taking seconds to update the entire screen but “Microtouch” seems to update the screen @ several frames per second! Note: Images Copyright (C) www.adafruit.com

AVR Project – ATmega8 based RPM Meter

Hello All, Today I will show you how you can make a simple RPM Meter using AVR ATmega8. The RPM meter we will be making is a contact less type, i.e. it measures the RPM of a rotating object without actually making any contact with it. An IR reflectance sensor will be used to sense the speed. You have to attach a white reflective object (like a white paper sticker) at one point in the periphery of rotation . Then you need to place the reflectance sensor such that the white reflector comes just above it once per rotation. In this way the sensor will give one falling edge to the MCU per rotation, we will measure number of such pulse in one second to get the revolution per second, multiplying this with 60 we get RPM. For this project I will use a ATmega8 MCU connected to a 16×2 LCD Module for showing the RPM. Design of AVR based RPM Meter. The sensor part is made up of TCRT5000 IR Reflectance sensor. It it wired as shown below. The sensor will give a LOW output whenever it detects a white reflective surface just above it. This output is feed to the INT0 pin of MCU. INT0 is a general purpose external interrupt source. It can be adjusted to interrupt […]

Handling Text and Fonts in Graphic LCD

ProGFX supports advance function to draw text on graphical LCD screen. ProGFX support multiple fonts, fonts with variable width characters, absolute pixel based positioning, and utility function to get the dimension of text in any specified font. The last feature is used to cleanly position text relative to other graphic and text objects on screen. So lets get started. First you will need a tool that will help convert any Windows Font to ProGFX compatible format. Thanks to Mr. F. Maximilian Thiele we have a great tool called Font Creator. You can download it from here. Download GLCD Font Creator It is a Java application so you need the Java Runtime to use it. Launch the app using start.bat file. You will get a screen similar to this. Font Creator Main Screen From file menu select "New Font" , and configure the New Font Dialog as follows. New Font Dialog Name = Arial12 Import Font = Arial Size =12 And click ok. From Export Menu Select "Export Font", Give it the name "Arial12.h" while saving. Create a Atmel Studio Project with GFX Support. The steps are given in the following tutorials. Hello World Project with Atmel Studio 6. Setting up ProGFX Project using AVR Studio. Name the AVR Studio Project as "FontDemo". Open the project folder in Windows Explorer (or […]

Introduction to PIC Interrupts and their Handling in C

Interrupts are common features in almost all processor family, be it old 8051, AVR, PIC, ARM or the x86 used in desktops. So their in depth and clear knowledge is required for successful system software engineers. This guide will explain the interrupt system in general and their application using PIC18 architecture. We will also learn about handling of interrupts in HI-TECH C for PIC18. What are Interrupts? Interrupts, as the name suggests interrupts the normal execution and Requests and urgent attention of CPU. Interrupts are situations that the CPU can’t predict when they will happen, they can happen any time, so the CPU does not wait for them. So the CPU keeps on doing its normal job unless and interrupt occurs. For example when the USART (Serial Communication Hardware) will receive data is unknown, it can receive data any time. So the CPU keeps on doing its normal job, which may be for example read temperature using LM35 sensor and display on LCD. The CPU keeps on doing the "normal" job, but as soon as the USART receive data it informs the CPU using an interrupt. The CPU save its current state (so that it can resume), and jumps to the ISR (interrupt service routine) immediately. Where we can process the command or put it in a FIFO queue (to […]

MicroSD Module

Hi, Last evening I hand soldered a SMD MicroSD Module PCB. The MicroSD Module enable easy connection of MicroSD cards to 5v Microcontrollers. It has on board 3.3v LDO Regulator, 5v to 3.3v i/o converter chip, Indicator LEDs (Power and Activity), SD Pullup resistors, Inductor for clean Hot-swap, Filter capacitor etc. The board is built on hight quality double layer FR4 board. You can check out the first photos here!

Getting Started with Serial RFID Reader

This pictorial step by step guide you show you how you can connect a serial RFID Reader to your PC using USB Port. Before you begin please read the following tutorial on RFID Technology and its application to make yourself familiar with it. Interfacing RFID Reader with AVR Also you will need the following modules, they can be purchased from our online store. Fig.: Serial RFID Reader.   Fig.: USB to TTL Converter.   Fig.: RFID Tags (Comes with the Reader). The RFID Reader is used to read the tags. The tags can be used to identify peoples. For example in a electronic door lock, the user just need to bring a tag (which can be a card or keychain) near the antenna. The system identify the user and present a welcome message (like "Welcome Mr. Steve"), then it prompts for password. Its like your ATM card but the advantage is that you don’t need to bring it out from your wallet. Just touch the wallet to the antenna, and that’s it! The USB to TTL Module is used to connect the RFID reader to PC. Connect the RFID reader to USB/TTL Converter as show in in the image below. Fig.: Connections. The connection is simple. All the PIN names are written on the PCBs itself so no confusion while […]

Happy Diwali !

We wish all our fans, followers, friends, customers, suppliers, manufactures, distributors and every one else a very very Happy Diwali. Diwali is one of the biggest festivals celebrated through out India. More info here at http://en.wikipedia.org/wiki/Diwali Also the shipping of orders will be suspended from 4 Nov (Thursday) as we are too busy with the celebration! Shipping will resume from Monday (8 Nov).

4×3 Matrix Keypad Interface – AVR Tutorial

Many application requires large number of keys connected to a computing system. Example includes a PC keyboard, Cell Phone keypad and Calculators. If we connect a single key to MCU, we just connect it directly to i/o line. But we cannot connect, say 10 or 100 keys directly MCUs i/o. Because :- It will eat up precious i/o line. MCU to Keypad interface will contain lots of wires. Buy Matrix Keypad We want to avoid all these troubles so we use some clever technique. The technique is called multiplexed matrix keypad. In this technique keys are connected in a matrix (row/column) style as shown below. Matrix Keypad Basic Connection The rows R0 to R3 are connected to Input lines of Microcontroller. The i/o pins where they are connected are made Input. This is done by setting the proper DDR Register in AVR and TRIS Register in PIC. The column C0 to C3 are also connected to MCUs i/o line. These are kept at High Impedance State (AKA input), in high z state (z= impedance) state these pins are neither HIGH or LOW they are in TRISTATE. And in their PORT value we set them all as low, so as soon as we change their DDR bit to 1 they become output with value LOW. One by One we make each […]