You are on page 1of 19

System Design Example

Design a System that senses the


temperature in a room at intervals of
2 minutes and display the average room
temperature in 0C on two, 7-segment
LED displays.
Step1: Select the Room Temperature
Sensor

ATS2000A
Temperature range 32 F – 150 F
Voltage i/p 5-30V – DC, Typical current 1.5mA
Four –pin connector
Wall mountable
How many –size of room
6 sensors
PINOUT OF SENSOR
PIN SIGNAL Input/ Scale Description
Output Factor

1 +V INPUT N/A Voltage referenced to the COM


terminal
(+5Vdc min to +30Vdc max )
2 T10 OUTPUT 10.0mV/°F Temperature Signal

3 T20 OUTPUT 19.6mV/°F Temperature Signal (scaled for 8-bit


ADC)

4 COM INPUT N/A Common (power supply & ADC


common
Step 2 : How to interface
Sensor to sytsem
No of analog i/ps-6
8-channel ADC
Size of ADC
◦ Resolution of sensor
◦ 19.6mv /F

8-bit
0808 – 8 channel, 8-bit ADC
CLK IN0
IN1
IN2
DB0 – IN3 Analog
DB7 IN4
IN5 I/ps
IN6
AD0 IN7
AD1
AD2 VREF+ 5V
EOC VREF- 0V
Vcc Supply
OE
GND

SOC
5V = 19.6 mV
ALE
256
ADC 0808
Step 3: Output Interface
2 seven segment displays
O/P Numeric or Alpha-Numeric
Numeric – use 7447
Common Anode display

7447
Step 4: How to interface 7447
and ADC to 8086 ?
2 – seven segment displays
2- 7447
Each require 4-bit
So two require 8 –bits (one port)
Remaining 2 ports can be used for ADC
CLK IN0
IN1
IN2
Temp
DB0 – IN3 sensors
PB0 –PB7 DB7 IN4
IN5
IN6
PC0 AD0 IN7
PC1 AD1
PC2 AD2 VREF+ 5V
INTR EOC VREF- 0V
PC3 Vcc Supply
OE
PC4 GND
SOC
PC5 ALE

ADC 0808
D0
LT a
RBO
RBI
h
5V
PA0 A
PA1 B D0
C Vcc
PA2 D 5V LT a
RBO
PA3 GND RBI
5V h
7447 5V
PA4 A
PA5 B
C Vcc
PA6 D 5V
PA7 GND
5V
7447
STEP 5 : ADC clock & 2 MIN
Interrupt
Use 8284
ADC CLK
1.25 MHz
5 MHz CLK0 OUT0
Count = 4d
5V GATE0
mode3
100 Hz
OUT1 CLK1 5 MHz
5V GATE1 Count = 50000d
mode2
2 minutes
CLK2 OUT2
Count =12000d
5V GATE2
mode2 TIMER INT
STEP 6: Interrupt Generation
Use 8259
INT IR0 Timer

INTA IR1 ADC

8259
CAS0
CAS1
CAS2
SP/EN

5V
STEP 7: How to interface 8255,
8254 & 8259
Memory mapped/ IO mapped ? 80 10000000
How many addresses? 82 10000010
84 10000100
Address
86 10000110
80 - 86H -8255 88 10001000
88H - 8EH – 8254 8A 10001010
90H – 92H - 8259 8C 10001100
8E 10001110
Incremental Addressing
90 10010000
92 10010010
94 10010100
96 10010110
A5 O0 8255
I2
A4 I1
A3 O1 8254
I0
O2 8259
LS138

M/IO’
G2B

G2A G1 A0 WRL’
WR’

A6 A7
Interface to the processor A1 A0
A2 A1
CS

8255

RD RD
WRL WR
D0 – D7 D0 – D7

RESET from RESET


8284
STEP 8: HOW to Interface
Memory
How much memory ?
ROM/RAM?
RAM – minimum 2k chip- 4k
ROM – minimum 2k chip – 4k + 4k
ROM1 00000H
RAM 01000H
ROM2 FF000H
A

Step 9: Software Conversion=


enabled
B
Main Select ADC Channel

Start Conversion Convert to oC


Branch to end for sensor
of IVT Display Temp
Wait for
Int
A
Initialize 8255,
8254,8259, All
Enable conversion N sensors
read ISR1 ISR2
Y
A Find average,
Disable conversion
Enable conversion Read ADC

B IRET IRET

You might also like