![ICP DAS USA PCI-82x Series Скачать руководство пользователя страница 47](http://html1.mh-extra.com/html/icp-das-usa/pci-82x-series/pci-82x-series_user-manual_3695537047.webp)
PCI-82x Series Cards
Multifunction Boards
User Manual, Ver. 1.5, Jan. 2017, PMH-024-15, Page: 47
6.4.3
Enable/Disable an Analog Output Channel
(Write)wBase+0x08
Enable/Disable an Analog Output Channel
Bit
1
0
Data
CH1
CH2
D/A channel must be enabled or disabled before the voltage can be output to the channel. The D/A
channels are allocated as follows:
CH x = 1
Enable the channel
CH x = 0
Disable the channel
The following is an example of how to enable the Analog Output Channel:
//Set the AO Mode
outpw(0x04,(WORD)(((wChannel/2)<<2)|(((wChannel%2)<<1)|(wChannel%2))));
//Write data to the D/A Port
outpw(w0x00,(WORD)(wValue&0xFFFF));
//Enable the D/A Port (only for the first D/A Output)
if((inpw(0x08)&(0x1<<wChannel))==0)
{
outpw(0x08,(WORD)(inpw((WORD)( 0x08))|(0x1<<wChannel)));
}