Вы находитесь на странице: 1из 4

To study about 8051 Microcontroller.

8051 Architecture

ALU
Arithmetic & Logical Unit (ALU) is capable of operating on byte level and byte
level and bit level. ALU performs arithmetic function like addition, subtraction,
multiplication and division It is also capable of performing logical functions normally
called Boolean functions.

Register A:
The A register is also called as accumulator. It is used for many operations,
particularly mathematical and logical operations, and Boolean biy manipulations. The A
register is also use for all data transfers between the 801 and any external memory.

Register B:

The B register is used with the A register for multiplication and division operation
and has no other function other than data storage.
PROGRAM COUNTER (PC):
The 8051 contain a 16-bit register called as program counter, which is use to hold
the address of a byte in program memory. The PC is automatically incremented after
every instruction byre is fetched. The PC is the only register that does not have an
internal address.

DATA POINTER (DPTR):


This is also 16-bit register, made up of two8-bit registers, named DPH and
DPL.They are used when memory addresses for internal and external code access and
external data access. DPTR does not have a single internal address; DPH and DPL are
each asigne4d an address. Normally it can be used in lookup table accessing method.

STACK POINTER (SP):


Stack is a part of RAM us used fir teno8irary data storing. Stack Pointer (SP)
points only to internal RAM of microcontroller. When system is switched ON, SP is
initialized to 07H.

PSW:
It is also called as program status word. PSW contain flag registers, which stores
1-bit result of contain program instruction. The 8051 has forur math flags: carry (c),
Auxiliary Carry (AC), Overflow (OV) and Parity (P). It also contains user program flag
(F0).

Internal Memory:
The 8051 has 128 bytes of internal RAM, called data memory and 4kb of internal
ROM, called program memory.
Internal RAM is divided in three categories
Four register banks (RBO-RB3), each containing eight registers.
16 bytes, which may be addressed at the bit level (20th -2Fh)
80 bytes of general- purpose data memory (30h 7Fh)
Internal ROM 4KB occupies code address space 0000h to 0FFFh.

External Memory:
Additional both RAM & ROM memory can be added up to 64KB externally
using suitable circuits. External memory fetched by connecting the external access pin
(EA pin no. 31 8051 chip) to ground

SPECIAL FUNTLIION TEGILSTER (SFR):


Special Function Register IP, IE, TMOD, TCON, SCON and PCON contain
control and status bits for the interrupt system, the Timer/Counters, and the Serial port.
IP, IE are use for interrupts.

SCON is used for serial communication.


TCON, TMOD are related with timer/counter.

I / O ports:
There are 32 Input / output pins arranged as four 8-bit ports; each port pin has a latch bit.
Port can be configured as input by writing logic1 and output by writing logic 0.
Port 0 : An 8-bit port for the input/output (I/O)and data bus cum lower order
address bus (AD0-AD7)
Port 1 : An 8-bit port for input/output (I/O)
Port 2: An 8-bit port for the input/output (I/O) and high order address bus (A8A15)
Port 3: An 8-bit port for the input/output (I/O) and alternate functions such as
serial interface bits (TXD,RXD), timer T0 and T1 inputs, interrupts INT0
AND INT1, Read and write signals

OSCILLATOR:
8051 HAS ON CHIP OSCILLATOR. Pins XTAL1 and XTAL2 are provided for
connecting a resonant network to form an oscillator. Crystal frequency ranges fro 1MHz
to 16MHz. The oscillator formed by the crystal, capacitors, and an on-chip inverter
generates a pulse train at the frequency of the crystal.

ALE/PROG:
ALE (address latch enable) is an output pin and is active high. When connecting
an 8031 to external memory, port 0 provides both address and data. The ALE pin is use
for demultiplexing th4e address and bus. This pin is also the program pulse input (PROG)
during EPROM Programming.

PSEN:
PSEN (Program store enable) is an output pin. PSEN is the read strobe to external
program memory. This pin is connected o the OE (output Enable) pin of the ROM. When
the device is executing out of external program memory, PSEN activated twice each
machine cycle. PSEN is not activated when the device is executing out of internal
Program Memory.

EA/Vpp:
EA (Enable Address) is an input pin and must be connected to either Vcc or GND.
When using internal memory, this pin is connected to Vcc (high logic) and when the CPU
has to execute external memory, this pin is connected to ground (low logic) to enable use
of external memory addresses. In the EPROM dvices. Then in also service the
programming supply voltage (Vcc) during EPROM programming.

RST:
Pin 9 is the RESET pin. It is an input and active high. A reset is accomplished by
holding the RST pin high for at least two machine cycles (24 oscillator periods), while
the oscillator is running.

Вам также может понравиться