Showing posts with label 8051. Show all posts
Showing posts with label 8051. Show all posts

Is 8051 worth studying now?

By With 2 comments:

First one have to spearate peripherals from CPU, you can put simple peripherals around an 8051 and extremely complex ones around a Cortex-M4 and vica versa. Selecting a device with simple peripherals should be part of the criteria when selecting a part to use for an intro training (Save the bluetooth, RF, USB ++ peripherals for the later courses). 

The 8051 is an old single accumulator CPU and it is outdated in regards to both performance and power consumption. The only adoption we see of it today is people who have large code bases and do not have the resources to port it to new micros, i.e. there is hardly any new code developed on 80561 compared to AVR, STM8, MSP430 and PICs. 

I would think that one would be better of by using an AVR (like fabLab is doing as well as Arduino), PICs or MSP430. These are still releatively simple architectures that all can connect to DMAs and different memory structures and work very well as a platform to learn the basics of computer architecture. If you learn a bit about all of them you can also see benefits of a linear address map vs paging etc. 
 
In short i would suggest a modern 8/16 bit architecture because:
- Still simple enough to use for your first projects
- Used in multiple industries today, so what you learn in school is 1-to-1 to what is expected from you when you start working
- Made for C.

Architecture of 8051 Microcontroller. Block Diagram and Construction of 8051

By With No comments:

Architecture of 8051 Microcontroller. Block Diagram and Construction of 8051 With Discription

The particular 8051 Microcontroller is really a Microcontroller created by Intel with 1980's. It absolutely was dependant on Harvard Architecture as well as formulated primarily with regard to use within Embedded Devices. At first it was formulated using NMOS engineering although since those calls for a lot more capacity to operate thus Intel remodeled Microcontroller 8051 using CMOS engineering as well as later on designs was included with the notice 'C' inside their identify, by way of example: 80C51. These kinds of newest Microcontrollers calls for a lesser amount of capacity to operate when compared with the predecessors. 
 You May Also Like: FEATURES OF 8051 MICROCONTROLLER

Architecture of 8051 is Similar To 89c51 , 8052, 89c52

 


Microcontroller 8051 possesses 2 busses regarding program as well as data. Hence it offers 2 storage spots of 64K Times 8 sizing regarding equally program as well as data. It has a good 8 tad processing product as well as 8 tad accumulator. Furthermore, it consists of 8 tad T sign-up as key processing blocks. Furthermore, it have any various other 8 tad as well as 16 tad signs up.
 
You May Also Like: LED Blinking Using Assembly Language – 8051

Microcontroller 8051 provide an integrated RAM MEMORY regarding internal processing. This storage is usually principal storage which is employed for storage devices of momentary data. It truly is Unpredictable storage my spouse and i. electronic. it is contents acquire disappeared once the electrical power is usually turned off.
 You May Also Like: 

Following is the block diagram of Microcontroller 8051. Let us have a look at each part or block of this Architecture:
Microcontroller 8051 89c51 - Block Diagram
Microcontroller 8051 - Block Diagram   

Explanation:
Central Cpu Unit(CPU): As you may know that COMPUTER may be the brain associated with any finalizing product. The idea computer monitors and also handles almost all procedures which can be carried out within the Microcontroller. Person have zero handle over the do the job associated with COMPUTER. The idea reads program prepared within RANGE OF MOTION recollection and also completes these individuals and also complete the predicted undertaking.

You May Also Like:  Clock circuit of 8051 8051 reset circuit.
Interrupts: Because it's name recommends, Interrupts is often a subroutine call that will stops Microcontroller's key procedure or do the job and also brings about it to be able to carry out a number of yet another program which can be much more significant during those times. Your element associated with Stop is incredibly useful because it facilitates within instances associated with urgent situation. Stops provides people the procedure to set with offer the ongoing procedure, carry out the subroutine then again resumes normal program delivery.
Your Microcontroller 8051 might be set up to the extent that it in the short term ends or pause the key program in the occurrence associated with affect. Whenever subroutine can be completed next the delivery associated with key program starts because normal. There are several affect resources within 8051 Microcontroller. a couple of advisors tend to be outside stops, a couple of timer stops and something serial vent affect.

