SlideShare a Scribd company logo
Programmable Peripheral
Interface Devices
Support chips: 8155, 8255, 8279, 8254, DMA
Controller, Interrupt Controller, USART
Programmable Interface
Devices
 Programmable Interface Device
 used to interface a I/O device to the microprocessor
 It is a multifunction device designed to use in minimum
mode system
 It contain RAM, I/O ports and Timer
8085
Programmable
I/O
Interface
I/O
Devices
System Bus
Requirement for PPI
 I/P & O/P Regs: A group of latches to
hold data
 Tri-State Buffer
 Capability of Bidirectional data flow
 Handshake & Interrupt signal
 Control Logic
 Chip Select Logic
 Interrupt control logic
8155 – A multipurpose
programmable interface
 Designed to be compatible with 8085
 It includes
◦ 256 bytes of Read/Write memory
◦ Three I/O ports
 Port A (8-bit)
 Port B (8-bit)
 Port C (6-bit)
◦ A 14-bit timer
◦ Internal address latch to Demux AD0-
AD7, using ALE line
Block Diagram - 8155
256 X 8
Static
RAM
A
B
CTimer
8
8
6
Port A
Port B
Port C
PA0-7
PB0-7
PC0-5
8AD0-7
IO/M
CE
ALE
RD
WR
Timer CLK
TIMER OUT
Vcc (+5 V)
Vss (0 V)
RESET
I/ODevices
8085
Application design with 8155
 Objectives
◦ Interfacing 8155 with 8085
◦ Programming 8155
8085
Interfacing 8085 with 8155
256 X 8
Static
RAM
A
B
CTimer
8
8
6
Port A
Port B
Port C
8AD0-7
IO/M
CE
ALE
RD
WR
RESET
A15
8085 8155
 Configurable Device Example
 Latch Direction
A
B
Direction Chip
Select
Programming 8155
 8155 is a Programmable Peripheral
Interface
 8085 can send data to 8155 using
data bus
 This data can be
◦ For I/O devices connected to 8155
◦ Timer registers of 8155
◦ Instruction/Command word for 8155
 Commands for 8155 are stored in a 8-
bit Control Register inside 8155
 Program
MVI A,01 H ; Set Do=1, D1-D7==0
OUTFFH ;Write in control register
MVI A,BYTE1 ;Load data bye
OUTFEH ; Send Data out
7A
0A
DIR
G: Enable
7B
0B
Control
Reg
D0
D1
D7A7
A6
A5
A4
A3
A2
A1
A0
3 to 8
Decoder
CWR
Port
A
Port
B
Port
C
Timer
MSB
LSB
Latch
Clock for timer
PA0-PA7
PB0-
PB7
PC0-
PC5
Timer
Out
A0
A1
A2
ALE
AD0-AD7
A0-A7
D7-D0
0
1
2
3
4
5
CEb
A2 A
1
A0 Port (ALE
high,
AD0=A0)
0 0 0 Command
/Status
Register
0 0 1 PA
0 1 0 PB
0 1 1 PC
1 0 0 Timer LSB
1 0 1 Timer MSB
3 to 8
Decoder
04
A13
A12
A11
A15
A14
A2
A1
A0
5
V
3 to 8
Decoder
RAM
Cont
rol
CWR
Port
A
Port
B
Port
C
Timer
MSB
LSB
Latc
h
Clock for timer
PA0-
PA7
PB0-
PB7
PC0-
PC5
Timer
Out
Reset in
RD
WR
A0
A1
A2
ALE
C
E
IO/M
IO/
M
AD0-AD7
A0-
A7
D7-
D0
20H
21H
22H
23H
24H
25H
CS
What type of Commands can be
given to 8155?
 To configure the I/O ports as Input or
Output
 To start/stop timer etc.
 To use handshake mode or not
Control word for 8155
 A command/instruction for 8155 is also
called control word
 This control word is written to control
register of 8155
 Control word of 8155 is of 8-bits
