Hi guys in this article let’s learn about class.You might be thinking that you use class in every single program but don’t know what is class so let’s start.Hope you’ll enjoy it 🙂 Class is the core of Java.Each every single thing in java is referred as object and class.…
Author: codesexplorer
8051 itimer interrupt program to display value of 'Y' at P0 and 'n' at P2. Also generate square wave of 10 KHz at P2^0 with timer0 in interrupt mode.Using XTAL@22MHz
I have explained the calculations for the timer in my previous post.please have a look . CODE: #include<REGx51.h> sbit sqwave=P2^0; void timer0() interrupt 1 { Â Â sqwave=~sqwave; Â //generating sq wave } void main() { Â TMOD=0x02; Â //Timer0 in 8 bit autoreload mode IE=0x82; //enabling intrupt TH0=0x47; //loading the calculated…
8051 timer Interrupt program to copy data from P0 to P1 ,while simultaneously generating square wave of time period 200 uS at P2^0 .
When it comes to interrupt programming , we have to consider some important registers. For this program the registers used are IE(interrupt enable),TCON(timer control),TMOD(timer mode). Â Â In timer interrupt programming calculating the value to be loaded to the timer is very important. Here XTAL frequency i have considered is…
Difference between static and non-static methods in java
In this article let’s learn how static and non-static methods are used in a program.Usually when we want to access class members we create the object of the class and then access through the object as reference.There is another way to do this without creating the object(accessing directly by class…
8051 Interrupts: Basics | Types | Programs |Timer interrupts | AT89C51
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…
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 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…
You must be logged in to post a comment.