Vous êtes sur la page 1sur 41

Unit 2

8085 Microprocessor and 8051


Microcontroller
MICROPROCESSOR
Microprocessor is a semi conductor
component that incorporates the function of
central processing unit on a single chip.
simply central processing unit built on a
single chip (IC) is called microprocessor
such as intel pentium 1,2,3,4, core2, i3, i5
etc….
system designer must add RAM,ROM and
other peripheral on a single chip.
Desktop, laptops and notepads,…..
MICROCONTROLLER
A microcontroller is a small computer on a
single integrated circuit containing a processor
core, memory and programmable i/o. It is
designed for embedded applications.
Example automobile engine control
system, remote controls, office machines, toys
etc.
it is a small computer on a single
integrated circuit. It is also called as embedded
system.
Evolution of microprocessor
First generation microprocessor
• First microprocessor (1971)
• Intel 4004 (4 bit)
• It has limited memory and it is used in calculators and
video games.
• Toshiba’s 73472, rockwell international’s pps-4 etc…
Second generation
• Intel 8008 (1972), It is a first 8 bit micro processor PMOS
technology.
• intel 8080(1973), NMOS technology. Draw back is it need
three power supplies.
• In 1975 (intel 8085) and it uses only +5v supply.
• 12 bit microprocessor are
• Toshiba’s T3190, intersil’s IM6100.
Third generation(1978)
• Intel 8086,intel 80186, intel 8088, intel 80286,
motorola’s 68000,68010. 16-bit microprocessor
Fourth generation(1980)
• Intel iAPX432 is not popular. 32 bit
microprocessor
• in 1985 intel 60386 mostly used in desktop
computers.
Fifth generation
• Intel i860, 64 bit microprocessor
• SUN’s SPARC, ULTRASPARC, Power PC 620, Alpha
21064.
Features of 8085
• It is 8 bit general purpose microprocessor.
• It has NMOS technology.
• It has 40 pin dual in line package single chip
integrated circuit.
• It uses 5v dc supply for its operation.
• It operates with 3MHZ single phase clock.
• It has 8 bit data bus and 16 bit address bus.
• It provides serial input data (SID) and serial
output data (SOD) for simple serial interface.
Architecture of 8085
• Internal logic design of a microprocessor is
said to be architecture. It determines the
various operations performed by the
microprocessor
It consists of three main sections
• Arithmetic and logic unit
• Timing and control unit
• Set of register
ALU
• Addition
• Subtraction
• Logical OR
• Logical AND
• Logical EX-OR
• Complement
• Increment
• Decrement etc…..
Signal diagram of 8085 processor
Signal classification
• Address bus
• Data bus
• Control and status signals
• Power supply and frequency signals
• Externally initiated signals
• Serial I/O ports
ADDRESS BUS
• The address bus has 8 signal lines A8 – A15 which are
unidirectional.

DATA BUS / MULTIPLEXED BUS


• The other 8 address bits are multiplexed (time shared)
with the 8 data bits.
– So, the bits AD0 – AD7 are bi-directional and serve
as A0 – A7 and D0 – D7 at the same time.
CONTROL AND STATUS SIGNAL

IO/M S1 and S0 are status signal


RD and WR is a control signal
• ALE = Address latch enable. It is used to indicate the beginning of the
operation.

• RD = it is used to read the instruction which is stored in memory

• WR = it is used to write the instruction from input to memory

• IO/M =which shows that signals goes to memory or I/O

• S1 and S0 : Status signals to specify the kind of operation being


performed .Usually un-used in small systems.
S1 S0 OPERATION
0 0 HALT
0 1 WRITE
1 0 READ
1 1 FETCH
POWER SUPPLY AND CLOCK FREQUENCY SIGNALS

• VCC = +5 volt power supply


• VSS = ground reference
• X1 , X2 = input which drives an internal circuitry of the
microprocessor to produce a suitable clock for the
operation of the microprocessor.
• CLK = output which can be used for other digital Ics its
frequency is same at which processor operates.
EXTERNALLY INITIATED SIGNALS
• INTR = used to interrupt the input
• INTR = After INTR received it gives
anknowledgement
• TRAP = it shows the interrupt signal enable
• READY = it shows whether the peripheral is ready
or not (by providing high or low)
• HOLD = it indicates the process is going on
• RESET IN = it resets the program counter to zero
• RESET OUT = it indicates the CPU is being reset
• HLDA = It is the acknowledgement for HOLD. It
indicates that the hold request has been received
Addressing Modes of 8085
To perform any operation, we have to give
the corresponding instructions to the
microprocessor.
In each instruction, programmer has to
specify 3 things:
• Operation to be performed.
• Address of source of data.
• Address of destination of result
ADDRESSING MODES OF 8085

