Block diagram and pin diagram of 8051 micro controller.
Block diagram and pin diagram of 8051 microcontroller.
ALU: Arithmetic & Logical Unit (ALU) is capable of operating on byte level and bit level.ALU performs arithmetic functions like addition,subtraction,multiplication and division.It is also capable of performing logical functions normally called Boolean functions.
Register A:The register A is also called as accumulator.It is Used for many Operations,particularly mathematical and logical operations,and Boolean bit manipulations.The register A is also used for all data transfers between the 8051 and any external memory.
Register B:The register B is used with the A register for multiplication and division operations and has no other function than data storage.
Program Counter(PC): The 8051 contain a 16-bit register called as Program Counter,which is used to hold the address of a byte in program memory.The PC is automatically incremented after every instruction bye is fetched.The PC is only register that does not have an internal address.
Data Pointer: This Is also 16-bit register,made up of two 8-bit registers,named DPH and DPL.They are used when memory addresses for internal and external code access and extermal data access.DPTR does not have a single internal address;DPH and DPL are each assigned an address.Normally it can be used in lookup table accessing method.
Stack Pointer(SP): Stack is a part of a RAM is used for temporary data storage.SP points only internal RAM of microcontroller.When system is switched ON,SP is initialized to 07H.
PSW: It is also called a Program Status Word.PSW contain flag Registers,which stores 1-bit result of creation program instructions.The 8051 has four math Flags;Carry©,Auxiliary Carry(AC),Overflow(OV) and Parity(P).It is also contains user program flag(F0).
They 8051 has two types of memory
4 kb Rom
128 B Ram
8051 contains 128 bytes RAM address of RAM is ooh, and 7 Eh
RAM is divided in to three parts:
4 Rag bank ooh to 1Fh
16 bytes bit addressable RAM 20h to 2Fh
Scrath pad RAM
Register Bank :-
8051 has four register bank each bank has 8 register i.e.
bank 0=Ro to R7
bank 1= Ro to R7
bank 2= Ro to R7
bank 3= Ro to R7
In 8051 there are 4 port
EA: The 8051 is access. It is active law 8051 ac. CK ROH are on the chip a time connected to VCC but in 8051 case when it has no internal ROM at that time EA is connected to ground which says that device has internal ROM.
PSEN: It access an internal ROM connected to Vo but in 8051 case when it has Internal ROM at time EA is connected with signal.
Counter and timers: Counters are divided into two 8 register called, the timer high & low bytes. All counter action is controlled by bit status is the timer counter reg and contain program instruction.
When we do program in 8051 all that time work come so there are six interrupts
- Timer flag interrupt
- Serial port interrupts
- Interrupt control
- Interrupt parity
Flag is cleared to when resulting interrupts generalizes a prong all to the appropriate timers sub.
Serial port interrupt:
If a data byte is receiver an bit R is set to 1 in the SCON reg when a data byte has been X’ witted and interrupt it is set in SCON.
INT 1 and into are used by external CKT. It can be configured to either X’ mission actionated or the external depending upon value at the units.
Reset: It is gone is reset made by apply to high level to pin no-9 .There reset is done with the help of RC time contact.