Professional Documents
Culture Documents
In most of the cases, the PIO 8255 is used for interfacing the analog to digital converters with microprocessor. We have already studied 8255 interfacing with 8086 as an I/O port, in previous section. This section we will only emphasize the interfacing techniques of analog to digital converters with 8255. The analog to digital converters is treaded as an input device by the microprocessor, that sends an initialising signal to the ADC to start the analogy to digital data conversation process. The start of conversation signal is a pulse of a specific duration.
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
Analog I/P selected I/P0 I/P1 I/P2 I/P3 I/P4 I/P5 I/P6 I/P7
Address lines C 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 A 0 1 0 1 0 1 0 1
Fig
M Krishhna Kumar MAM/M3/LU9g/V1/2004 8
M Krishhna Kumar
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
10
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
11
I/P 0 I/P 1 I/P2 I/P3 I/P4 I/P5 I/P6 I/P 7 A C B Address Lines 8 Channel Analog Multiplexer
SOC
CLOCK EOC
O/P Latch 256 R Register ladder and Switch tree O/P Enable V ref + V ref _
8-bit O/P
CLOCK
START
ALE EOC
OE
O/P
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
15
;Check for EOC by ; reading port C upper and ;rotating through carry. ;If EOC, read digital equivalent ;in AL ;Stop.
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
16
Vref +
Clock up
D0 D7 A2 A1 Reset
O7 O0
ADC 0808
OE GND B C ALE A
8255
PB0 PB1 PB2
+5V
IORD IOWR
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
18
1 2 3 4 5 6 7 8 AD 7523
16 15 14 13 12 11 10 9
2R
R1
2R
R3
2R
R5
2R
R7 2R
2R V0 R2 R4 R6 R8 +
Fig:
M Krishhna Kumar MAM/M3/LU9g/V1/2004 20
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
21
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
22
Example (cont..)
ASSUME CODE START: AGAIN: BACK : CS:CODE SEGMENT MOV AL,80h OUT CW, AL MOV AL,00h OUT PA, AL INC AL CMP AL, 0FFh JB BACK JMP AGAIN CODE ENDS END START ;make all ports output ;start voltage for ramp
M Krishhna Kumar
MAM/M3/LU9g/V1/2004
23
+5V
+10V
15
14 16
OUT1 1 2 VZ
V0 +