Diagnostic Test
1.
Insert the demonstration media into drive, then copy diagnostic program into your computer.
2.
Key in the BASIC test program, then type run. (please refer section 3)
3.
The screen will display:
               which selection do you want?
1.    D/A MODE
2.    A/D MODE
4.
If you select “1. D/A MODE”, pin 2 of D-type connector will output 16 steps saw-tooth wave.
5.
If you select “2. A/D MODE”, screen will display each value (from 0 to 4095 of the 16 channel).
Programming Techniques Under MS/DOS
1.Analog to digital (A/D) procedure


(1) Output channel number to port
OUT port , channel



(2) Clear register
OUT (port+3) , 0



(3) Start convert
FOR
I = 1 to 5
   A = INP(port + 4)
             NEXT I
             FOR I = 1 to 9
                A = INP(port + 5)
             NEXT I



(4)
Read high byte (low nibble)
C = INP(port +2)
HB = (C/16 - INT(C/16)) * 16



(5)
Read low byte (8 bits)
LB = INP(port + 1)



(6)
Data
AD = HB * 256 + LB



2.Digital to analog (D/A) procedure

(1)
Output high byte (low nibble)
OUT port + 7, Hdata



(2)
Output low byte (8 bits)
OUT port + 6, Ldata



BASIC Test Program
10 CLS: PORT=632
20 LOCATE 5,18: PRINT “ 12 BIT AD-DA CONVERSION CARD”
30 LOCATE 6,18: PRINT “=======================”
40 LOCATE 9,20: PRINT “1. D/A CONVERSION DEMO”
50 LOCATE 11,20: PRINT “2. A/D CONVERSION DEMO”
60 A$=INKEY$: IF A$=”” THEN 60
70 IF A$=”1” THEN 200
80 IF A
$=”2” THEN 400
90 GOTO 10
200 CLS
202 LOCATE 5,15: PRINT “D/A CINVERSION DEMO”
204 LOCATE 7,15: PRINT “OUTPUT WAVEFORM FROM D/A PORT”
206 LOCATE 9,15: PRINT “PRESS ANY KEY RETURN MENU”
210 OUT PORT+6,0
220 FOR I = 0 TO 15
230 OUT PORT+7, I
240 NEXT I
250 A$=INKEY$: IF A$=”” THEN 210

260 GOTO 10
400 CLS
410 FOR CHANNEL = 0 TO 15
420 GOSUB 550
430 B = INP(PROT+2)
440 C = INP(PORT+1)
450 D = (B-16*(INT(B/16))) *256 + C
460 PRINT “ CHANNEL= “; CHANNEL, “DATA= “:D
470 NEXT CHANNEL
480 PRINT:PRINT:PRINT
490 GOTO 410
550 OUT PORT+3,0
560 OUT PORT+0, CHANNEL
570 FOR I = 1 TO 5: A= INP(PORT+4):NEXT I
580 FOR I = 1 TO 9: A= INP(PORT+5):NEXT I
590 RETURN