Memory: Microcontroller has a plan a assortment of directions. The offer tells Microcontroller to do distinct duties. These kind of software programs has a recollection which these kinds of might be preserved in addition to go through simply by Microcontroller to complete distinct operations. The recollection which is utilized to keep the program associated with Microcontroller, is recognized as signal recollection or maybe Software recollection. It is recognized as 'ROM'(Read Just Memory).
 
Microcontroller additionally has a recollection for you to keep info or maybe operands quickly. The recollection which is utilized to quickly keep info intended for operations is recognized as Information Recollection in addition to many of us utilizes 'RAM'(Random Access Memory) for this specific purpose. Microcontroller 8051 has 4K associated with Program code Recollection or maybe Software recollection that is certainly it has 4KB Rom and it also get 128 bytes associated with info recollection my spouse and i. at the. RAM.

Bus: Basically Bus is a collection of wires which work as a communication channel or medium for transfer of Data. These buses consists of 8, 16 or more wires. Thus these can carry 8 bits, 16 bits simultaneously. Buses are of two types:
You May Also Like: Block diagram and pin diagram of 8051 microcontroller with description
  • Address Bus
  • Data Bus
Address Bus: Microcontroller 8051 has a 16 bit address bus. It used to address memory locations. It is used to transfer the address from CPU to Memory.
Data Bus: Microcontroller 8051 has 8 bits data bus. It is used to carry data.
Oscillator: As we know Microcontroller is a digital circuit device, therefore it requires clock for its operation. For this purpose, Microcontroller 8051 has an on-chip oscillator which works as a clock source for Central Processing Unit. As the output pulses of oscillator are stable therefore it enables synchronized work of all parts of 8051 Microcontroller.
Input/Output Port: As we know that Microcontroller is used in Embedded systems to control the operation of machines. Therefore to connect it to other machines, devices or peripherals we requires I/O interfacing ports in Microcontroller. For this purpose Microcontroller 8051 has 4 input output ports to connect it to other peripherals.
Timers/Counters: Microcontroller 8051 has 2 16 bit timers and counters. The counters are divided into 8 bit registers. The timers are used for measurement of intervals , to determine pulse width etc.

Translation between C and Assembly

By With No comments:

Translation between C and Assembly 

•A for-loop in C
    int z;
    for (z=255; z>0; z--)
      P1=z;


•A loop in Assembly
     MOV R2,#255
ABC: MOV P1,R2
     DJNZ R2,ABC

Write a C program to send out the value 44H serially one bit at a time via P1.0. The LSB should go out first.

By With 1 comment:

Write a C program to send out the value 44H serially one bit at a time via P1.0. The LSB should go out first.

Solution:



#include <reg51.h>

sbit P1b0 = P1^0;

sbit regALSB = ACC^0;

void main(void) {

  unsigned char conbyte = 0x44;

  unsigned char x;

  ACC = conbyte;

  for (x=0; x<8; x++) {

    P1b0 = regALSB;

    ACC = ACC >> 1; }


}

Write an 8051 C program to toggle all the bit of P0, P1 and P2 continuously with a 250 ms time dealy.

By With No comments:

Write an 8051 C program to toggle all the bit of P0, P1 and P2 continuously with a 250 ms time dealy.

Solution :

sfr P0 = 0x80;  // declare by yourself

sfr P1 = 0x90;  // declare by yourself

sfr P2 = 0xA0;  // declare by yourself

void MSDelay(unsigned int);

 // MSDelay is as same as 250ms


void main(void) {

  unsigned int z;  

  while(1) {       //repeat forever

    P0=0x55;      

    P1=0x55;      

    P2=0x55;      

    MSDelay(250);  //time delay

    P0=0xAA;      

    P1=0xAA;      

    P2=0xAA;      

    MSDelay(250);  //time delay

} }

