The output
port address+0 is used to control A/D conversion. The low 8 bit control
format is :
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:
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
|
| |