3.6.1.5 Set Channel Configuration
The demo program to set the channel/gain is given as follows:
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));
}
z
P1202_SetChannelConfig(…) is designed for PCI-1202H/L/HU/LU
z
P1602_SetChannelConfig(…) is designed for PCI-1602 and PCI-1602F
PCI-1202/1602/1800/1802 Hardware User’s Manual
(
Ver.4.2, Dec/2009, PMH-014-42)---- 42