Working with External Interrupts in AVR micro controller

Mathew Kevin July 10, 2017 5 Comments
Introduction to Interrupts                 Although micro controllers can accept inputs from Digital I/O Ports,interrupts are preferred for accepting inputs generated by external events. This is mainly because of the less attention required for an interrupt based program. An Interrupt Event directs the flow of program execution to a totally independent piece of code, known as “Interrupt Sub-Routine”. There are many sources of Interrupts that are available for a micro controller. Most of them are generated by the internal modules...
read more

How to Establish A PC-Micro controller USART communication

Mathew Kevin July 10, 2017 8 Comments
 Introduction USART is one of the primitive inter-device communication protocols. It is not used in modern computers. But still, a few mother boards come with the module necessary for an USART communication. Here, in the case of PCs, the port is known as COM port and it follows RS232 protocol. It is no different from USART except for the voltage levels and some additional signals. Commonly MAX232 IC is used to translate the voltage level. MAX232 is a simple...
read more

How to Work With SPI in AVR Micro Controllers

Mathew Kevin July 10, 2017 12 Comments
Introduction                 Micro controllers support wired communication protocols. Most of the time, microcontrollers come along with internal modules that support these protocols. The commonly supported protocols are: UART or USART communication SPI TWI USI etc. And few advanced protocols like: USB CAN Ethernet  etc. SPI stands for Serial Peripheral Interface and it is the simplest among all the communication protocols. 8bit data registers in the devices are connected by wires. These data registers works as shift registers and one...
read more

How to Work With 32K crystal and AVR Microcontroller

Mathew Kevin July 10, 2017 6 Comments
This article teaches you how to add 32K external crystal source to  AVR micro controller (Atmega8 ) with circuit diagram & C program. Introduction Timing-is one of the basic function, performed by the micro controllers. Every microcontroller has at least one timer/counter module in its architecture.  However if the counter is clocked internally a few issues may arise in some cases. Sometimes the clock frequency may not stable, or sometimes the clock frequency may be too high than necessary....
read more

Frequency counter circuit

Mathew Kevin July 10, 2017 5 Comments
Simple Frequency Counter You may have already seen various projects over many websites named Frequency counter, Digital Frequency Counter etc. I’m posting just another of them. Showing the use of timer/counter of AVR micro controller (Atmega8) in one of it’s form. This circuit can be used as a simple micro controller project for your engineering courses. Frequency of a periodic signal is the number of cycles it repeats per second!   So If we count the number of cycles recorded...
read more

Standard Library & String Formatting for AVR

Mathew Kevin July 10, 2017 4 Comments
Here in this article, I am planning to brief you through the Standard library of AVR-GCC. By the term “Standard Library” we mean the “Standard header” files like “stdio.h”, we commonly see in C programming language. Have you ever used String Formatting in ANSI C? Did you use Standard library functions? If you are familiar with C programming language, then you must be familiar with standard header files we write in the beginning of the program like “#include stdio.h“,...
read more

LCD Interfacing with AVR

Mathew Kevin July 10, 2017 78 Comments
Interfacing LCD Display in 8bit Mode I’ve already discussed about the LCD display in a note here in this website. You can read the Note on character LCD Display here. Now let us come to the interfacing side of LCD. Let us see the 8bit mode interfacing of the LCD display with an AVR micro controller first. I have added two circuits in this post 1) Interfacing LCD with Avr Atmega8 and 2) Interfacing with Atmega32. Towards the end...
read more

Handling the Digital Input Output in AVR Micro Controllers

Mathew Kevin July 10, 2017 9 Comments
I have already discussed about a few chapters necessary to get into AVR programming. Now this is the first article that deals with programming.  Let us start with the basics. Digital input output (I/O) is the basic feature supported by  AVR micro controller. To facilitate digital input output, three registers are associated with each port of the micro controller. Data Direction Register– This register determines which of the pins will act as an output port, and which of them...
read more

Avr Atmega8 Microcontroller – An Introduction

Mathew Kevin August 10, 2017 9 Comments
In my previous article, I’ve discussed about ATmega32. Now, let me introduce another member of AVR microcontroller family, the ATmega8. This member has many features similar to that of ATmega32. But it has reduced number of features and capabilities, yet it has enough features to work with. Now let me tell you that if you want to gather knowledge and at the same time want to do it in less cost than the budget of ATmega32, you can think...
read more

AVR GCC Library of AVR Studio – An Overview

Mathew Kevin July 10, 2017 No Comments
In embedded C, pre defined libraries play very important role in compiling a program and significantly reduce the code size for the same. However, the optimization and the output file size are very much dependent upon the compiler. In AVR Studio predefined library is pretty big and it is a very complex one. To offer portability a huge amount of work has been made in its Header files. What’s so interesting is that, AVR guys has been successful to...
read more