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…
Tag: 8051
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,…
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…
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…
8051 Program to add two 16 bit Numbers (AT89C51) Microcontroller
8051 Program to add two 16 bit Numbers Below Code is Complied and Verified in Keil uVision 3. The .asm file is given below after the code. For clarifications and suggestion comment in the comment section ; 8051 ASSEMBLY CODE — CODESEXPLORER BLOG ; ALP TO ADD TWO 16 BIT…