You are on page 1of 5

Microcontroller:

A microcontroller is a small, low-cost computer-on-a-chip which usually includes


An 8 or 16 bit microprocessor (CPU)
A small amount of RAM
Programmable ROM and/or flash memory
Parallel and/or serial I/O
Timers and signal generators
Analog to Digital (A/D) and/or Digital to Analog (D/A) conversion

Features of 8051 Microcontroller:

It is an 8bit microcontroller
It has 8 bit Accumulator and 8 bit ALU
It consist of 16-bit program counter(PC) and data pointer(DPTR)
It has 128 bytes of RAM and 4 Kilo Bytes of ROM
It consist of 16 bit address bus and 8 bit data bus
It has 128 user defined flags
It has two 16 bit Timer/ Counter
It has four I/O ports of 8 bits each
It has 4 register banks
It operates at a clock frequency of 12MHz
It consist of 128 special function registers each of 8 bits
It has 3 internal and two external interrupts
It can process 1 million one-cycle instructions per second

Block Diagram of 8051:

_____________________________________________________________________________________________
15ELN15/25 (Microcontrollers) Notes By Prof. PRAVEEN CHITTI, JCE
Belgaum

Architecture of 8051:

The 8051 Microcontroller is a Microcontroller designed by Intel in 1980's. It was based on Harvard
Architecture and developed primarily for use in Embedded Systems. These latest Microcontrollers require
less power to operate as compared to their predecessors. Microcontroller 8051 has two buses for
program and data. It has an 8 bit processing unit and 8 bit accumulator. It also includes 8 bit B register as
main processing blocks.

_____________________________________________________________________________________________
15ELN15/25 (Microcontrollers) Notes By Prof. PRAVEEN CHITTI, JCE
Belgaum

Central Processor Unit (CPU): As you may know that CPU is the brain of any processing device. It
monitors and controls all operations that are performed in the Microcontroller. User has no control over
the work of CPU. It reads program written in ROM memory and executes them and do the expected task.
Memory: Microcontroller requires a program which is a collection of instructions. This program tells
Microcontroller to do specific tasks. These programs require a memory on which these can be saved and
read by Microcontroller to perform specific operation. The memory which is used to store the program
of Microcontroller is known as code memory or Program memory. It is known as 'ROM'(Read Only
Memory). Microcontroller also requires a memory to store data or operands temporarily. The memory
which is used to temporarily store data for operation is known as Data Memory and we uses
'RAM'(Random Access Memory) for this purpose. Microcontroller 8051 has 4K of Code Memory or
Program memory that is it has 4KB Rom and it also have 128 bytes of data memory i.e. RAM.
Bus: Basically Bus is a collection of wires which work as a communication channel or medium for
transfer of Data.
Address Bus: Microcontroller 8051 has a 16 bit address bus. It used to address memory locations. It is
used to transfer the address from CPU to Memory.
Data Bus: Microcontroller 8051 has 8 bits data bus. It is used to carry data.
Oscillator: As we know Microcontroller is a digital circuit device, therefore it requires clock for its
operation. For this purpose, Microcontroller 8051 has an on-chip oscillator which works as a clock source
for Central Processing Unit. As the output pulses of oscillator are stable therefore it enables synchronized
work of all parts of 8051 Microcontroller.
Input/output Port: As we know that Microcontroller is used in embedded systems to control the
operation of machines. Therefore to connect it to other machines, devices or peripherals we require I/O
interfacing ports in Microcontroller. For this purpose Microcontroller 8051 has 4 input output ports to
connect it to other peripherals.
Timers/Counters: Microcontroller 8051 has 2 16 bit timers and counters. The counters are divided into 8
bit registers. The timers are used for measurement of intervals, to determine pulse width etc.

Stepper Motor:
Stepper motor is a widely used device that translates electrical pulses into mechanical movement.
It is used in applications like disk drives, dot matrix printers and robotics.
It has permanent magnet rotor called shaft surrounded by a stator as shown below.

_____________________________________________________________________________________________
15ELN15/25 (Microcontrollers) Notes By Prof. PRAVEEN CHITTI, JCE
Belgaum

Excitation Patterns:
A
1
1
0
0
1

A
0
1
1
0
0

B
0
0
1
1
0

B
1
0
0
1
1

Step Angle: Minimum degree of rotation associated with single step is called as step angle.
Ex. A stepper motor with step angle 1.8 needs 100 steps for 180 rotation

Microcontroller Based Stepper Motor Control System:

8051

STEPP
ER
MOTO

Driver
IC

_____________________________________________________________________________________________
15ELN15/25 (Microcontrollers) Notes By Prof. PRAVEEN CHITTI, JCE
Belgaum

The circuit consists of 8051 microcontroller, Driver IC and stepper Motor. 8051 microcontroller has
32 programmable I/O lines grouped into 4 ports. Stepper Motor is connected to one of these ports (Here
port1) through a driver IC as shown above. The driver IC is used to drive the current of the stepper motor
as it requires more than 60mA of current. The first four input pins are connected to the microcontroller. In
the same way, four output pins are connected to the stepper motor. Stepper motor has 6 pins. In these
six pins, 2 pins are connected to the supply of 5V and the remaining are connected to the output of the
stepper motor. Stepper rotates at a given step angle. The stepper motor has 4 coils which are activated in
the cyclic order using the excitation pattern shown above.

Microcontroller Vs Microprocessor
Microprocessors
1. The architecture includes the functional
blocks ALU, Registers, Instruction decoder,
and Timing & Control Unit
2. Used for general purpose applications
3. It is a heart of Computer System
4. Size is large and cost is more
5. It has many data movement instructions
6. It has one or two bit handling instructions
7. It has single memory map for data and code
8. Less number of pins are multifunctioned
9. Access Time is more
10. More flexible

Microcontrollers
1. All the functional blocks of microprocessor,
Internal memory, I/O ports, Timer, ADC, DAC
2. Used for special purpose control applications
3. It is a heart of embedded system
4. Size is small and cost is less
5. It has one or two data movement instructions
6. It has many bit handling instructions
7. It has separate memory map for data code
8. More number of pins are multifunctioned
9. Access Time is less
10. Less flexible

_____________________________________________________________________________________________
15ELN15/25 (Microcontrollers) Notes By Prof. PRAVEEN CHITTI, JCE
Belgaum

You might also like