PIO-DA/PISO-DA Series User Manual (Ver.2.9, Feb. 2011, PMH-009-29 )
53
3.3.11 D/A
Select
There are 1/2/4 D/A converters in PIO-DA4/8/16 cards. It is necessary to select
which D/A converter is desired after the D/A data has be sent. D/A channels are
allocated as follows:
Write
A1 A0
Description
0 0
D/A output channel 0
0 1
D/A output channel 1
1 0
D/A output channel 2
WBase+0xe0
DA_0
1 1
D/A output channel 3
0 0
D/A output channel 4
0 1
D/A output channel 5
1 0
D/A output channel 6
Wbase+0xe4
DA_1
1 1
D/A output channel 7
0 0
D/A output channel 8
0 1
D/A output channel 9
1 0
D/A output channel10
Wbase+0xe8
DA_2
1 1
D/A output channel11
0 0
D/A output channel12
0 1
D/A output channel13
1 0
D/A output channel14
Wbase+0xec
DA_3
1 1
D/A output channel15
Note: Refer to Sec.3.3.11 for more information regarding A1 and A0
outportb(wBase+0xf0,wDaValue);
/* output the low byte for D/A data */
outportb(wBase+0xf4,(wDaValue>>8)|0x02);
/*output the high byte for D/A data and */
/*select channel 2 on this converter */
outportb(wBase+0xe0,0);
/*select DA_0 */
/* after this procedure, the wDaValue will */
/* be sent to channel_2 */
Refer to the DEMO6.C, DEMO7.C, DEMO8.C and DEMO9.C files
for more information.