Control Word Definition for
8155
D0
D1
D2
D3
D4
D5
D6
D7
D3 D2 PORT C
0 0 ALT1
0 1 ALT2
1 0 ALT3
1 1 ALT4
D7 D6 Timer
0 0 NOP
0 1 Stop
1 0 Stop
after TC
1 0 Start
Port A
Port B
0, Input
1, Output
Port C
Interrupt Enable Port A
Interrupt Enable Port B
0, Disable
1, Enable
Timer
I/O functions of Port C
ALT D3 D2 PC5 PC4 PC3 PC2 PC1 PC0
ALT1 0 0 I I I I I I
ALT2 0 1 O O O O O O
ALT3 1 0 O O O STBA BFA INTRA
ALT4 1 1 STBB BFB INTRB STBA BFA INTRA
I = Input O = Output
STB = Strobe BF = Buffer Full INTR = Interrupt Request
The 8155 timer consists of two 8-bit registers.
1. 8-bit LSB and 8-bit MSB.
2. In these 16 bits, 14 bits are used for counter and two bit for
mode selection.
3. The counter is a 14 bit down counter. It can operate in 4
different modes of operation.
We can select mode using two bits M2 and M1
 00(Mode 0)- Single Square Wave
 01(Mode 1)- Square Wave
 10(Mode 2)- Single Pulse on TC(terminal count)
 11(Mode 3)- Pulse every TC
 Mode 0: In this mode, timer gives only one cycle of
square wave, the output remains high for 1/2 count
and remain s low for 1/2 count. If count is odd it
remains high for (n+1)/2 and low for (n-1)/2. Where n
is count value. Wave width depends on two factor: one
is Input clock pulse frequency, and the other is count
loaded in counter.
 Mode 1: This mode is similar to single square wave in
operation but the when counter becomes zero, the
count value is automatically reloaded. Thus it provides
continuous square wave.
 Mode 2: This mode gives a single clock pulse as a
output of the end of the count The output is high
normally, but it becomes low for 1 clock pulse and
again it will become high and remain high.
 Mode 3: This mode is similar to mode 2 but when the
counter becomes zero the count value is
automatically reloaded. Thus it provides continuous
pulses.
Design an interfacing circuit to read data from an A/D
converter using the 8155A in the peripheral mapped I/O.
(Example)
8085
3-to-8 Decoder
A/D
Converter
Analog
Input
Digital
Input
P
o
r
t
A
AD0-AD7
O0O7
8155
P
o
r
t
C
P
o
r
t
B
SOC
OE
EOCO2
CE
E2
E1
A2
A1
A0A11
A12
A13
A14
A15
IO/M
RD
WR
RESET
ALE
LED
Display
BFA
STBA
PC5
Port Addresses of 8155
A2 A1 A0 Port
0 0 0 Control/Status
Register
0 0 1 Port A
0 1 0 Port B
0 1 1 Port C
1 0 0 LSB Timer
1 0 1 MSB Timer
Chip Selection
A7 A6 A5 A4 A3
0 0 0 1 0
= 10H
= 11H
= 12H
= 13H
= 14H
= 15H
Application Programming
Logic
1. Configure 8155
2. 8085 sends SOC command to ADC
3. 8085 communicates with ADC
using PortC in handshake mode
4. 8085 reads 8-bit temperature value
from port A
5. 8085 displays the temperature
value on the LED display
1. Configure 8155 I/O Ports
 Port A as INPUT port
 Port B as OUTPUT
port
 Port C in ALT3 mode
ALT D3 D2 PC5 PC4 PC3 PC2 PC1 PC0
ALT3 1 0 O O O STBA BFA INTRA
SOC EOC OE
Control Word for configuration
D0
D1
D2
D3
D4
D5
D6
D7
D3 D2 PORT C
0 0 ALT1
0 1 ALT2
1 0 ALT3
1 1 ALT4
D7 D6 Timer
0 0 NOP
0 1 Stop
1 0 Stop
after TC
1 0 Start
Port A
Port B
0, Input
1, Output
Port C
IE Port A
IE Port B
0, Disable
1, Enable
Timer
0
1
0
1
0
0
0
0
Program Instructions for configuration
 Data
