AIM: ADC Interface With 8086 APPARATUS: GSAS 86/88E Kit, ADC Interface Kit, Power Suppling Wires, Serial Data Transmission Procedure

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

AIM: ADC interface with 8086

APPARATUS: GSAS 86/88E kit,ADC interface kit,power suppling wires,serial data transmission
cable
PROCEDURE:
1. An ADC interface connector mush be connected to j7 0f the trainer(GSAS 86/88)
2. Give the power supply to ADC interface ,8086 kit from adaptor.
3. Connect all the connections.
4. This program displays the channel no. and digital equivalent of the analog voltage at the
respective channel.
5. On the pc console -->seriaal mode
on the LCD -->standalone mode
6. To incerment channel value enter “,”
7. To decrement channel value enter “-”

ADDRESS OPCODE LABELS MNEMONIC COMMENT


2000 B8 00 00 MOV AX,0000H Initialize segment
registers
2003 8E C0 MOV ES,AX
2005 BA E6 FF MOV Initialize 8255
DX,0FFE6H portA as o/p ,port
B,C as I/p
2008 B0 8B MOV AL,8BH
200A EE OUT DX,AL
200B EB 1F JMP
MAIN(202C)
200D 43 48 41 4E 4E CHA: DB ODH
45 4C 20 4E 4F 'CHANNEL
3A 20 00 NO.',0H
201B 44 49 47 49 54 DIG: DB
41 4C 20 56 41 0AH,0DH,'DIGIT
4C 55 45 3A 00 AL VALUE:',0H
202C B9 00 00 MAIN: MOV CX,00H
202F E8 08 00 NEXT: CALL Call A to D
CONVERT(203A converter routine
)
2032 E8 3E 00 CALL Call Display
DISP(2073) routine
2035 E8 77 00 CALL Call channel
UPDT(20AF) update routine
2038 EB F5 JMP Repeat
NEXT(202F) continuously
203A B0 00 CONVERT: MOV AL,00H Initialize channel
203C 0A C1 OR AL,CL Add channel no.
203E BA E0 FF MOV Load channel
DX,0FFE0H value
2041 EE OUT DX,AL
2042 B0 20 MOV AL,20H Assert start
conversion
2044 0A C1 OR AL,CL Signal to adc
2046 EE OUT DX,AL
2047 90 NOP
2048 90 NOP
2049 90 NOP
204A B0 00 MOV AL,00H Start pulse over
204C 0A C1 OR AL,CL
204E EE OUT DX,AL
204F BA E4 FF MOV Wait for end of
DX,0FFE4H conversion
2052 EC EOC: IN AL,DX
2053 24 01 AND AL,01H
2055 75 FB JNE EOC(2052)
2057 EC CHECK: IN AL,DX Check for end of
conversion
2058 24 01 AND AL,01H
205A 74 FB JE CHECK(2057) Signal from adc
205C B0 40 MOV AL,40H Assert read signal
205E 0A C1 OR AL,CL
2060 BA E0 FF MOV Read converted
DX,0FFE0H data
2063 EE OUT DX,AL
2064 BA E2 FF MOV
DX,0FFE2H
2067 EC IN AL,DX
2068 50 PUSH AX
2069 B0 00 MOV AL,00H De assert read
signal
206B 0A C1 OR AL,CL
206D BA E0 FF MOV
DX,0FFE0H
2070 EE OUT DX,AL
2071 58 POP AX
2072 C3 RET
2073 9A 31 00 00 FE DISP: CALLS Routine to display
0FE00:0031H digital value
2078 9A ED 01 00 FE CALLS
0FE00:01EDH
207D 50 PUSH AX
207E 2E CS
207F 8D 16 0D 20 LEA
DX,@CHA(200D
)
2083 8B C2 MOV AX,DX Display channel
routine
2085 9A 13 00 FE CALLS
0FE00:0013H
208A 8A C1 MOV AL,CL
208C 3C 0A CMP AL,0AH Convert channel
no.
208E 72 02 JB VALUE(2092)
2090 04 06 ADD AL,06H
2092 9A 52 00 00 FE VALUE: CALLS Display channel
0FE00:0052H no.
2097 2E CS
2098 8D 16 1B 20 LEA
DX,@DIG(201B)
209C 8B C2 MOV AX,DX Diplay msg for
digital o/p
209E 9A 13 00 00 FE CALLS
0FE00:0013H
20A3 58 POP AX
20A4 9A 52 00 00 FE CALLS Display digital
0FE00:0052H o/p
20A9 9A 31 00 00 FE CALLS Newline routine
0FE00:0031H
20AE C3 RET
20AF 9A A9 00 00 FE UPDT: CALLS Get next channel
0FE00:00A9H key
20B4 3C 2C CMP AL,2CH If key=',' inc
channel
20B6 74 0E JE INCR(20C6)
20B8 3C 2D CMP AL,2DH If key='-' dec
channel
20BA 74 14 JE DECR(20D0)
20BC 3C 0D CMP AL,0DH If key=<CR> or
<Esc>
20BE 74 1A JE OVER(20DA)
20C0 3C 1B CMP AL,1BH Terminate the
program
20C2 74 16 JE OVER(20DA)
20C4 EB E9 JMP
UPDT(20AF)
20C6 FE C1 INCR: INC CL Channel inc
routine
20C8 80 F9 10 CMP CL,10H
20CB 75 02 JNE RET1(20CF)
20CD B1 00 MOV CL,00H
20CF C3 RET1: RET
20D0 FE C9 DECR: DEC CL Channel dec
routine
20D2 80 F9 FF CMP CL ,0FFH
20D5 75 02 JNE RET2(20D9)
20D7 B1 0F MOV CL,0FH
20D9 C3 RET2: RET
20DA CC OVER: INT 03 Program
termination

OUTPUT:
EX: CHANNEL NO.:00
DIGITAL VALUE:59

CHANNEL NO.:01
DIGITAL VALUE:5A
.
.
.
up to channel 15(0 to 15)

ADC INTERFACE WITH 8086

You might also like