Write an 8051 C program to toggle bits of P1 continuously with a 250 ms delay.

By With 8 comments:

Write an 8051 C program to toggle bits of P1 continuously with a 250 ms delay.

Solution:

#include <reg51.h>

void MSDelay(unsigned int);

void main(void) {

  while(1) {       //repeat forever

    P1=0x55;      

    MSDelay(250);  //time delay

    P1=0xAA;  

    MSDelay(250)    }}



Assume the program is tested for the DS89C420 with XTML=11.0592MHz. 
     
90ns =1275 = 114750ns = 1ms

void MSDelay(unsigned int itime) {

  unsigned int i,j;

  for (i=0; i<itime; i++)

    for (j=0; j<1275; j++); // 1ms delay

}

Write an 8051 C program to toggle bits of P1 continuously forever with some delay.

By With No comments:

Write an 8051 C program to toggle bits of P1 continuously forever with some delay.

Solution:




#include <reg51.h>

void main(void) {

  unsigned int x;

  for (;;) {   

    P1=0x55;      

    for (x=0;x<40000;x++); //time delay

    P1=0xAA;  

    for (x=0;x<40000;x++);   }}

Write an 8051 C program to toggle bit D0 of P1 50,000 times.

By With No comments:

Write an 8051 C program to toggle bit D0 of P1 50,000 times.



Solution:
#include <reg51.h>
sbit MYBIT=P1^0;
void main(void) {
  unsigned int z;
  for (z=0;z<50000;z++) {   
    MYBIT=0;
    MYBIT=1;
  }
}

Write an 8051 C program to send values of -4 to 4 to port P1.

By With 1 comment:

Write an 8051 C program to send values of -4 to 4 to port P1.



Solution:
#include <reg51.h>
void main(void)
{
  char mynum[]={+1,-1,+2,-2,+3,-3,+4,-4};
  unsigned char z;
  for (z=0; z<8; z++) 
    P1=mynum[z];  
}

Write an 8051 C program to toggle all the bits of P1 continuously.

By With No comments:

Write an 8051 C program to toggle all the bits of P1 continuously.



Solution:
#include <reg51.h>
void main(void) {
  for ( ; ; ) {   //repeat forever
    P1=0x55;      //0x: in hex (binary)
    P1=0xAA;      
  }
}

Write an 8051 C program to send hex values for ASCII characters.

By With No comments:

Write an 8051 C program to send hex values for ASCII characters of 0,1,2,3,4,5,A,B,C, and D to port P1.

Solution:

#include <reg51.h>

void main(void){
 
unsigned char mynum[]=“012345ABCD”;
 
unsigned char z;
 
for (z=0; z<10; z++)
   
P1=mynum[z];
}





Note: “012345ABCD” is stored in RAM and can be changed

Write an 8051 C program to send hex values for ASCII characters

Architecture of 8051 Microcontroller. Block Diagram and Construction of 8051

By With No comments:

Architecture of 8051 Microcontroller. Block Diagram and Construction of 8051

The 8051 Microcontroller is a Microcontroller designed by Intel in 1980's. It was based on Harvard Architecture and developed primarily for use in Embedded Systems. Originally it was developed using NMOS technology but as those requires more power to operate therefore Intel redesigned Microcontroller 8051 using CMOS technology and later versions came with a letter 'C' in their name, for example: 80C51. These latest  Microcontrollers requires less power to operate as compared to their predecessors.
You May Also Like: Introduction To Microcontroller 8051 & Features of Microcontroller 8051
              Microcontroller 8051 has two buses for program and data. Thus it has two memory spaces of 64K X 8 size for both program and data. It has an 8 bit processing unit and 8 bit accumulator. It also includes 8 bit B register as main processing blocks. It also have some other 8 bit and 16 bit registers.
             Microcontroller 8051 have an built in RAM for internal processing. This memory is primary memory and is used for storage of temporary data. It is Volatile memory i.e. its contents get vanished when the power is turned OFF.