◦ Control word : 0AH
 Port Address
◦ Address of Control register : 10H
 Instructions
◦ MVI A, 0AH
◦ OUT 10H
2. 8085 sends SOC command to
ADC
 A small duration pulse on SOC input of
ADC will start conversion process
 SOC input of ADC is connected to port
pin PC5 of Port C (Port address 13H)
 Data
◦ Data value 20H followed by 00H
ALT D3 D2 PC5 PC4 PC3 PC2 PC1 PC0
ALT3 1 0 O O O STBA BFA INTRA
SOC
1 0 0 0 0 0
 Instructions
Start: MVI A, 20H
OUT 13H
MVI A, 00H
OUT 13H
3. 8085 communicates with ADC
using Port C in handshake mode
 Port A used to input 8-bit data from
ADC
 Port C used for handshakingALT D3 D2 PC5 PC4 PC3 PC2 PC1 PC0
ALT3 1 0 O O O STBA BFA INTRA
EOC OE
 ADC resets EOC to LOW at end of
conversion
 8155 sets BF to 1 to enable ADC output
latch
 8085 is waiting for BF to be SET to 1 and
◦ Reads port A by making RD signal active (0)
 At the end of read cycle RD goes HIGH
(1)
 This resets BF signal to 0.
 8085 waits for BF signal to be RESET
and
◦ starts conversion process again
8085 is waiting for BF
 To know the status of BF signal 8085
reads status register of 8155
 Status register shares same address as
control register
X Timer INTEB BFB INTRB INTEA BFA INTRA
D7 D6 D5 D4 D3 D2 D1 D0
Status Word Definition
Program Instructions
 8085 reads status register
◦ Address of status register : 10H
◦ Reads port A if BFA = 1
◦ Output temperature on port B
Status: IN 10H
ANI 02H
JZ Status
IN 11H ;Step -4 Reads temperature value
OUT 12H ; Step –5 display on
 8085 reads status register
◦ Address of status register : 10H
◦ Starts conversion again if BFA = 0
Again: IN 10H
ANI 02H
JNZ Again
JMP Start
Complete Program
MVI A, 0AH
OUT 10H
Start: MVI A, 20H
OUT 13H
MVI A, 00H
OUT 13H
Status: IN 10H
ANI 02H
JZ Status
IN 11H
OUT 12H
Again: IN 10H
ANI 02H
JNZ Again
JMP Start
 Configure 8155
 Start Conversion
 Read Status register
 Wait till BFA = 1
 Read temperature value
 Display on LED
 Read status register
 Wait till BFA = 0
 Start Conversion again
8155
PA7
PA6
PA5
PA4
PA3
PA2
PA1
PA0
PB7
PB6
PB5
PB4
PB3
PB2
PB1
PB0
AD7
to
AD0
IO/Mb
ALE
RDb
WRb
RESET OUT
IO/Mb
ALE
RDb
WRb
RESET OUT
7 Seg
LED
Driver
7 Seg
LED
Driver
7 Seg
LED
Driver
7 Seg
LED
Driver
3 to 8
Decoder
04
A13
A12
A11
A15
A14
A2
A1
A0
5V
 Port Address
◦ Control Register=20H, Port A= 21H, Port B= 22H
 Control word:
 Program
◦ MVI A,03 ; initialize Port A &B for O/P
◦ OUT 20H
◦ MVI A, BYTE1 ; Display BYTE1 at port A
◦ OUT 21H
◦ MVI A, BYTE2 ; Display BYTE2 at port B
◦ OUT 22H
D7 D6 D5 D4 D3 D2 D1 D0
0 0 0 0 0 0 1 1
Timer Not
Applicable
Use for
Port C
Port B
Output
Port A
Output

More Related Content

What's hot

Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
SARITHA REDDY
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
Tirumalesh Nizampatnam
 
