
2.12
Output Coding
IN PUT VOLT AGE RANGE
COD ING
UNI PO LAR
STRAIGHT BI NARY
0 TO +5V
MSB LSB
+FS
5.0000
1111 1111 1111
+FS- 1LSB
4.9988
1111 1111 1110
+1LSB
0.0012
0000 0000 0001
ZERO
0.0000
0000 0000 0000
BI PO LAR
OFF SET BI NARY
+/- 2.5V
MSB LSB
+FS
+2.5000
0111 1111 1111
+FS-1
+2.4988
0111 1111 1110
+1LSB
+0.0012
0000 0000 0001
ZERO
0.0000
0000 0000 0000
-1LSB
-0.0012
1111 1111 1111
-FS-1LSB
-2.4988
1000 0000 0001
-FS
-2.5000
1000 0000 0000
2.13
A/D SOFTWARE EXAMPLES
The fol low ing gives an ex am ple of an 8088/8086 as sem bly lan guage rou tine that will in -
ter face to the PCM- AIO in syn chro nous polled mode for a 0 to 5 VDC, uni po lar in put range.
mov dx,BASE_PORT
;Set PC/104 Base I/O Ad dress
mov al,0
;Chan 0, Sin gle Ended, Uni po lar
out dx,al
;Start Con ver sion
add dx,4
;Point to Status Reg is ter
wait:
in al,dx
;Read Status Bit
test al,80H
;See if Con ver sion Fin ished
jne wait
;If Not, Try Again
mov dx,BASE_PORT
;Point to Low data Byte
in al,dx
;Read Low Data Byte
mov bl,al
;Save Low Byte
inc dx
;Point to High Byte
in al,dx
;Read High Byte
mov bh,al
;Com bine with Low Byte
and BX,0FFFH
;BX=Con ver sion Data
The fol low ing pro gram gives an ex am ple of a C pro gram for per form ing A/D con ver sions
with the PCM- AIO.
Page 2-6
OPERATIONS MANUAL PCM-AIO
980723
WinSystems - "The Embedded Systems Authority"
Summary of Contents for PCM-AIO
Page 21: ...5 APPENDIX A MAX180 DATASHEET REPRINT ...
Page 22: ......
Page 23: ......
Page 24: ......
Page 25: ......
Page 26: ......
Page 27: ......
Page 28: ......
Page 29: ......
Page 30: ......
Page 31: ......
Page 32: ......
Page 33: ......
Page 34: ......
Page 35: ......
Page 36: ......
Page 37: ......
Page 38: ......
Page 39: ......
Page 40: ......
Page 41: ......