Read Also: What is Difference Between Microcontroller And Microprocessor
Following is the block diagram of Microcontroller 8051. Let us have a look at each part or block of this Architecture:
Microcontroller 8051
Microcontroller 8051 - Block Diagram
Explanation:
Central Processor Unit(CPU): As you may know that CPU is the brain of any processing device. It monitors and controls all operations that are performed in the Microcontroller. User have no control over the work of CPU. It reads program written in ROM memory and executes them and do the expected task.


Interrupts: As its name suggests, Interrupt is a subroutine call that interrupts Microcontroller's main operation or work and causes it to execute some another program which is more important at that time. The feature of Interrupt is very useful as it helps in cases of emergency. Interrupts gives us a mechanism to put on hold the ongoing operation , execute a subroutine and then again resumes normal program execution.
             The Microcontroller 8051 can be configured in such a way that it temporarily terminates or pause the main program at the occurrence of interrupt. When subroutine is completed then the execution of main program starts as usual. There are five interrupt sources in 8051 Microcontroller. 2 of them are external interrupts, 2 timer interrupts and one serial port interrupt.
You May Also Like: What is Microcontroller? How it Works?

Memory: Microcontroller requires a program which is a collection of instructions. This program tells Microcontroller to do specific tasks. These programs requires a memory on which these can be saved and read by Microcontroller to perform specific operation. The memory which is used to store the program of Microcontroller, is known as code memory or Program memory . It is known as 'ROM'(Read Only Memory).
                   Microcontroller also requires a memory to store data or operands temporarily. The memory which is used to temporarily store data for operation is known as Data Memory and we uses 'RAM'(Random Access Memory) for this purpose. Microcontroller 8051 has 4K of Code Memory or Program memory that is it has 4KB Rom and it also have 128 bytes of data memory i.e. RAM.

Bus: Basically Bus is a collection of wires which work as a communication channel or medium for transfer of Data. These buses consists of 8, 16 or more wires. Thus these can carry 8 bits, 16 bits simultaneously. Buses are of two types:
You May Also Like: Advantages and Applications of Microcontroller
  • Address Bus
  • Data Bus
Address Bus: Microcontroller 8051 has a 16 bit address bus. It used to address memory locations. It is used to transfer the address from CPU to Memory.
Data Bus: Microcontroller 8051 has 8 bits data bus. It is used to carry data.

Oscillator: As we know Microcontroller is a digital circuit device, therefore it requires clock for its operation. For this purpose, Microcontroller 8051 has an on-chip oscillator which works as a clock source for Central Processing Unit. As the output pulses of oscillator are stable therefore it enables synchronized work of all parts of 8051 Microcontroller.

Input/Output Port: As we know that Microcontroller is used in Embedded systems to control the operation of machines. Therefore to connect it to other machines, devices or peripherals we requires I/O interfacing ports in Microcontroller. For this purpose Microcontroller 8051 has 4 input output ports to connect it to other peripherals.

Timers/Counters: Microcontroller 8051 has 2 16 bit timers and counters. The counters are divided into 8 bit registers. The timers are used for measurement of intervals , to determine pulse width etc.