8085 instructions and addressing modes
8085 instructions and addressing modes8085 instructions and addressing modes
8085 instructions and addressing modes
Suchismita Paul
 
8253
82538253
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
KanchanPatil34
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
Dr.YNM
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
Pantech ProLabs India Pvt Ltd
 
8251 USART
8251 USART8251 USART
8251 USART
ShivamSood22
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
PIC 16F877A by PARTHIBAN. S.
PIC 16F877A   by PARTHIBAN. S.PIC 16F877A   by PARTHIBAN. S.
PIC 16F877A by PARTHIBAN. S.
parthi_arjun
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
MdFazleRabbi18
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA Controller
Muhammed Afsal Villan
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
Gaurav Verma
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
kamlesh deshmukh
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
saurav kumar
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1
techbed
 
8155 Basic Concepts
8155 Basic Concepts8155 Basic Concepts
8155 Basic Concepts
Srinath Kalikivayi
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
Srikrishna Thota
 

What's hot (20)

Addressing modes of 8051
Addressing modes of 8051Addressing modes of 8051
Addressing modes of 8051
 
Instruction set of 8086
Instruction set of 8086Instruction set of 8086
Instruction set of 8086
 
8085 instructions and addressing modes
8085 instructions and addressing modes8085 instructions and addressing modes
8085 instructions and addressing modes
 
8253
82538253
8253
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
PIC Microcontrollers.ppt
PIC Microcontrollers.pptPIC Microcontrollers.ppt
PIC Microcontrollers.ppt
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
8253,8254
8253,8254 8253,8254
8253,8254
 
8251 USART
8251 USART8251 USART
8251 USART
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
PIC 16F877A by PARTHIBAN. S.
PIC 16F877A   by PARTHIBAN. S.PIC 16F877A   by PARTHIBAN. S.
PIC 16F877A by PARTHIBAN. S.
 
4.programmable dma controller 8257
4.programmable dma controller 82574.programmable dma controller 8257
4.programmable dma controller 8257
 
Direct memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA ControllerDirect memory access (dma) with 8257 DMA Controller
Direct memory access (dma) with 8257 DMA Controller
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
8255 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
8085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing18085 Architecture & Memory Interfacing1
8085 Architecture & Memory Interfacing1
 
8155 Basic Concepts
8155 Basic Concepts8155 Basic Concepts
8155 Basic Concepts
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 

Similar to 8155 GPPI

1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155
techbed
 
Lec14
Lec14Lec14
Lec12
Lec12Lec12
8085 microprocessor(1)
8085 microprocessor(1)8085 microprocessor(1)
8085 microprocessor(1)Reevu Pal
 
analog to digital converter and dac final
analog to digital converter and dac finalanalog to digital converter and dac final
analog to digital converter and dac final
DrVikasMahor
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
ragupathi90
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copymkazree
 
Io (2)
Io (2)Io (2)
Io (2)Aisu
 
ADC and DAC interfacing.pdf
ADC and DAC interfacing.pdfADC and DAC interfacing.pdf
ADC and DAC interfacing.pdf
VikasMahor3
 
1204 Ppi 8255
1204 Ppi 82551204 Ppi 8255
1204 Ppi 8255
techbed
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
deval patel
 
Microprocessors and Microcontrollers 8086 Pin Connections
Microprocessors and Microcontrollers 8086 Pin ConnectionsMicroprocessors and Microcontrollers 8086 Pin Connections
Microprocessors and Microcontrollers 8086 Pin Connections
Jason J Pulikkottil
 
Peripheral 8245,16550&8237 dma controller
Peripheral 8245,16550&8237 dma controllerPeripheral 8245,16550&8237 dma controller
Peripheral 8245,16550&8237 dma controller
মেহরাব শুভ
 
MICROCONTROLLER.pptx
MICROCONTROLLER.pptxMICROCONTROLLER.pptx
MICROCONTROLLER.pptx
fiqrie mohd
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
sandip das
 
