PCI-1202/1602/180x Series Card
Multi-Function Boards
User Manual/ Ver. 4.8/ Mar. 2015/ PMH-0014-48/ Page: 61
Set Channel Configuration
The demo program to set the channel and gain is given as follows:
P180x_SetChannelConfig(…) is designed for PCI-1800/1802 series
P1202_SetChannelConfig(…) is designed for PEX-1202/PCI-1202 series
P1602_SetChannelConfig(…) is designed for PCI-1602 series
WORD
P180X_SetChannelConfig
(WORD wAdChannel, WORD wAdConfig)
{
WORD wConfig,wChannel;
wChannel = (wAdChannel&0x1f);
wSysConfig = (wAdConfig&0x1f);
// store for P1802_AdPolling
wConfig = (wAdConfig&0x0f);
wConfig = wConfig << 6;
wConfig += wChannel;
/* Bit15=1 --> no reset FIFO
Bit14=?
Bit13=?
Bit12=0 --> command [001] --> set channel&Config command
Bit11=0
Bit10=1
Bit9 =B --> Range control code [BB] --> unipolar/bipolar & divided by 2
Bit8 =B
Bit7 =B --> gain control code [BB] --> 1/10/100/1000 or 1/2/4/8
Bit6 =B
Bit5 =?
Bit4-Bit0 --> channel number */
= 0x8400;
// this is set channel config command
return(pic_control(wConfig));
}