5 April, 2012

Addressing Modes in 8051

The CPU can access the data in various ways. The data could be in a register, or in memory or be provided as an immediate value. These various ways of accessing data are called addressing modes. The various addressing modes of a microprocessor are determined when it is designed, and therefore cannot be changed by the programmer.Read More

5 April, 2012

Bit Addresses for I/O and RAM

Many microprocessors such as X86 and Pentium allow programs to access registers and I/O ports in byte size only. In other words, if you need to check a single bit an I/O port, you must read the entire byte first and then manipulate the whole byte with some logic instructions to get hold of the desired single bit. This is not the case with the 8051. Read More

6 April, 2012

Swapping two numbers using function

The below program shows how to swap two numbers using functions. swapping means interchanging of two numbers, that is if we take two numbers like 4 and 5, after swapping the numbers become 5 and 4. Here in the program swap function is used with two parameters. The function prototype declared above the main function, and it is called in the main function. Read More

6 April, 2012

Print hello world without using semicolon

Print hello world without using semicolon program shows how to print something without using semicolon in the printf function. Here in the program if condition is used. Printf function is written in the if loop without using semicolon, so that output will come as hello world. Print hello world without using semicolon program shows how to print something without using semicolon in the printf function.Read More

6 April, 2012

Write a program to reverse, count, and add digits of a number

Program shows to reverse, count, and add digits of a number. The reverse of a given digit, number of digits in a given number and, addition of all digits in a given number can displayed by this program. Program shows to reverse, count, and add digits of a number. The reverse of a given digit, number of digits in a given number and, addition of all digits Read More

6 April, 2012

Print the even numbers between 1 to 25

The program below shows displaying even numbers between 1 to 25. Here simple for loop is used to display the even numbers. The program below shows displaying even numbers between 1 to 25. Here simple for loop is used to display the even numbers. The program below shows displaying even numbers between 1 to 25. Here simple for loop is used to display the even numbers. Read More

6 April, 2012

Displaying multiplication table

The program below displays multiplication table. depending upon the number entered by the user the multiplication table will be displayed.The program below displays multiplication table. depending upon the number entered by the user the multiplication table will be displayed.The program below displays multiplication table. depending upon the number entered by the user Read More

10 April, 2012

Pins Description Of The 8051 Microcontroller

Pins On The 8051 Microcontroller: 1–8 (Port 1): Each of these pins can be used as either input or output according to functionality. Also, pins 1 and 2 (P1.0 and P1.1) have special functions associated with Timer 2. 9-Reset Signal: high logical state on this input halts the MCU and clears all the registers. Bringing this pin back to Read More