8051 Timers and Counters

jojo October 27, 2014 3 Comments
In this article, we focus on Timers/Counters of the 8051 micro controller. The 8051 has two counters/timers which can be used either as timer to generate a time delay or as counter to count events happening outside the microcontroller.                       The 8051 has two timers: timer0 and timer1. They can be used either as timers or as counters. Both timers are 16 bits wide. Since the 8051 has an 8-bit architecture, each 16-bit is accessed as two separate registers...
read more

Interfacing dot matrix LED display to 8051

admin November 13, 2013 15 Comments
Interfacing dot matrix LED display to 8051 microcontroller. LED dot matrix display. An LED dot matrix display consists of a matrix of  LED’s arranged in a rectangular configuration. The desired character or graphics can be displayed by switching ON /OFF  a desired configuration of LED’s. Common display configurations available are 7×5, 8×8, 7×15, etc. LED dot matrix can be used in simple display applications where the resolution is not a big concern.  The figure below shows the arrangement of...
read more

Interfacing hex keypad to 8051

admin March 8, 2013 15 Comments
This article is about interfacing a hex key pad to 8051 microcontroller. A clear knowledge on interfacing hex key pad to 8051 is  very essential  while designing embedded system projects which requires character or numeric input or both. For example projects like digital code lock, numeric calculator etc. Before going to the interfacing in detail, let’s have a look at the hex keypad. Hex keypad. Hex key pad is essentially a collection of 16 keys arranged in the form...
read more

Delay using 8051 timer

admin November 28, 2012 11 Comments
Delay using 8051 timer.  The 8051 microcontroller has two independent 16 bit up counting timers named Timer 0 and Timer 1 and this article is about generating time delays using the 8051 timers. Generating delay using pure software loops have been already discussed here but such delays are poor in accuracy and cannot be used in sensitive applications. Delay using timer is the most accurate and surely the best method. A timer can be generalized as a multi-bit counter...
read more

Software delay routine in 8051 microcontroller

admin November 16, 2012 4 Comments
Software delay routine in 8051 In an 8051 microcontroller, it requires 12  cycles of the processor clock for executing a single instruction cycle.  For an 8051 microcontroller clocked by a 12MHz crystal, the time taken for executing one instruction cycle is 1µS and it is according to the equation,  Time for 1 instruction cycle= 12 /12MHz = 1µS.  The shortest instructions will execute in 1µS and other instructions will take 2 or more micro seconds depending up on the...
read more
Random number generator circuit

Random number generator using 8051

admin July 21, 2018 9 Comments
DIY Random number generator A  random number generator using 8051 that displays a random number between 0 & 99 is shown in this article. The circuit itself is very simple and may not find any applications in serious embedded projects and this article is just an illustration. The circuit is based on AT89S51 microcontroller, two seven segment LED displays, two transistors and few passive components. Circuit diagram List of components Microcontroller (AT89S51) – 1 nos Push button switches –...
read more

Voltmeter using 8051

admin October 4, 2012 14 Comments
Voltmeter using 8051. A simple 0-5V voltmeter using 8051 is shown in this article. This digital voltmeter has a sensitivity of  200mV which is a bit low but this project is meant for demonstrating how an ADC and seven segment display can be interfaced to 8051 to obtain a digital readout of the input voltage. A 31/2 digit high end voltmeter will be added soon. ADC0804 is the ADC and AT89S51 is the controller used in this project. Before...
read more

Interfacing DC motor to 8051

admin August 2, 2012 21 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

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

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