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…
Author: codesexplorer
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…
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…
ARM code: Assembly code to add numbers from array
ARM processor is used in all the Embedded systems that are being built now. Here I explain ARM assembly program to add numbers declared in an array. ALGORITHM: Start Create an array of numbers Initialize a counter register to the number of elements in an array Load base address of…
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…
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.…
0-99 7 segment Counter on LPC2148 ARM7 Development Board
Fig 1 7 Segment LED Display 0 – 99 7 Segment(SSD) Counter on LPC2148 ARM7 Development Board What is 7 Segment Display(SSD)? – A seven-segment display is a form of electronic display device for displaying decimal numbers (and some alphabets too). 7-segment displays are simply 7 LEDs placed in one same package. To change the displayed value, we…
Smallest of N numbers ARM Assembly Code
ARM Assembly Code to find smallest of N numbers and store value in memory This code is tested in Keil uVision 4. Developed for ARM LPC2148 by Abhay Kagalkar ARM Code : ;/*Program to find smallest of N numbers*/;/* By Abhay Kagalkar*/ AREA arr,codeENTRYmain ldr r0,=data1 ldr r3,=0x40000000 ldr r4,=0x05…
Stack: Data Structure algorithm
stack Stack is a data structure which has ordered list of similar data type. Stack is a Last In First Out (LIFO) structure. In simple words, stack is a like a bag; whatever you put at last comes out first. Now, lets understand the algorithm for stack. start Display push…