Sunday, June 23, 2013

fig:block diagram of 8051   


micro controller is single chip on which timer,counter,serial port,I/O ports,oscillator,memory in built.Intel was found 8051 micro controller in 1981 with in built memory in 8051 micro controller 4KB ROM,128byte RAM,2 timer/counter,crystal oscillator,4 I/O ports are inbuilt.the 8051 family controller is eight bit with 40 pins IC.

 
feature:
  • eight bit CPU each register A and B.
  • PC(program counter) and DPTR (data pointer) are two sixteen bit register.
  • eight bit program status word (PSW) register and stack pointer(SP).
  • 4KB internal ROM and 128Bytes internal RAM.
  • 32 inputs/outputs pins divided in four ports(P0-P1).
  • two 16 bit timer/counter:T0,T1
  • full duplex serial ports.
  • control register:TCON,SCON,TMOD,IP,IE.
  • five interrupt source.
  • oscillator and clock circuit.
  • support power down and idle mode for power saving.
FUNCTION OF EACH BLOCK OF 8051
ALU:
  • it arithmetic and logic units.
  • used to perform arithmetic and logical operation.
REGISTER A:
  • its call accumulator.
  • its used as destination in all arithmetic and logical instruction.
  • its also used in data transfer between 8051 and external memory.
REGISTER B:
  • its used with A in multiplication and division instruction.
PC(program counter):
  • its 16 bit register.
  • its used to store address of next instruction to be executed.
DPTR(data pointer):
  • its also 16 bit register.
  • used to store 16 bit data.
  • also store 16 bit address of external memory.
STACK POINTER(SP):
  • its 8 bit register.
  • store address of top of stack.
  • stack is part of RAM where data store temporary.
PSW(program status word):
  • its 8 bit register.
  • its contain flag register which are change after arithmetic and logical instruction.
  • its contain carry,auxiliary carry,parity,overflow and user define  flags.
  • also contain register bank selection bits.
INTERNAL MEMORY:
  • internal RAM is 128 byte and ROM is 4KB called program memory.
  • internal RAM divided in 3 parts.
  1.     32 bytes for register bank(four register bank each contain 8 register of 1 byte)(00-1Fh)
  2.     16 bit addressable area where u can access individual bit(20-2Fh)
  3.     80 byte for scratch pad area(30-7Fh).
EXTERNAL MEMORY:
  • we connect 64KB of external memory with 8051.
SPECIAL FUNCTION REGISTER(SFR):
  • IP,IE are used for interrupt.
  • TCON,TMOD used for timer/counter operation.
  • SCON for serial communication.
  • PCON for power saving modes.
I/O PORTS:
  • there are 32 pins for input and outputs.
  • in 8051 four I/O ports each contain 8 pins.
  • PORT 0:its provide 8 bit data as well as lower byte address(AD0-AD7).
  • PORT 1:it for input/output.
  • PORT 2:its provide higher byte of address.
  • PORT 3:its input/output ports as well as some alternative function provide.
OSCILLATOR:
  • its connected between XTAL1 and XTAL2 pins.
  • its generated clock pulse for controller.
ALE/PROG:
  • its demultiplex address and data bus which are multiplex(AD0-AD7).
  • initial ALE high so work as address bus then ALE become LOW so work as data bus.
PSEN:
  • its output pin.
  • which indicate program run from internal or external memory.
  • if high then program executing from external memory otherwise internal memory.
EA:
  • its input pin.
  • when using internal memory this connected with Vcc.
  • its connected to ground when used external memory.
RST:
  • its input pin and active high pins.
  • to restart micro controller we have to push this for at least two machine cycles.

0 comments:

Related Posts Plugin for WordPress, Blogger...
Subscribe to RSS Feed Follow me on Twitter!