    0

# Finding largest smallest number for 8051 microcontroller program?

Updated: 4/28/2022 Wiki User

11y ago

Clr psw.3

clr psw.4

mov r1, 05h

mov r0, #50h

dcr r1

mov 10h, @r0

up: inc r0

mov a, @r0

cjne a, 10h dn

ajmp

dn: jnc next

mov 10h,a

next: djnz r1 up

*:ajmp * Wiki User

11y ago   Earn +20 pts
Q: Finding largest smallest number for 8051 microcontroller program?
Submit
Still have questions?  Related questions

helicopter

### How do you build a keyboard?

Not that easy... You would need to know how to build and program a microcontroller well. You also need hardware to program a microcontroller. look at related links

### How do you program microcontroller in Matlab?

please any one tell me how

### Write a program that randomly fills a 10 component array then prints the largest and smallest values in the array?

final double[] ns = new double; final Random rnd = new Random(System.currentTimeMillis()); // Fill... for (int i = 0; i &lt; ns.length; ++i) { ns[i] = rnd.nextDouble(); } // Get largest/smallest... double largest = Double.MIN_VALUE; double smallest = Double.MAX_VALUE; for (double n : ns) { if (n &gt; largest) { largest = n; } if (n &lt; smallest) { smallest = n; } } // largest and smallest are now the proper values.

### How to write a C program for left factoring?

Name two variables x and y. Divide the largest by smallest. If remainder is zero then the smallest is the HCF.

### Is AT89C51 is already programmed when you buy it from market?

No.....You have to program it and upload in the microcontroller

66666

### How do you write program to read a set of real numbers and find the range is given by the difference between largest and smallest number?

Use the following algorithm (written in pseudocode). Let largest be the lowest possible real number. Let smallest be the greatest possible real number. Repeat while there is input... { Read real number r from input. If r is greater than largest then let largest be r. If r is less than smallest then let smallest be r. } End repeat. Let range be largest minus smallest. Output range.