8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf
Ilavarasan Tamizh
 
8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt
khushiduppala
 
8255 programming
8255 programming8255 programming
8255 programming
Jeyalaksmi V Professor ECE
 
Analog to Digital Converters
Analog to Digital ConvertersAnalog to Digital Converters
Analog to Digital Converters
Amitabh Shukla
 

Similar to 8155 GPPI (20)

1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155
 
Lec14
Lec14Lec14
Lec14
 
8255
82558255
8255
 
Lec12
Lec12Lec12
Lec12
 
8085 microprocessor(1)
8085 microprocessor(1)8085 microprocessor(1)
8085 microprocessor(1)
 
analog to digital converter and dac final
analog to digital converter and dac finalanalog to digital converter and dac final
analog to digital converter and dac final
 
Interfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdfInterfacing Analog to Digital Data Converters ee3404.pdf
Interfacing Analog to Digital Data Converters ee3404.pdf
 
Chp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copyChp7 pic 16 f84 interfacing - copy
Chp7 pic 16 f84 interfacing - copy
 
Io (2)
Io (2)Io (2)
Io (2)
 
ADC and DAC interfacing.pdf
ADC and DAC interfacing.pdfADC and DAC interfacing.pdf
ADC and DAC interfacing.pdf
 
1204 Ppi 8255
1204 Ppi 82551204 Ppi 8255
1204 Ppi 8255
 
8255 PPI
8255 PPI8255 PPI
8255 PPI
 
Microprocessors and Microcontrollers 8086 Pin Connections
Microprocessors and Microcontrollers 8086 Pin ConnectionsMicroprocessors and Microcontrollers 8086 Pin Connections
Microprocessors and Microcontrollers 8086 Pin Connections
 
Peripheral 8245,16550&8237 dma controller
Peripheral 8245,16550&8237 dma controllerPeripheral 8245,16550&8237 dma controller
Peripheral 8245,16550&8237 dma controller
 
MICROCONTROLLER.pptx
MICROCONTROLLER.pptxMICROCONTROLLER.pptx
MICROCONTROLLER.pptx
 
26. 8255 control word programming
26. 8255 control word programming26. 8255 control word programming
26. 8255 control word programming
 
8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf8255 & IO Interfacing.pdf
8255 & IO Interfacing.pdf
 
8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt8255-PPI MPMC text book for engineering.ppt
8255-PPI MPMC text book for engineering.ppt
 
8255 programming
8255 programming8255 programming
8255 programming
 
Analog to Digital Converters
Analog to Digital ConvertersAnalog to Digital Converters
Analog to Digital Converters
 

More from deval patel

8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
deval patel
 
8254 PIT
8254 PIT8254 PIT
8254 PIT
deval patel
 
8085 intro
8085 intro8085 intro
8085 intro
deval patel
 
8279 PKDI
8279 PKDI8279 PKDI
8279 PKDI
deval patel
 
8085 Microprocessor Architecture
8085 Microprocessor Architecture8085 Microprocessor Architecture
8085 Microprocessor Architecture
deval patel
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecture
deval patel
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1
deval patel
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
deval patel
 
Interrupts
InterruptsInterrupts
Interrupts
deval patel
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
deval patel
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
deval patel
 

More from deval patel (11)

8085 interrupts
8085 interrupts8085 interrupts
8085 interrupts
 
8254 PIT
8254 PIT8254 PIT
8254 PIT
 
8085 intro
8085 intro8085 intro
8085 intro
 
8279 PKDI
8279 PKDI8279 PKDI
8279 PKDI
 
8085 Microprocessor Architecture
8085 Microprocessor Architecture8085 Microprocessor Architecture
8085 Microprocessor Architecture
 
8085 Architecture
8085 Architecture8085 Architecture
8085 Architecture
 
Stacks & subroutines 1
Stacks & subroutines 1Stacks & subroutines 1
Stacks & subroutines 1
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Interrupts
InterruptsInterrupts
Interrupts
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 