keywords:8051 block diagram explanation, 8051 block diagram explanation pdf, 8051 block diagram pdf, 8051 block diagram ppt, 8051 block diagram download, 8051 block diagram explanation ppt, 8051 microcontroller block diagram explanation, 8051 microcontroller block diagram pdf, 8051 functional block diagram, 8051 internal block diagram, 8051 block diagram, 8051 block diagram and description, 8051 microcontroller block diagram ayala, 8051 architecture block diagram explanation, 8051 architecture block diagram description, 8051 architecture block diagram pdf, atmel 8051 microcontroller block diagram, 8051 controller block diagram, block diagram of 8051 microcontroller, 8051 block diagram description, 8051 microcontroller block diagram description, 8051 microcontroller block diagram with description pdf, digital thermometer using 8051 block diagram, explain 8051 microcontroller block diagram, block diagram for 8051 microcontroller, 8051 microcontroller functional block diagram, 8051 microcontroller functional block diagram pdf, microcontroller 8051 block diagram its description, intel 8051 block diagram, 8051 microcontroller internal block diagram, block diagram of ic 8051, interfacing lcd with 8051 block diagram, block diagram of 8051 trainer kit, 8051 microcontroller block diagram, 8051 microcontroller block diagram ppt, 8051 microprocessor block diagram, 8051 mc block diagram, 8051 microcontroller architecture block diagram, block diagram of 8051 microcontroller description, block diagram of 8051 microcontroller pdf, block diagram of 8051 microcontroller ppt, block diagram of 8051 microprocessor, block diagram of 8051 architecture, block diagram of 8051 mc, block diagram of 8051 pdf, functional block diagram of 8051 microcontroller, 8051 timer block diagram, block diagram of the 8051, 8051 uart block diagram, 8051 microcontroller block diagram with description, block diagram of 8051 with explanation,

8051 Microcontroller Pin Diagram

By With No comments:

8051 Microcontroller Pin Diagram

Pin Diagram Of 8051

 

8051 Microcontroller Pin Diagram

8051 Microcontroller Pin Diagram
8051 Microcontroller Pin Diagram
For explaining the pin diagram and pin configuration of microcontroller 8051, we are taking into deliberation a 40 pin Dual inline package (DIP). Now let’s study through pin configuration in brief:-
Pins 1 – 8:- recognized as Port 1. Different from other ports, this port doesn’t provide any other purpose. Port 1 is a domestically pulled up, quasi bi directional Input/output port.
Pin 9:- As made clear previously RESET pin is utilized to set the micro-controller 8051 to its primary values, whereas the micro-controller is functioning or at the early beginning of application. The RESET pin has to be set elevated for two machine rotations.
Pins 10 – 17:- recognized as Port 3. This port also supplies a number of other functions such as timer input, interrupts, serial communication indicators TxD & RxD, control indicators for outside memory interfacing WR & RD, etc. This is a domestic pull up port with quasi bi directional port within.
Pins 18 and 19:- These are employed for interfacing an outer crystal to give system clock.
Pin 20:- Titled as Vss – it symbolizes ground (0 V) association.
Pins- 21-28:- recognized as Port 2 (P 2.0 – P 2.7) – other than serving as Input/output port, senior order address bus indicators are multiplexed with this quasi bi directional port.


Pin- 29:- Program Store Enable or PSEN is employed to interpret sign from outer program memory.
Pin-30:- External Access or EA input is employed to permit or prohibit outer memory interfacing. If there is no outer memory need, this pin is dragged high by linking it to Vcc.
Pin-31:- Aka Address Latch Enable or ALE is brought into play to de-multiplex the address data indication of port 0 (for outer memory interfacing). Two ALE throbs are obtainable for every machine rotation.
Pins 32-39: recognized as Port 0 (P0.0 to P0.7) – other than serving as Input/output port, low order data & address bus signals are multiplexed with this port (to provide the use of outer memory interfacing). This pin is a bi directional Input/output port (the single one in microcontroller 8051) and outer pull up resistors are necessary to utilize this port as Input/output.
Pin-40: termed as Vcc is the chief power supply. By and large it is +5V DC.

