some salient features of the 8051 microcontroller

  • On-chip RAM: Random access memory of 128 byte is used for data storage in 8051. RAM as a non-volatile memory consists of register banks, stacks for temporary data storage and some special function registers.
  • On-chip ROM: 8051 consists of 4KB ROM for program storage. ROM as a volatile memory helps in permanent data storage.
  • Timers and Counters: Timer helps in providing delay between the events. In 8051, there are two timer pins T0, T1. If these pins are used in the counter mode, we can count the external pulses. In T0, it is possible to store 16 bit data. This is done by storing the lower 8 bit in TL0 and the upper 8 bit in TH0. Similarly, we can store 16 bit data in T1 also. TMOD and TCON helps in the timer operation.
  • Serial Port: Inorder, to perform the serial communication, TXD and RXD pins are used. TXD pin is used for transmitting the serial data and the RXD pin is used for the transmission of the data. SCON register is used to control the operation of the serial communication.
  • Input and Output Ports: P0, P1. P2. P3 form the four ports of 8051 microcontroller. Each of the port is 8 bit wide. Port P0 is used as a Lower Order Address bus. Port P2 can be used as I/O port and higher order bus A8 to A15. Port P3 can be used as I/O pin and each pin of port 3 has special functions.
  • Oscillator – This is used to provide clock to the 8051 microcontroller. The crystal frequency can vary from 4MHz to 30MHz.
  • Interrupts - Interrupts are requests which are used to handle special events or routines known as Interrupt Service Routines. INT0 and INT1 are the basic interrupt pins used in 8051.
  • Arithmetic Logic Unit - This unit is used for arithmetic calculations.
  • Accumulator (A register) – This register is used for arithmetic operations.
  • B register – This is an 8bit register that is bit addressable and is used for two instructions only like MUL AB and DIV AB.
  • Program Counter – is a 16 bit register that helps to access address from 0000H to FFFFH. Program Counter is used to address the next instruction to be executed from the ROM.
  • Flag Bits and PSW register – The flag bits are used to indicate the arithmetic condition of the ACC. Program Status Word (PSW) is the flag resister in 8051. This register consists of four flags like Carry, Auxiliary Carry Flag, Register Select 1, Register Select 0, Parity Flag, Overflow flag.
  1. Parity Flag (P) – If the accumulator registers consists of odd number of 1’s, then the parity flag will be set to 1. While, if the accumulator register consists of even number of 0’s, then the parity flag will be 0.
  2. Carry Flag (CY) – This flag is set when there is a carry out from the D7 bit.
  3. Auxiliary Carry (AC) – If there is a carry out after addition or subtraction operation from D4 bit, then the AC is set. Otherwise, AC is cleared.
  4. Overflow Flag (OV) – This flag is set when the result of the signed operation is very big.
  5. Register Select (RS1 and RS0) – They are used to change the bank registers.


Post a Comment

If you have any questions or droughts feel free to ask here.