SlideShare uma empresa Scribd logo
1 de 35
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

Mais conteúdo relacionado

Mais procurados

UNIT-1 Elements of Digital Communication
UNIT-1 Elements of Digital CommunicationUNIT-1 Elements of Digital Communication
UNIT-1 Elements of Digital Communicationabhishek reddy
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051hello_priti
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller Gaurav Verma
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram descriptionAkhil Singal
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controllerabhikalmegh
 
Minimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorMinimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorNikhil Kumar
 
8086 modes
8086 modes8086 modes
8086 modesPDFSHARE
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Jismy .K.Jose
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controllerTech_MX
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chipsSrikrishna Thota
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONSRamaPrabha24
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085Nitin Ahire
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introductionShubham Singh
 
Unit 2 signal generators
Unit 2 signal generatorsUnit 2 signal generators
Unit 2 signal generatorsTejas Prajapati
 

Mais procurados (20)

4 bit Binary counter
4 bit Binary counter4 bit Binary counter
4 bit Binary counter
 
UNIT-1 Elements of Digital Communication
UNIT-1 Elements of Digital CommunicationUNIT-1 Elements of Digital Communication
UNIT-1 Elements of Digital Communication
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
8051 microcontroller
8051 microcontroller 8051 microcontroller
8051 microcontroller
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
8086 pin diagram description
8086 pin diagram description8086 pin diagram description
8086 pin diagram description
 
8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller8259 Programmable Interrupt Controller
8259 Programmable Interrupt Controller
 
Minimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 MicroprocessorMinimum Modes and Maximum Modes of 8086 Microprocessor
Minimum Modes and Maximum Modes of 8086 Microprocessor
 
8051 memory
8051 memory8051 memory
8051 memory
 
8086 modes
8086 modes8086 modes
8086 modes
 
1.ppi 8255
1.ppi 8255 1.ppi 8255
1.ppi 8255
 
Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086Minimum mode and Maximum mode Configuration in 8086
Minimum mode and Maximum mode Configuration in 8086
 
8237 dma controller
8237 dma controller8237 dma controller
8237 dma controller
 
8085 alp programs
8085 alp programs8085 alp programs
8085 alp programs
 
Important questions
Important questionsImportant questions
Important questions
 
8085 interfacing with memory chips
8085 interfacing with memory chips8085 interfacing with memory chips
8085 interfacing with memory chips
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
 
Chapter 1 microprocessor introduction
Chapter 1 microprocessor introductionChapter 1 microprocessor introduction
Chapter 1 microprocessor introduction
 
Unit 2 signal generators
Unit 2 signal generatorsUnit 2 signal generators
Unit 2 signal generators
 

Semelhante a 8155 GPPI

Semelhante a 8155 GPPI (20)

1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155
 
Lec14
Lec14Lec14
Lec14
 
8255
82558255
8255
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
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
 
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 presentaion.ppt
8255 presentaion.ppt8255 presentaion.ppt
8255 presentaion.ppt
 
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
 

Mais de deval patel

Mais de deval patel (12)

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
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
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
 

Último

Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniquesugginaramesh
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...121011101441
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfROCENODodongVILLACER
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxPurva Nikam
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 

Último (20)

Comparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization TechniquesComparative Analysis of Text Summarization Techniques
Comparative Analysis of Text Summarization Techniques
 
Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...Instrumentation, measurement and control of bio process parameters ( Temperat...
Instrumentation, measurement and control of bio process parameters ( Temperat...
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes  examplesPOWER SYSTEMS-1 Complete notes  examples
POWER SYSTEMS-1 Complete notes examples
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
Risk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdfRisk Assessment For Installation of Drainage Pipes.pdf
Risk Assessment For Installation of Drainage Pipes.pdf
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
An introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptxAn introduction to Semiconductor and its types.pptx
An introduction to Semiconductor and its types.pptx
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 

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

Notas do Editor

  1. 00000111 07h