You are on page 1of 5

[Type here]

Microcontroler 8051

INTRODUCTION

The 8051 microcontroller is a popular and widely used microcontroller architecture that was
introduced in the early 1980s by Intel. It has since become a standard in the microcontroller
industry and has been widely adopted by many manufacturers.

A microcontroller is a small integrated circuit that contains a processor core, memory, and
various peripherals, all on a single chip. The 8051 microcontroller is an 8-bit microcontroller,
which means it operates on 8-bit data at a time. It is based on the Harvard architecture, which
has separate program and data memory spaces.

Figure: Architecture of Microcontroller 8051

The 8051 microcontroller architecture consists of the following key components:

Central Processing Unit (CPU): The CPU of the 8051 microcontroller is responsible for
executing instructions and controlling the overall operation of the microcontroller.

Program Memory: The program memory holds the instructions that the microcontroller
executes. The 8051 microcontroller typically has 4 KB or 8 KB of on-chip program memory.

[Type here]
[Type here]

Data Memory: The data memory is used for storing data during program execution. The 8051
microcontroller usually has 128 bytes or more of on-chip data memory.

Input/Output Ports: The 8051 microcontroller has several input/output (I/O) ports that can
be used to connect external devices such as sensors, actuators, and displays.

Timers and Counters: The 8051 microcontroller has one or more timers/counters, which can
be used for tasks such as generating precise time delays, measuring time intervals, or generating
PWM signals.

Serial Communication: The 8051 microcontroller supports serial communication protocols


like UART (Universal Asynchronous Receiver-Transmitter) and SPI (Serial Peripheral
Interface), which enable communication with other devices.

Interrupts: The 8051 microcontroller has interrupt capabilities, allowing it to respond to


external events or internal conditions in a timely manner.

The 8051 microcontroller has a rich instruction set, including arithmetic, logical, and bitwise
operations, as well as various control flow instructions. It can be programmed in assembly
language or higher-level languages such as C. Due to its simplicity, low cost, and availability
of a wide range of development tools, the 8051 microcontroller has been widely used in
applications such as embedded systems, industrial control, automotive electronics, home
automation, and more.

Over the years, several enhanced versions and derivatives of the 8051 microcontroller have
been developed, offering additional features and improved performance while maintaining
software compatibility with the original architecture. These include the 8052, 80C51, and
various variants from different manufacturers. Overall, the 8051 microcontroller architecture
has stood the test of time and remains a popular choice for many embedded system designers
and hobbyists due to its versatility, ease of use, and extensive community support.

[Type here]
[Type here]

Pin Diagram

[Type here]
[Type here]

STEPS TO CREATE AND COMPILE Keil µVision-3/4 PROJECT:


1. Double Click on the µVision 5 icon on the desktop.
2. Close any previous projects that were opened using – Project -> Close.
3. Start Project – New Project, and select the CPU from the device database
(Database-Atmel- AT89C51RD2 or AT89C51RC2 as per the board).On
clicking ‘OK’, the following option is displayed. Choose ‘No’.

[Type here]
[Type here]

4. Create a source file (using File->New), type in the assembly or C program


and save this (filename.c) and add this source file to the project using either
one of the following two methods. (i) Project->Manage->Components,
Environment Books->addfiles-> browse to the required file -> OK
“OR” ii) right click on the Source Group in the Project Window and the
Add Files to Group option.

5. Build the project; using Project -> Build Project. µ


application and links. Any errors in the code are indicated by – “Target not
created” in the Build window, along with the error line. Debug the errors.
After an error free, to build go to Debug mode.

6. Now user can enter into Debug mode with Debug- Start / Stop Debug
session dialog. Or by clicking in the icon.
7. The program is run using the Debug-Run command & halted using Debug-

Stop Running. Also the (reset, run, halt) icons can be used.

Additional icons are (step, step over, and step into, run till
cursor).
8. The appropriate memory window is opened using View -> memory window (for
data RAM & XRAM locations), Watch window (for timer program), serial
window, etc to view to result.

9. Note: To access data RAM area type address as D: 0020h. Similarly to


access the DPTR region (XRAM-present on chip in AT89C51RD2) say
9000h location type in X: 09000H.

[Type here]

You might also like