Let’s see how write a ARM assembly code to find number of even numbers in an array. ALGORITHM Start Load the base address of array. Initialize a counter register to number of elements in array. Initialize a register(Rd) to zero to store number of even numbers. Load the value from array to a temporary register. […]

# Uncategorized

## 8051 code to find number of prime numbers in array stored in memory with starting address 0xA0

8051 code to find number of prime numbers in array stored in memory with starting address 0xA0 What is a prime number? Prime number is a number which divides by 1 and itself.So when we are taking in the program we have to take and check for the numbers which are not divisible by the […]

## 8051 code to check whether the number is prime or not…!!

8051 Program to check whether the given number is prime or not. What is a prime number? Prime number is a number which divides by 1 and itself.So when we are taking in the program we have to take and check for the numbers which are not divisible by the half of the number to […]

## 8051 code to find number of zeros and ones in a given number…!!

Program to find number of zeros and ones in a given number. In this article let’s learn how to find the number of zeros and ones in a number. The easy way to find the number of zeros is by rotating each bit with carry and checking whether the carry flag is set or reset. […]

## Interfacing LCD with 8051 using Keil C – AT89C51

LCD Interfacing-8051 AT89C51xD2 Introduction: A 16*2 Alphanumeric display with backlight is provided on Evaluation Board. Liquid Crystal Display (LCD) is widely used electronic display module and having a wide range of applications such as calculators, laptops, mobile phones etc. LCD in ALS 8051 Evaluation Board is connected to Port P2. Before we initialise the LCD Let us understand […]

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

Hello guys, Lets see how to generate look up 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 look up table for even numbers.Note: […]

## 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 […]

## 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 is 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 […]