8051 Interrupts An Interrupt is an external or internal event that halts or interrupts Microcontroller to inform it that a device needs its service. Contents: 1. Basics.2. Steps taken when interrupt occurs. 1. Basics : A microcontroller is able to give service to many Input and…
Java program to find the sum of principal and secondary diagonal elements.
In this article let’s learn how to find the sum of principle diagonal elements and secondary diagonal elements. Principal diagonal elements are those which start at the top leftmost element of matrix and end at the bottom rightmost element of a matrix. Secondary diagonal elements are vice-versa. Eg: If A…
8051 Program to Rotate DPTR value
Output 8051 Program to Rotate DPTR Value. ALGORITHM: Start. Load the value to be rotated in DPTR. Move the Lower nibble of DPTR in Accumulator. Rotate Left 8 bits along with carry. Move the Upper nibble of DPTR in Accumulator. Rotate Left 8 bits along with carry. Now we got…
8051 16 bit multiplication Program- Codes Explorer
8051 16 Bit Multiplication ALP ALGORITHM: Start. Load the MSB’s of Data in two different registers. Load the LSB’s of Data in other two different registers. Successive multiplication is carried out. The product obtained in the registers. The output is stored in the registers. End. For example if we are…
C++ : Read array of 10 Integers and Display
Read array of 10 integers and displaying them. “Array is the limited storage(as size mentioned) with ordered series or arrangement of same kind of data(int or float or char)” Example :Input is asked as : Enter the Array elements, Enter Values like 00,10,20,30,40,50,60,70,80,90 are stored in particular space of array.…
C++ Program to Swap two numbers.
“Swapping of integers is defined as the variables that are interchanged after swapping the variables,called as Swapping of integers” Example: If the input is given as a=5 and b=4 (before Swapping) The output will be as a=4 and b=5 (after Swapping). Input: a=20 and b=40, before swapping. Output:…
C++ Program to find whether the number is Palindrome or not.
“Palindrome number defined as the number in which the result is same hen the number/digit/result is reversed”. Example: 1. 52325. 2. GADAG. 1. Here in example 1. we can see that 5,2 is mentioned at first and center number is 3, where as last two numbers are…
Interfacing Seven Segment Display on 8051- C Code { Common Anode}
This code is a simple one . Here just a 7 seg display is attached to Port 0 of 8051 micro controller . The values can be calculated easily . One unit of 7 seg display has 7 different leds as its segments and also a dot at the bottom…
2-Dimensional array in java.
Two dimensional array is nothing but set of many one-dimensional array which is represented in usually rows and columns but they are stored in the continuous memory location. The syntax of the 2-D array is int twoD[][] = new int[4][5]; It allocates 4×5 int elements in an array which internally…
Embedded C to find the number of one's in a given 32bit number and optimize the code
Embedded C to find the number of one’s in a given 32bit number and optimize the code In this article let’s learn how to optimize a program.The program which is used for optimization is to find number of ones in a given 32bit number. First let’s write a simple code…
You must be logged in to post a comment.