The document discusses the 8155 Programmable Peripheral Interface chip. It can be used as an interface between a microprocessor and I/O devices. The 8155 contains RAM, I/O ports, and a timer. It has ports A, B, and C that can be configured as input or output. The timer can operate in different modes. Programming the 8155 involves writing control words to its control register to configure the ports and timer. An example application shows how an 8155 can be used to interface an ADC and read temperature values using handshaking between the ADC and 8155 ports.
PIC A special purpose integrated circuit that function as an overall manager in an interrupt driven system.
It accepts request from the peripheral equipment,determines which of the incoming request is of the highest priority, ascertains whether the incoming request has a higher priority value than the level currently being serviced, and issues an interrupt to the CPU based on this determination.
PIC A special purpose integrated circuit that function as an overall manager in an interrupt driven system.
It accepts request from the peripheral equipment,determines which of the incoming request is of the highest priority, ascertains whether the incoming request has a higher priority value than the level currently being serviced, and issues an interrupt to the CPU based on this determination.
Complete description of AT89xxx (8051 based) microcontrollers with timers, serial communication and assembly language programming. Interfacing of some real time devices like led, sensor, and seven segment display is also covered.
Complete description of AT89xxx (8051 based) microcontrollers with timers, serial communication and assembly language programming. Interfacing of some real time devices like led, sensor, and seven segment display is also covered.
An analog-to-digital converter (ADC, A/D, or A to D) is a device that converts a continuous physical quantity (usually voltage) to a digital number that represents the quantity's amplitude.
The conversion involves quantization of the input, so it necessarily introduces a small amount of error. Instead of doing a single conversion, an ADC often performs the conversions ("samples" the input) periodically. The result is a sequence of digital values that have been converted from a continuous-time and continuous-amplitude analog signal to a discrete-time and discrete-amplitude digital signal.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Student information management system project report ii.pdfKamal Acharya
Our project explains about the student management. This project mainly explains the various actions related to student details. This project shows some ease in adding, editing and deleting the student details. It also provides a less time consuming process for viewing, adding, editing and deleting the marks of the students.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Hierarchical Digital Twin of a Naval Power SystemKerry Sado
A hierarchical digital twin of a Naval DC power system has been developed and experimentally verified. Similar to other state-of-the-art digital twins, this technology creates a digital replica of the physical system executed in real-time or faster, which can modify hardware controls. However, its advantage stems from distributing computational efforts by utilizing a hierarchical structure composed of lower-level digital twin blocks and a higher-level system digital twin. Each digital twin block is associated with a physical subsystem of the hardware and communicates with a singular system digital twin, which creates a system-level response. By extracting information from each level of the hierarchy, power system controls of the hardware were reconfigured autonomously. This hierarchical digital twin development offers several advantages over other digital twins, particularly in the field of naval power systems. The hierarchical structure allows for greater computational efficiency and scalability while the ability to autonomously reconfigure hardware controls offers increased flexibility and responsiveness. The hierarchical decomposition and models utilized were well aligned with the physical twin, as indicated by the maximum deviations between the developed digital twin hierarchy and the hardware.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
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
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
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
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