Input Port
1.port + 0
MSB












LSB
0
0
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Input A/D data, only D0 to D13 are useable, the highest two bits are 0.

2. port + 2
When read this port means clear the interrupt signal that generated from the adapter.

3.port + 6
MSB












LSB
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Digital input channel. Before read this port, you must write FF value to this port.

4.port + 8
Counter 0 I/O buffer (8254 IC).

5.port + 9
Counter 1 I/O buffer (8254 IC).

6.port + A
Counter 2 I/O buffer (8254 IC).

7.port + B
Counter control register (8254 IC).
Output Port+0
The output port address+0 is used to control A/D conversion. The low 8 bit control format is :
MSB






LSB
x
R2 R1 R0
C3
C2
C1
C0

1.Select A/D channel number
The C0 to C3 are used to select input channel number.

C3
C2
C1
C0
Input Channel
0
0
0
0
CH0
0
0
0
1
CH1
0
0
1
0
CH2
0
0
1
1
CH3
0
1
0
0
CH4
0
1
0
1
CH5
0
1
1
0
CH6
0
1
1
1
CH7
1
0
0
0
CH8
1
0
0
1
CH9
1
0
1
0
CH10
1
0
1
1
CH11
1
1
0
0
CH12
1
1
0
1
CH13
1
1
1
0
CH14
1
1
1
1
CH15

2.Select gain control factor
The R0 to R2 are used to select gain control factor, if JP1 is short, the R0 to R2 are disable.

R2
R1
R0
Gain Control Factor
0
0
0
*1
0
0
1
*2
0
1
0
*3
0
1
1
*4
1
0
0
*5
1
0
1
*6
1
1
0
*7
1
1
1
*8

The gain control factor is used to scale your input voltage. For example, if you select unipolar and its voltage range from 0 to 20V, and the gain control factor is *8, then your input voltage range is from 0 to 2.5V, because whole the input voltage was scale 8 times.

3.Sampling and hold
The “x” bit is used to control sampling and hold, when write 0 to this bit, it latch the input voltage to let A/D converter get the input voltage, otherwise when write 1 to this bit, it enter sampling mode. Normally, this bit is 1.

x bit value
Action
0
Hold
1
Sampling

The high 8 bit control format of port address+0 is:

MSB






LSB
X
X X TRI
INT
ENX
SE1
SE0

4.Select trig method
The SE0 and SE1 are used to select trig method for A/D converter, user can select software trig, external hardware trig or trig by 8254.

SE1
SE0
Selection
0
0
Software trigger by TRI bit
0
1
Software trigger by TRI bit
1
0
External trig from J1-2
1
1
Trig by 8254

5.Enable/disable external hardware trig
ENX is used to enable/disable external hardware trig, when this bit is set to 0, it means disable external trig, otherwise this bit is set to 1 means enable external trig. When user select external hardware trig, he must connect external signal to J1 pin 2. When 8254 trig is selected, this bit must be set to 1.

ENX
Enable/Disable
0
Disable external trig
1