related:8051 block diagram explanation, 8051 block diagram explanation pdf, 8051 block diagram pdf, 8051 block diagram ppt, 8051 block diagram download, 8051 block diagram explanation ppt, 8051 microcontroller block diagram explanation, 8051 microcontroller block diagram pdf, 8051 functional block diagram, 8051 internal block diagram, 8051 block diagram, 8051 block diagram and description, 8051 microcontroller block diagram ayala, 8051 architecture block diagram explanation, 8051 architecture block diagram description, 8051 architecture block diagram pdf, atmel 8051 microcontroller block diagram, 8051 controller block diagram, block diagram of 8051 microcontroller, 8051 block diagram description, 8051 microcontroller block diagram description, 8051 microcontroller block diagram with description pdf, digital thermometer using 8051 block diagram, explain 8051 microcontroller block diagram, block diagram for 8051 microcontroller, 8051 microcontroller functional block diagram, 8051 microcontroller functional block diagram pdf, microcontroller 8051 block diagram its description, intel 8051 block diagram, 8051 microcontroller internal block diagram, block diagram of ic 8051, interfacing lcd with 8051 block diagram, block diagram of 8051 trainer kit, 8051 microcontroller block diagram, 8051 microcontroller block diagram ppt, 8051 microprocessor block diagram, 8051 mc block diagram, 8051 microcontroller architecture block diagram, block diagram of 8051 microcontroller description, block diagram of 8051 microcontroller pdf, block diagram of 8051 microcontroller ppt, block diagram of 8051 microprocessor, block diagram of 8051 architecture, block diagram of 8051 mc, block diagram of 8051 pdf, functional block diagram of 8051 microcontroller, 8051 timer block diagram, block diagram of the 8051, 8051 uart block diagram, 8051 microcontroller block diagram with description, block diagram of 8051 with explanation,

Architecture Block diagram and components Of 8051 Microcontroller

By With No comments:

Architecture Block diagram and components Of 8051 Microcontroller 

Block Diagram of 8051

We had seen Architecture Block diagram and components Of 8051 Microcontroller today we will see Some more details of  Block diagram and components Of 8051 Microcontroller.

What is a microcontroller?


A complete computer system manufactured on a single chip is called a microcontroller.

The features of a microcontroller are similar to that of a microprocessor like registers, ALU, program counter, flags, stack pointer, etc. Along with these common features, a microcontroller has some additional features such as a clock circuit, internal RAM, ROM, serial and parallel I/O counter.

Using a microcontroller provides a great advantage that a program is stored in ROM that has an important role in managing the system's operations and functions. Since the program written into ROM is fixed that is, it cannot be altered or changed; as a result the operation of the system remains constant (unchanged) regardless of the instructions given to it. Hence, a microcontroller can be thought of a device containing on-chip program memory. A microcontroller can also be referred as a 'microcomputer'.

Now let us see the architecture and block diagram of 8051 microcontroller




Major components of Intel 8051 microcontroller


The 8051 microcontroller is an 8-bit microcontroller. Let us see the major components of 8051 microcontroller and their functions.

An 8051 microcontroller has the following 12 major components:

1. ALU (Arithmetic and Logic Unit)
2. PC (Program Counter)
3. Registers
4. Timers and counters
5. Internal RAM and ROM
6. Four general purpose parallel input/output ports
7. Interrupt control logic with five sources of interrupt
8. Serial date communication
9. PSW (Program Status Word)
10. Data Pointer (DPTR)
11. Stack Pointer (SP)
12. Data and Address bus.

8051 microcontroller-1

Now let us see the functions of each of these components

1. ALU


All arithmetic and logical functions are carried out by the ALU. 

Addition, subtraction with carry, and multiplication come under arithmetic operations.

Logical AND, OR and exclusive OR (XOR) come under logical operations.

2. Program Counter (PC)


A program counter is a 16-bit register and it has no internal address. The basic function of program counter is to fetch from memory the address of the next instruction to be executed. The PC holds the address of the next instruction residing in memory and when a command is encountered, it produces that instruction. This way the PC increments automatically, holding the address of the next instruction.

3. Registers


Registers are usually known as data storage devices. 8051 microcontroller has 2 registers, namely Register A and Register B. Register A serves as an accumulator while Register B functions as a general purpose register. These registers are used to store the output of mathematical and logical instructions. 

The operations of addition, subtraction, multiplication and division are carried out by Register A. Register B is usually unused and comes into picture only when multiplication and division functions are carried out by Register A. Register A also involved in data transfers between the microcontroller and external memory.

8051 microcontroller also has 7 Special Function Registers (SFRs). They are:

