Working with External Interrupts in AVR micro controller

Mathew Kevin July 10, 2017 3 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

Water Level Controller using 8051

admin January 23, 2018 178 Comments
Water level controller using 8051. A water level controller  using 8051 is shown in this article. A lot of water level controller projects have been published in this website but this is the first one based on a microcontroller. This water level controller monitors the level of the over head tank  and automatically switches on the water pump when ever the level goes below a preset limit. The level of the over head tank is indicated using 5 LED’s...
read more

Bubble Sorting with example in C/C++/Java

jojo September 17, 2012 6 Comments
Bubble sorting is one of the simplest sorting algorithm that we can use to sort an array or a structure. Though it is so simple to implement in a C program, bubble sort is also considered as an inefficient sorting algorithm. Bubble sort comes handy in cases where the total number of elements to be sorted is so small (may be in the 100’s range). When the data size is large/huge bubble sort is seldom used in practical programming world. Let’s...
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

Void pointers in C

jojo July 26, 2012 8 Comments
In this article we are learning about “void pointers” in C language. Before going further it will be good if you refresh about pointers by reading – Introduction to pointers in C.  A pointer variable is usually declared with the data type of the “content” that is to be stored inside the memory location (to which the pointer variable points to). Ex:- char  *ptr;       int  *ptr;      float  *ptr; A pointer variable declared using a...
read more

Introduction to pointers in C

jojo July 25, 2012 9 Comments
The basic purpose of developing a C programming tutorial for this website – CircuitsToday – is to make it useful for people who wish to work with embedded systems. Really good C programming skill is an essential to work with embedded systems and “Pointers” is the most important concept in C that should be mastered by an embedded systems programmer. “Pointers” are so important because it enables a programmer to work directly with memory of the system. Memory of...
read more

Compilers vs Interpreters – An overview of the differences

jojo July 19, 2012 5 Comments
It is a general notion that people try to classify programming languages as either “compiled” language or “interpreted” language. Even experienced programmers tend to get confused here! But the fact is, programming languages are neither “compiled” nor “interpreted” types. They can be both at the same time. Compiling or interpreting -both are 2 different ways of implementing the same program written using a programming language. A program written in C language can either be compiled or can be interpreted....
read more

How to Work With 32K crystal and AVR Microcontroller

Mathew Kevin July 10, 2017 4 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

How to use Turbo C/C++ to run your first C program

jojo July 18, 2012 20 Comments
There is no one in this world who is born as a programmer 😉 To write efficient programs using any languages you have to learn it by doing! You have to write as many different programs using as many different algorithms. You have to break codes, make errors, debug errors and sometimes you have to approach the same problem using 2 or 3 different logics. To learn “C language” efficiently, you must write a lot of different C programs...
read more

Download and Install Turbo C/C++ for Windows 7 (32 bit and 64 bit)

jojo July 18, 2012 31 Comments
There are many compilers available for C language for different platforms, of which Turbo C is the one used commonly for Windows operating systems. You may all know that Turbo C/C++ is a 16 bit compiler which was originally developed for Windows versions up to XP. Nowadays most people uses latest versions of Windows like Vista and Windows 7. The primary reason behind this shift in usage of operating systems is “stability”! Windows XP is an unstable operating system...
read more

Transmitting data from PC to LCD using UART of PIC16F628A

Anish July 17, 2012 12 Comments
Our world relies upon Communication. In today’s world, we can make almost anything communicate with everything! How about communication between a PC and a microcontroller (PIC)? Now, before making a PC and a PIC talk, if you are not sure about USART module and LCD, here are some good articles about them to just refresh: 1. PIC USART module – CT 2. A note on character LCD displays – CT In layman terms, a USART module in a PIC...
read more

Languages Used for Embedded Firmware Development

Mathew Kevin July 10, 2017 4 Comments
Introduction                 Every digital device that is driven by a CPU core processes some sort of digital information. Not all of them are digital data. In fact, major portion of them are some kind of instruction to the CPU. As we all know, they are patterns of zeros and ones. In groups, those zeros and ones are called as nibbles (a group of 4), bytes (A group of 8), half word (group of 16) and word (group of 32)....
read more

Interfacing DC motor to 8051

admin August 2, 2012 20 Comments
This article shows how to interface a DC motor to an 8051 microcontroller. Interfacing DC motor to 8051 forms an essential part in designing embedded robotic projects. A well designed 8051-DC motor  system  has essentially two parts. Firstly an 8051 with the required software to control the motor and secondly a suitable driver circuit. Most of the DC motors have  power requirements well out of the reach of a microcontroller and more over the voltage spikes produced while reversing the...
read more

Operators-Expressions and Escape Sequences in C -Chapter 3