Recently uploaded

AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
Vijay Dialani, PhD
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
BrazilAccount1
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
SupreethSP4
 

Recently uploaded (20)

AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
ML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptxML for identifying fraud using open blockchain data.pptx
ML for identifying fraud using open blockchain data.pptx
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
English lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdfEnglish lab ppt no titlespecENG PPTt.pdf
English lab ppt no titlespecENG PPTt.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Runway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptxRunway Orientation Based on the Wind Rose Diagram.pptx
Runway Orientation Based on the Wind Rose Diagram.pptx
 

8155 GPPI

  • 1. Programmable Peripheral Interface Devices Support chips: 8155, 8255, 8279, 8254, DMA Controller, Interrupt Controller, USART
  • 2. Programmable Interface Devices  Programmable Interface Device  used to interface a I/O device to the microprocessor  It is a multifunction device designed to use in minimum mode system  It contain RAM, I/O ports and Timer 8085 Programmable I/O Interface I/O Devices System Bus
  • 3. Requirement for PPI  I/P & O/P Regs: A group of latches to hold data  Tri-State Buffer  Capability of Bidirectional data flow  Handshake & Interrupt signal  Control Logic  Chip Select Logic  Interrupt control logic
  • 4. 8155 – A multipurpose programmable interface  Designed to be compatible with 8085  It includes ◦ 256 bytes of Read/Write memory ◦ Three I/O ports  Port A (8-bit)  Port B (8-bit)  Port C (6-bit) ◦ A 14-bit timer ◦ Internal address latch to Demux AD0- AD7, using ALE line
  • 5. Block Diagram - 8155 256 X 8 Static RAM A B CTimer 8 8 6 Port A Port B Port C PA0-7 PB0-7 PC0-5 8AD0-7 IO/M CE ALE RD WR Timer CLK TIMER OUT Vcc (+5 V) Vss (0 V) RESET I/ODevices 8085
  • 6. Application design with 8155  Objectives ◦ Interfacing 8155 with 8085 ◦ Programming 8155
  • 7. 8085 Interfacing 8085 with 8155 256 X 8 Static RAM A B CTimer 8 8 6 Port A Port B Port C 8AD0-7 IO/M CE ALE RD WR RESET A15 8085 8155
  • 8.  Configurable Device Example  Latch Direction A B Direction Chip Select
  • 9. Programming 8155  8155 is a Programmable Peripheral Interface  8085 can send data to 8155 using data bus  This data can be ◦ For I/O devices connected to 8155 ◦ Timer registers of 8155 ◦ Instruction/Command word for 8155  Commands for 8155 are stored in a 8- bit Control Register inside 8155
  • 10.  Program MVI A,01 H ; Set Do=1, D1-D7==0 OUTFFH ;Write in control register MVI A,BYTE1 ;Load data bye OUTFEH ; Send Data out 7A 0A DIR G: Enable 7B 0B Control Reg D0 D1 D7A7 A6 A5 A4 A3 A2 A1 A0
  • 11. 3 to 8 Decoder CWR Port A Port B Port C Timer MSB LSB Latch Clock for timer PA0-PA7 PB0- PB7 PC0- PC5 Timer Out A0 A1 A2 ALE AD0-AD7 A0-A7 D7-D0 0 1 2 3 4 5 CEb A2 A 1 A0 Port (ALE high, AD0=A0) 0 0 0 Command /Status Register 0 0 1 PA 0 1 0 PB 0 1 1 PC 1 0 0 Timer LSB 1 0 1 Timer MSB
  • 12. 3 to 8 Decoder 04 A13 A12 A11 A15 A14 A2 A1 A0 5 V 3 to 8 Decoder RAM Cont rol CWR Port A Port B Port C Timer MSB LSB Latc h Clock for timer PA0- PA7 PB0- PB7 PC0- PC5 Timer Out Reset in RD WR A0 A1 A2 ALE C E IO/M IO/ M AD0-AD7 A0- A7 D7- D0 20H 21H 22H 23H 24H 25H CS
  • 13. What type of Commands can be given to 8155?  To configure the I/O ports as Input or Output  To start/stop timer etc.  To use handshake mode or not
  • 14. Control word for 8155  A command/instruction for 8155 is also called control word  This control word is written to control register of 8155  Control word of 8155 is of 8-bits
  • 15. Control Word Definition for 8155 D0 D1 D2 D3 D4 D5 D6 D7 D3 D2 PORT C 0 0 ALT1 0 1 ALT2 1 0 ALT3 1 1 ALT4 D7 D6 Timer 0 0 NOP 0 1 Stop 1 0 Stop after TC 1 0 Start Port A Port B 0, Input 1, Output Port C Interrupt Enable Port A Interrupt Enable Port B 0, Disable 1, Enable Timer
  • 16. I/O functions of Port C ALT D3 D2 PC5 PC4 PC3 PC2 PC1 PC0 ALT1 0 0 I I I I I I ALT2 0 1 O O O O O O ALT3 1 0 O O O STBA BFA INTRA ALT4 1 1 STBB BFB INTRB STBA BFA INTRA I = Input O = Output STB = Strobe BF = Buffer Full INTR = Interrupt Request
  • 17. The 8155 timer consists of two 8-bit registers. 1. 8-bit LSB and 8-bit MSB. 2. In these 16 bits, 14 bits are used for counter and two bit for mode selection. 3. The counter is a 14 bit down counter. It can operate in 4 different modes of operation. We can select mode using two bits M2 and M1  00(Mode 0)- Single Square Wave  01(Mode 1)- Square Wave  10(Mode 2)- Single Pulse on TC(terminal count)  11(Mode 3)- Pulse every TC
  • 18.  Mode 0: In this mode, timer gives only one cycle of square wave, the output remains high for 1/2 count and remain s low for 1/2 count. If count is odd it remains high for (n+1)/2 and low for (n-1)/2. Where n is count value. Wave width depends on two factor: one is Input clock pulse frequency, and the other is count loaded in counter.  Mode 1: This mode is similar to single square wave in operation but the when counter becomes zero, the count value is automatically reloaded. Thus it provides continuous square wave.
  • 19.  Mode 2: This mode gives a single clock pulse as a output of the end of the count The output is high normally, but it becomes low for 1 clock pulse and again it will become high and remain high.  Mode 3: This mode is similar to mode 2 but when the counter becomes zero the count value is automatically reloaded. Thus it provides continuous pulses.
  • 20. Design an interfacing circuit to read data from an A/D converter using the 8155A in the peripheral mapped I/O. (Example) 8085 3-to-8 Decoder A/D Converter Analog Input Digital Input P o r t A AD0-AD7 O0O7 8155 P o r t C P o r t B SOC OE EOCO2 CE E2 E1 A2 A1 A0A11 A12 A13 A14 A15 IO/M RD WR RESET ALE LED Display BFA STBA PC5
  • 21. Port Addresses of 8155 A2 A1 A0 Port 0 0 0 Control/Status Register 0 0 1 Port A 0 1 0 Port B 0 1 1 Port C 1 0 0 LSB Timer 1 0 1 MSB Timer Chip Selection A7 A6 A5 A4 A3 0 0 0 1 0 = 10H = 11H = 12H = 13H = 14H = 15H
  • 22. Application Programming Logic 1. Configure 8155 2. 8085 sends SOC command to ADC 3. 8085 communicates with ADC using PortC in handshake mode 4. 8085 reads 8-bit temperature value from port A 5. 8085 displays the temperature value on the LED display
  • 23. 1. Configure 8155 I/O Ports  Port A as INPUT port  Port B as OUTPUT port  Port C in ALT3 mode ALT D3 D2 PC5 PC4 PC3 PC2 PC1 PC0 ALT3 1 0 O O O STBA BFA INTRA SOC EOC OE
  • 24. Control Word for configuration D0 D1 D2 D3 D4 D5 D6 D7 D3 D2 PORT C 0 0 ALT1 0 1 ALT2 1 0 ALT3 1 1 ALT4 D7 D6 Timer 0 0 NOP 0 1 Stop 1 0 Stop after TC 1 0 Start Port A Port B 0, Input 1, Output Port C IE Port A IE Port B 0, Disable 1, Enable Timer 0 1 0 1 0 0 0 0
  • 25. Program Instructions for configuration  Data ◦ Control word : 0AH  Port Address ◦ Address of Control register : 10H  Instructions ◦ MVI A, 0AH ◦ OUT 10H
  • 26. 2. 8085 sends SOC command to ADC  A small duration pulse on SOC input of ADC will start conversion process  SOC input of ADC is connected to port pin PC5 of Port C (Port address 13H)  Data ◦ Data value 20H followed by 00H ALT D3 D2 PC5 PC4 PC3 PC2 PC1 PC0 ALT3 1 0 O O O STBA BFA INTRA SOC 1 0 0 0 0 0
  • 27.  Instructions Start: MVI A, 20H OUT 13H MVI A, 00H OUT 13H
  • 28. 3. 8085 communicates with ADC using Port C in handshake mode  Port A used to input 8-bit data from ADC  Port C used for handshakingALT D3 D2 PC5 PC4 PC3 PC2 PC1 PC0 ALT3 1 0 O O O STBA BFA INTRA EOC OE
  • 29.  ADC resets EOC to LOW at end of conversion  8155 sets BF to 1 to enable ADC output latch  8085 is waiting for BF to be SET to 1 and ◦ Reads port A by making RD signal active (0)  At the end of read cycle RD goes HIGH (1)  This resets BF signal to 0.  8085 waits for BF signal to be RESET and ◦ starts conversion process again
  • 30. 8085 is waiting for BF  To know the status of BF signal 8085 reads status register of 8155  Status register shares same address as control register X Timer INTEB BFB INTRB INTEA BFA INTRA D7 D6 D5 D4 D3 D2 D1 D0 Status Word Definition
  • 31. Program Instructions  8085 reads status register ◦ Address of status register : 10H ◦ Reads port A if BFA = 1 ◦ Output temperature on port B Status: IN 10H ANI 02H JZ Status IN 11H ;Step -4 Reads temperature value OUT 12H ; Step –5 display on
  • 32.  8085 reads status register ◦ Address of status register : 10H ◦ Starts conversion again if BFA = 0 Again: IN 10H ANI 02H JNZ Again JMP Start
  • 33. Complete Program MVI A, 0AH OUT 10H Start: MVI A, 20H OUT 13H MVI A, 00H OUT 13H Status: IN 10H ANI 02H JZ Status IN 11H OUT 12H Again: IN 10H ANI 02H JNZ Again JMP Start  Configure 8155  Start Conversion  Read Status register  Wait till BFA = 1  Read temperature value  Display on LED  Read status register  Wait till BFA = 0  Start Conversion again
  • 34. 8155 PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0 AD7 to AD0 IO/Mb ALE RDb WRb RESET OUT IO/Mb ALE RDb WRb RESET OUT 7 Seg LED Driver 7 Seg LED Driver 7 Seg LED Driver 7 Seg LED Driver 3 to 8 Decoder 04 A13 A12 A11 A15 A14 A2 A1 A0 5V
  • 35.  Port Address ◦ Control Register=20H, Port A= 21H, Port B= 22H  Control word:  Program ◦ MVI A,03 ; initialize Port A &B for O/P ◦ OUT 20H ◦ MVI A, BYTE1 ; Display BYTE1 at port A ◦ OUT 21H ◦ MVI A, BYTE2 ; Display BYTE2 at port B ◦ OUT 22H D7 D6 D5 D4 D3 D2 D1 D0 0 0 0 0 0 0 1 1 Timer Not Applicable Use for Port C Port B Output Port A Output

Editor's Notes

  1. 00000111 07h