1. Serial Port Data Buffer (SBUF)
2. Timer/Counter Control (TCON)
3. Timer/Counter Mode Control (TMOD)
4. Serial Port Control (SCON)
5. Power Control (PCON)
6. Interrupt Priority (IP)
7. Interrupt Enable Control (IE)

4. Timers and Counters


Synchronization among internal operations can be achieved with the help of clock circuits which are responsible for generating clock pulses. During each clock pulse a particular operation will be carried out, thereby, assuring synchronization among operations. For the formation of an oscillator, we are provided with two pins XTAL1 and XTAL2 which are used for connecting a resonant network in 8051 microcontroller device. In addition to this, circuit also consists of four more pins. They are,

Internal operations can be synchronized using clock circuits which produce clock pulses. With each clock pulse, a particular function will be accomplished and hence synchronization is achieved. There are two pins XTAL1 and XTAL2 which form an oscillator circuit which connect to a resonant network in the microcontroller. The circuit also has 4 additional pins -

1. EA: External enable
2. ALE: Address latch enable
3. PSEN: Program store enable and
4. RST: Reset.

Quartz crystal is used to generate periodic clock pulses.

5. Internal RAM and ROM

ROM

A code of 4K memory is incorporated as on-chip ROM in 8051. The 8051 ROM is a non-volatile memory meaning that its contents cannot be altered and hence has a similar range of data and program memory, i.e, they can address program memory as well as a 64K separate block of data memory.

RAM

The 8051 microcontroller is composed of 128 bytes of internal RAM. This is a volatile memory since its contents will be lost if power is switched off. These 128 bytes of internal RAM are divided into 32 working registers which in turn constitute 4 register banks (Bank 0-Bank 3) with each bank consisting of 8 registers (R0 - R7). There are 128 addressable bits in the internal RAM.

8051 microcontroller-2

6. Four General Purpose Parallel Input/Output Ports


The 8051 microcontroller has four 8-bit input/output ports. These are:

PORT P0: When there is no external memory present, this port acts as a general purpose input/output port. In the presence of external memory, it functions as a multiplexed address and data bus. It performs a dual role.

PORT P1: This port is used for various interfacing activities. This 8-bit port is a normal I/O port i.e. it does not perform dual functions.

PORT P2: Similar to PORT P0, this port can be used as a general purpose port when there is no external memory but when external memory is present it works in conjunction with PORT PO as an address bus. This is an 8-bit port and performs dual functions.

PORT P3: PORT P3 behaves as a dedicated I/O port

7. Interrupt Control


An event which is used to suspend or halt the normal program execution for a temporary period of time in order to serve the request of another program or hardware device is called an interrupt. An interrupt can either be an internal or external event which suspends the microcontroller for a while and thereby obstructs the sequential flow of a program.

There are two ways of giving interrupts to a microcontroller – one is by sending software instructions and the other is by sending hardware signals. The interrupt mechanism keeps the normal program execution in a "put on hold" mode and executes a subroutine program and after the subroutine is executed, it gets back to its normal program execution. This subroutine program is also called an interrupt handler. A subroutine is executed when a certain event occurs.

In 8051, 5 sources of interrupts are provided. They are:

a) 2 external interrupt sources connected through INT0 and INT1
b) 3 external interrupt sources- serial port interrupt, Timer Flag 0 and Timer Flag 1.

The pins connected are as follows:

1. ALE (Address Latch Enable) - Latches the address signals on Port P0
2. EA (External Address) - Holds the 4K bytes of program memory
3. PSEN (Program Store Enable) - Reads external program memory
4. RST (Reset) - Reset the ports and internal registers upon start up

8. Serial Data Communication


A method of establishing communication among computers is by transmitting and receiving data bits is a serial connection network. In 8051, the SBUF (Serial Port Data Buffer) register holds the data; the SCON (Serial Control) register manages the data communication and the PCON (Power Control) register manages the data transfer rates. Further, two pins - RXD and TXD, establish the serial network.

The SBUF register has 2 parts – one for storing the data to be transmitted and another for receiving data from outer sources. The first function is done using TXD pin and the second function is done using RXD pin.

