Microprocessor 8085
Microprocessor 8085
Microprocessor 8085
• 8251- USART
• 8253/54- Programmable timer / counter
• 8255-PPI/PIO-Parallel i/p o/p device
• 8257/37- DMA controller
• 8259-PIC-Priority Interrupt controller
• 8279- Keyboard/Display controller
8251: Universal Synchronous Asynchronous
Receiver and Transmitter
Features:
>Used for serial Communication between
Microprocessor and Serial peripherals
>also known as communication Interface
>Decides data format for transmission
>In asynchronous mode, one start bit, 8 bit
data and 1 or 2 stop bits are transmitted
RS232C is a Serial Communication Standard
RS – Recommended standard for serial comm...
• Features of RS232C:
Modes of operation:
1. Mode0- Interrupt on terminal count
2. Mode1- Programmable one shot/hardware
retriggerable
3. Mode2- Rate generator
4. Mode3- Square wave generator
5. Mode4- Software triggered strobe
6. Mode5- Hardware triggered strobe
WRn 3
GATE
3 2 1 0
O/P
COUNT
3 STOPS 2 1 0
O/P
WRn 3
GATE
O/P 3 2 1 0
GATE
O/P 3 2 3 2 1 0
WRn 3
3 2 1 3 2 1
O/P 0 0
GATE
O/P
3 2 3 2 1 0
WRn 3
1 1 1
0 0
O/P
1 1 1 1
O/P
WRn 3
3 2 1 0
O/P
STROBE
GATE
O/P
COUNT
3 STOPS 2 1 0 STROBE
WRn 3
GATE 3 2 1 0
O/P
GATE
O/P
3 2 3 2 1 0
• 8255-PPI/PIO
-Programmable Peripheral Interface or
Parallel i/p o/p device
Features:
Has 24 i/o lines , i.e 3 ports-PortA,PortB,PortC
Port C- can be 4bit/ 8 bit Port
Group A signals->PA and PC7- PC4
Group B signals-> PB and PC3- PC0
Select lines A1 and A0 are used to select port
and CWR(Control Word Register)
CS A1 A0 SELECTION
0 0 0 PORT-A
0 0 1 PORT-B
0 1 0 PORT-C
0 1 1 CWR
Modes of operation
1.BSR Mode: Bit Set Reset Mode
Only Port C pins can be used to make 0/1
2.I/O Mode
Mode 0: Simple I/O mode
Any ports can be used as i/p or o/p
Mode 1: Strobed I/O mode
PA and PB ---- i/p or o/p
PC--- Control/ Handshake signals for PA & PB
Mode 2: Strobed Bi-directional I/O Mode
PA–> Bi-Directional Port
PB-> i/p or o/p port
PC- >to generate control signals.
Ex : BSR mode .
find control word to ‘set’ PC7.
D7 – D0 will be > 00001111=0FH
INTR STB
INTR i/p
Device
IBF
8255
8085
OBF
o/p
Device
ACK
8085 8259
INTA INTA
IR7 I/O 8
IR0
8085 8259
MASTER
IR0
INTA INTA
IR7 8259
SLAVE IR7
Pipelining Technique:
More than one instruction can be at different stages of
execution at a single interval of time, so speed
increases.
Memory Segmentation
• 1 MB of memory is divided into 16 logical
segments of each 64KB.
• Base Address: It indicates the starting location of
a particular segment. It is present in Segment
registers.
• Offset Address : It is the distance of required
memory location from the beginning of the
segment. It is present in offset or index registers.
• Physical/Effective Address: It is the distance of
required memory location from the beginning of
memory.
• Physical address calculation:
1. Shift the Base/Segment address by 4 bit
locations left or 1 hexadecimal digit.
Shifting is equalent to multiplying CS by 10H.
1. Add the offset address to the shifted
segment value.
Ex: CS 9000H & IP 0FFF H
90000 H
+ 0FFF H
90FFF H
Effective Adrs Base Adrs 1MB
00000H 0000H 0000h
64KB
0FFFFH FFFFh
1000H 0000h
10000H
64KB
FFFFh
2000H 0000h
64KB
FFFFh
F000H 0000h
64KB
FFFFFH FFFFh
Segment and Offset Registers:
1. Code Segment: To store program or code
Base Address : CS
Offset Address: IP
2. Data Segment: To store Data
Base Address : DS
Offset Address: BP/BX
3. Stack Segment: To store temporary data
Base Address : SS
Offset Address :SP
4. Extra Segment: Alternate Data segment
Base Address : ES
Offset Address: SI/DI
Range of segment address- 0000H to F000H
Range of offset address 0000H to FFFFH
Addressing modes
• There are two types of instructions in 8086
1.Sequential flow ---8 modes
2. Control transfer--- 4 modes
Effective address: DS * 10H + offset address
1. Immediate ---MOV AL, 80H
2. Direct ---MOV AL, [8000H]
3. Register---MOV AL, BL
4. Register Indirect---MOV AL, [BX]
5. Register relative---MOV AL, 06H[BX]
6. Indexed---MOV AL, [SI]
7. Based Indexed--- MOV AL, [BX][SI]
8. Relative based indexed -- MOV AL, 07H[BX][SI]
Ex:Mathematically effective address can be
written as DS * 10H + offset address for data
segment.
Control transfer:
1. Intra segment – Program control is
transferred within the same segment
2. Inter segment – Program control is
transferred from one segment to another.
Important Pins in 8086
• ALE – Address latch enable
1; All 20 line --- As address bus
0; A19 – A 16 status signals
AD15 – AD0 Data bus
AD15 – AD8 : Higher byte of Data bus
AD7 – AD0 : Lower byte of Data bus
BHE- Bus high enable,
-- 0; If AD15 – AD8 are used for Data/Address .
BHE is used along with A0 line for selecting the even or odd bank
of memory
BHE A0
0 0 --- whole word
0 1 --- odd bank byte
1 0 ---- even bank bye
1 1 --- Not used
• DT/R– Data transmit or receive for bidirectional
buffers
-- 0: Receive ; 1: transmit
• DEN -- To enable the data buffers when data is
transmitted through AD15 – AD0 lines
• LOCK – o/p signal , which indicates that Mp is
executing some important instruction having lock
prefix and buses can not be used by other
system.
• TEST -- 0: then only processor executes further
instruction, used with WAIT instruction.
Miscellaneous topics(for IES)
• Communication Interfaces
• Disadvantage of RS232C:
Slow in operation and can’t support voice data
synchronously
• Synchronous serial transfer protocols:
USART-Universal Synchronous Asynchronous
Receiver and Transmitter
SPI- Synchronous Peripheral Interface bus
IIC- Inter-Integrated circuit bus
CAN –Control Area Network bus
USB-Universal Serial Bus
SPI
Clock source is supplied only by transmitting
device
Receiving device must accept clock
Transmitting Unit- Master
Receiving Unit – Slave
Uses 3 wires for communication apart from the
ground.
MOSI: Master out slave in
MISO: Master in slave out
SCK : Clock source from master
SS : Slave select pin
IIC BUS
2 Wire synchronous bus with
SCK—Clock signal(by Master)
SDA– Data signal by both Master and slave
Used for inter IC Communication applications
Doesn’t require decoders as 7 bit address is
given for identifying slave
Multi master capability
CAN
Developed by BOSCH –For multi-master
broadcast system having 1mega bit per sec
Used for Automotive industry to replace
complex wiring with 2 wire bus
Has robust noise immunity and fault tolerance
A node in the bus may have a Microcontroller,
CAN controller, CAN transceiver
Uses 4 different message types:
Data frame, remote frame , error frame and
overload frame
Suitable in applications requiring large short
messages with high reliability
CAN is message based not address based
USB
Advantages
1. One interface for many devices
2. Automatic configuration
3. No power supply required
4. Loss less data transfers
5. Speed can be up to 1.5 Mbps to 480 Mbps
6. Low power consumption
7. It is a packet based protocol- start frame ,
transactions and handshake signals with ack and
nak controls
8. Has 4 wires-Gnd, 2 data, power supply
Thank you