• Direct addressing
• Register addressing
• Register indirect addressing
• Immediate addressing
• Implicit addressing
Direct Addressing Mode
In this mode, the address of the operand is
given in the instruction itself.

LD A 2500 H = Load the contents of memory


location 2500 H in accumulator
• LD is the operation.
• 2500 H is the address of source.
• Accumulator is the destination.
Register Addressing Mode
• In this mode, the operand is in general
purpose register.

MOV A, B = Move the contents of register B to


A.
• MOV is the operation.
• B is the source of data.
• A is the destination.
Register Indirect Addressing Mode
• In this mode, the address of operand is
specified

• MOV A, M = Move data from memory


location specified by H-L pair to accumulator

• MOV is the operation.


• M is the memory location specified by H-L
register pair.
• A is the destination.
Immediate Addressing Mode
• In this mode, the operand is specified within
the instruction itself.

MVI A 05 H = Move 05 H in accumulator.

• MVI is the operation.


• 05 H is the immediate data (source).
• A is the destination.
Implicit Addressing Mode
• If address of source of data as well as address
of destination of result is fixed, then there is
no need to give any operand along with the
instruction.
CMA Complement accumulator.
• CMA is the operation.
• A is the source.
• A is the destination.
Intel 8085 instructions
Symbols Meanings
A Accumulator
addr 16 bit address of memory location
data 8 – bit data
data 16 16 bit data
r, r1,r2 A,B,C,D,E,H,L
A,B,C,D,E,H,L 8 bit register
H-L, B-C, D-E 16 bit register
PSW Program status word
rp One of the register pair
rh, rl High order, low order register pair
Symbols Meanings
Sp Stack pointer
PC Program counter
() Content of memory location
Are transferred to
˄ Logic AND
˅ Or
Exclusive or
˅
+, - Addition, subtraction
͍ Exchanged with
N Restart number (n = 0 to 7)
Data transfer group
1) MOV r1,r2 = (r1) (r2)
2) MOV r,M = [r] [[H-L]]
3) MVI r1, data = [r] data
4) LXI rp, data = [rp] data 16 bits
[rh] 8bit
[rl] 8 bit
5) LDA data = [A] [addr]
6) STA addr or STA data = [A] [addr]
7) LHLD addr = [load [H-L] pair direct]
1) [L] [addr]
2) [H] [addr+1]
ARITHMETIC GROUP
• ADD r (add register to accumulator)
[A] [A] + [r]
• ADD M = [A] [A] +[H-L]
• ADI data = [A] [A] + data
• SUB r = [A] [A] – [r]
• SUB M = [A] [A] – [H-L]
• INR r (increment to register content )
» = [r] [r] + 1
TIMING DIAGRAM OF 8085
• To perform machine cycle we need to carry
some necessary steps
• It has 7 basic machine cycles
1. Opcode fetch cycle (4T or 6T)
2. Memory read cycle(3T)
3. Memory write cycle(3T)
4. I/O read cycle(3T)
5. I/O write cycle(3T)
6. Interrupt acknowledgement(6T or 12T)
7. Bus idle cycle(2T or3T)
MICROCONTROLLER
Digital computer is built on a single IC. It
has CPU in addition it has a fixed amount of
RAM, ROM and other peripherals embedded on
a single chip.
Example automobile engine control
system, remote controls, office machines, toys
etc.
A microcontroller is a small computer on a
single integrated circuit contains processor core,
memory and programmable input / output
peripherals.
8051 microcontroller
• First microcontroller -Intel Corporation 1970
• it is classified based on their bit processed
• Like 8 bit MC and 16 bit MC
• 8051 is 8 bit MC
FEATURES OF 8051 MICROCONTROLLER
• 8 bit cpu
• On chip oscillator
• 4KB of ROM
• 128 bytes of RAM
• 21 register
• 32 I/O lines
• 64 KB address space for external data and
program memory
• Two 16 bit timer and counter
• Five interrupt structure
• Bit addressability
• Powerful bit processing capability
APPLICATIONS
• Robotics
• mp3 player, washing machines, electronic iron
and industries.

BLOCK DIAGRAM OF 8051 MC


• It is 8-bit microcontroller, means MC 8051 can
Read, Write and Process 8 bit data.
MICROPROCESSOR MICROCONTROLLER
Microprocessor are general purpose Microcontroller are special purpose digital
digital computers computers
It has many opcodes for moving data from It has one or two opcodes
external memory to the CPU
It is an IC which has only the CPU inside It has a CPU, in addition with fixed
them amount of RAM, ROM and other
peripherals embedded on a single chip
It has a high clock speed than It has low clock speed
microcontroller
It requires more hardware It requires less hardware
It is more flexible for design It is less flexible for design
Above 1GHZ 30 to 50 MHZ
It has high cost It has low lost
It cannot be used standalone It can be used standalone