Hello guys, Let’s see how to generate a lookup table for even numbers. There are three addressing modes in 8051 micro-controller: Immediate addressing mode, Direct addressing mode and indirect addressing mode. We use indirect addressing mode in this program to generate a lookup table for even numbers. Note: When we do division operation in 8051 […]

# 8051

## 8051 Assembly code to generate look up table for odd numbers

Hello guys, Lets see how to generate look up table for odd numbers. There are three addressing modes in 8051 micro-controller: Immediate addressing mode, Direct addressing mode and indirect addressing mode. We use indirect addressing mode in this program to generate look up table for odd numbers. Note: When we do division operation in 8051 […]

## 8051 code to find the sum of negative numbers stored in an array.

Program to find the sum of all negative numbers stored in an array. This program finds the negative numbers in an array and adds them.Basically negative number is one whose carry bit is 1. Algorithm 1)Initializing register R0 with the array address and register R1 with counter. 2)Storing the first value of array in accumalator. […]

## DC Motor Interfacing with 8051 Microcontroller – CodesExplorer

DC Motor Interfacing with 8051 Microcontroller Fig 1 DC Motor This Code is specially developed for ALS 8051 Evaluation Board. A DC motor basically converts direct current electrical energy into mechanical energy. They have a wide range of applications in bots and in other electronic devices. By interfacing DC motor to the microcontroller, we can do many things […]

## Stepper Motor Interfacing with 8051 Microcontroller – CodesExplorer

Stepper Motor Interfacing with 8051 Microcontroller Fig 1. Stepper Motor A stepper motor is a brushless motor which divides complete 360 degree rotation into steps. Each step has fixed angle and motor rotates along those angles.In this article we will be interfacing Stepper Motor with 8051 Microcontroller. In this article we will be rotating stepper […]

## 8051 code to find Permutation and Combination

This program finds the value of permutation and combination for given two input numbers Algorithm 1) Store the value of n to R0,store the value of r to R1 and store the value (n-r) to R2. 2) Compare if n>r continue the process, if n<r then stop computation, if n=r then assign permutation as n! […]

## GCD of two numbers using 8051 microcontroller.

This program finds the GCD of given two numbers and stores it in the register. Algorithm. 1) Store the num1 in R1 register and num2 in R2 register. 2) Compare whether num1>num2 and directly store result if num1=num2. 3) If num1>num2 assign numerator register to num1 and denominator register to num2 otherwise assign numerator register […]

## Password Based Door Lock System using 8051 Microcontroller

8051 code for Password Locking System This program is to take input from the keypad as the password which is set by the user and displays whether the password is correct or incorrect on LCD. ALGORITHM 1)Initializing the password in an array called pass. 2)Taking the inputs from the keypad. 3)The flag variable keeps the […]

## How to write Assembly programs in Keil 4 in 10 Steps

How to write ARM Assembly programs in Keil 4 in 10 Steps Creating an Assembly project in Keil 1. Open the Keil IDE by clicking on its icon on the desktop. 2. Choose New uVision Project from the Project menu. […]