There are 4 programmable modes in serial data communication. They are:

1. Serial Data mode 0 (shift register mode) 
2. Serial Data mode 1 (standard UART)
3. Serial Data mode 2 (multiprocessor mode) 
4. Serial Data mode 3

9. PSW (Program Status Word)


Program Status Word or PSW is a hardware register which is a memory location which holds a program's information and also monitors the status of the program this is currently being executed. PSW also has a pointer which points towards the address of the next instruction to be executed. PSW register has 3 fields namely are instruction address field, condition code field and error status field. We can say that PSW is an internal register that keeps track of the computer at every instant.

Generally, the instruction of the result of a program is stored in a single bit register called a 'flag'. The are7 flags in the PSW of 8051. Among these 7 flags, 4 are math flags and 3 are general purpose or user flags.

The 4 Math flags are: 

• Carry (c)
• Auxiliary carry (AC)
• Overflow (OV) 
• Parity (P)

The 3 General purpose flags or User flags are: 

• FO 
• GFO
• GF 1

10. Data Pointer (DPTR)


The data pointer or DPTR is a 16-bit register. It is made up of two 8-bit registers called DPH and DPL. Separate addresses are assigned to each of DPH and DPL. These 8-bit registers are used for the storing the memory addresses that can be used to access internal and external data/code.

11. Stack Pointer (SP)


The stack pointer (SP) in 8051 is an 8-bit register. The main purpose of SP is to access the stack. As it has 8-bits it can take values in the range 00 H to FF H. Stack is a special area of data in memory. The SP acts as a pointer for an address that points to the top of the stack.

12. Data and Address Bus


A bus is group of wires using which data transfer takes place from one location to another within a system. Buses reduce the number of paths or cables needed to set up connection between components.

There are mainly two kinds of buses - Data Bus and Address Bus

Data Bus: The purpose of data bus is to transfer data. It acts as an electronic channel using which data travels. Wider the width of the bus, greater will be the transmission of data.

Address Bus: The purpose of address bus is to transfer information but not data. The information tells from where within the components, the data should be sent to or received from. The capacity or memory of the address bus depends on the number of wires that transmit a single address bit.

tags:8051 block diagram explanation, 8051 block diagram explanation pdf, 8051 block diagram pdf, 8051 block diagram ppt, 8051 block diagram download, 8051 block diagram explanation ppt, 8051 microcontroller block diagram explanation, 8051 microcontroller block diagram pdf, 8051 functional block diagram, 8051 internal block diagram, 8051 block diagram, 8051 block diagram and description, 8051 microcontroller block diagram ayala, 8051 architecture block diagram explanation, 8051 architecture block diagram description, 8051 architecture block diagram pdf, atmel 8051 microcontroller block diagram, 8051 controller block diagram, block diagram of 8051 microcontroller, 8051 block diagram description, 8051 microcontroller block diagram description, 8051 microcontroller block diagram with description pdf, digital thermometer using 8051 block diagram, explain 8051 microcontroller block diagram, block diagram for 8051 microcontroller, 8051 microcontroller functional block diagram, 8051 microcontroller functional block diagram pdf, microcontroller 8051 block diagram its description, intel 8051 block diagram, 8051 microcontroller internal block diagram, block diagram of ic 8051, interfacing lcd with 8051 block diagram, block diagram of 8051 trainer kit, 8051 microcontroller block diagram, 8051 microcontroller block diagram ppt, 8051 microprocessor block diagram, 8051 mc block diagram, 8051 microcontroller architecture block diagram, block diagram of 8051 microcontroller description, block diagram of 8051 microcontroller pdf, block diagram of 8051 microcontroller ppt, block diagram of 8051 microprocessor, block diagram of 8051 architecture, block diagram of 8051 mc, block diagram of 8051 pdf, functional block diagram of 8051 microcontroller, 8051 timer block diagram, block diagram of the 8051, 8051 uart block diagram, 8051 microcontroller block diagram with description, block diagram of 8051 with explanation,