jojo June 26, 2012 8 Comments
We are into third chapter of C programming in which we will discuss operators, operands, expressions and escape sequences. I assume that you have already gone through Chapter 1 – Data Types in C and Chapter 2 – Variables and Keywords in C. Operator – An operator is usually a symbolic representation of a particular operation. Ex:- +  means addition * means multiplication etc. Operand – An operand is usually the data upon which the operator performs an action....
read more

Variables and Keywords in C-Chapter 2

jojo June 22, 2012 1 Comment
In this chapter, I would like to explain variables and keywords in C language. I hope you have already gone through Chapter 1 – Data Types and Constants in C. Image Courtesy Variables A variable can be defined in many ways. At the basic level, a variable can be defined as a memory location declared to store any kind of data (which may change many times during program execution). It can also be defined as any quantity/entity which may...
read more

Interfacing Seven segment display to 8051

admin January 23, 2018 57 Comments
A Note about 7 segment LED display. This article is about how to interface a seven segment LED display to an 8051 microcontroller. 7 segment LED display is  very popular and it can display digits from 0 to 9 and quite a few characters like A, b, C, ., H, E, e, F, n, o,t,u,y, etc. Knowledge about how to interface a seven segment display to a micro controller is very essential in designing embedded systems. A seven segment...
read more

Data Types and Constants in C-Chapter 1

jojo June 20, 2012 7 Comments
To use any language in communication (to write/to speak), we need to understand it’s grammar first.  In the case of a programming language like C, the scenario is same as in the case of a communication language. We need to understand the grammar of C programming language first. So here begins:- In this article we explain Data Types and Constants The basic grammar of C can be explained through:- Data Types Constants Variables and Keywords Operators and Operands Control...
read more

External Interrupts handling in 8051

jojo August 16, 2012 8 Comments
In this article, I would like to introduce you to the concept of interrupts, how interrupts work, vector address, interrupt priority and how to write an ISR (interrupt service routine). “Interruption” in English language means a deviation from the normal routine. We know the processor is always busy executing some kind of instructions. What if there  occurs an urgent condition that we need to pause the processor from its current activities for some time and make it execute/do something...
read more

GPOS versus RTOS for an Embedded System

jojo June 12, 2012 7 Comments
Difference between a GPOS (Normal General Purpose Operating System) and an RTOS (Real  Time Operating System) The whole purpose of this article is to outline the basic differences between a GPOS (General Purpose Operating System) or a Normal OS as many people call it and an RTOS (Real Time Operating System). Let’s have a look. Image Courtesy The basic difference of using a GPOS or an RTOS lies in the nature of the system – i.e whether the system...
read more

The Facebook Wall Caption Contest – Winner Announced

jojo June 19, 2012 No Comments
WINNER ANNOUNCED Hi friends, The winner is – Indrajit Biswas ( We have contacted him over Facebook. Now awaiting his reply. Here is the screen shot of winning selection. Hello friends,  We are back with a cool contest using Facebook. This contest is open for any one with a Facebook account.  You only need to do two things to be a part of this exciting contest. 1) Like our website’s page in Facebook – here – CircuitsToday Facebook Page ...
read more

Interfacing LED and push button switch to 8051

admin June 18, 2012 19 Comments
This article is all about how to interface push button switches to an 8051 microcontroller. Push button switches are widely used in embedded system projects and the knowledge about  interfacing them to  8051 is very essential in designing such projects. A typical push button switch has two active terminals that are normally open and these two terminals get internally shorted when the push button is depressed. Images of a typical pushbutton switch is shown below. Circuit diagram. The circuit diagram for...
read more

Embedded Systems Career-An Outline

jojo June 6, 2012 149 Comments
Many students are not aware of the lucrative opportunities available in the field of Embedded Systems. Most graduates go after the popular “IT” industry to seek a good career. I think there are 2 reasons for this 1)lack of awareness 2) entry barrier. While studying most students may come across the name “Embedded Systems”. Apart from that they may not be aware of -“what is an embedded system”, how do they work, what knowledge and skills should be acquired...
read more

The story of Fibonacci series

jojo June 12, 2012 9 Comments
All of you must have heard about the term “Fibonacci series”. Many of you (including me) might have written programs in different programming languages to generate a “Fibonacci series”. It is quite interesting to see that tutorials of all programming languages would contain a problem to generate fibonacci series upto “N” terms.  Well, this made me a little curious. What is so important with this particular series? In mathematics, there may be a 100 or 1000 types of series...
read more

8051 Programming Tutorial-Chapter 1

jojo June 5, 2012 16 Comments
This article series is developed to teach you 8051 micro controller programming. I have divided this programming tutorial into a series of chapters as shown below. So you can start with Chapter 1 and then move to chapter 2 and chapter 3 and so on. So let’s begin the journey right now!  Note: Next chapters 1,2,3.. are under development phase. Please visit this page again for updates. Note: To test any of these program or to write one your...
read more