unsigned int anaIn(unsigned int channel,
int opmode, int gaincode);
Reads the value of an analog input channel using the direct method of addressing the A/D converter.
Note that it takes about 1 second to ensure an internal capacitor on the A/D converter is charged when the
function is called the first time.
PARAMETERS
channel is the channel number (0 to 7) corresponding to ADC_IN0 to ADC_IN7
opmode is the mode of operation:
SINGLE —single-ended input
DIFF —differential input
mAMP —4–20 mA input
channel
0
1
2
3
4
5
6
7
SINGLE
+AIN0
+AIN1
+AIN2
+AIN3
+AIN4
+AIN5
+AIN6
+AIN7
DIFF
+AIN0 -AIN1
+AIN1 -AIN0*
+AIN2 -AIN3
+AIN3 -AIN2*
+AIN4 -AIN5
+AIN5 -AIN4*
+AIN6 -AIN7*
+AIN7 -AIN6*
mAMP
+AIN0 *
+AIN1*
+AIN2*
+AIN3
+AIN4
+AIN5
+AIN6
+AIN7*
* Not accessible on Prototyping Board.
gaincode is the gain code of 0 to 7 (applies only to Prototyping Board):
Gain Code
0
1
2
3
4
5
6
7
Multiplier
×1
×2
×4
×5
×8
×10
×16
×20
Voltage Range
(V)
0–20
0–10
0–5
0–4
0–2.5
0–2
0–1.25
0–1
RETURN VALUE
A value corresponding to the voltage on the analog input channel:
0–2047 for 11-bit A/D conversions (bit 12 for sign)
ADOVERFLOW (defined macro = -4096) if overflow or out of range
ADTIMEOUT (defined macro = -4095) if conversion is incomplete or busy-bit timeout
SEE ALSO
anaIn, anaInConfig, anaInDriver
User ’s Manual
45
相关PDF资料
101-0589 CLONING BOARD RABBIT
101-0688 CARD D/A EXPANSION RN1300
101-0954 KIT DEV RABBIT RCM3360/3370 INTL
101-1050-BE-00025 ADPT USB 2 A FEMALE-2 5PIN .25M
10112627-101LF MINI-SAS HD 1X2 EXT PCB
10112628-101LF MINI-SAS HD 1X4 EXT PCB
10136-3000PC CONN MINI-D 36POS SOLDER PLUG
10136-6000EC CONN MDR PLUG 36POS IDC GOLD
相关代理商/技术参数
101-0565 功能描述:模块配件 BL2100 Btm Mnt Sckts RoHS:否 制造商:Lantronix 产品: 用于:
101-0566 功能描述:模块配件 BL2100 Friction Lock RoHS:否 制造商:Lantronix 产品: 用于:
101-0567 功能描述:单板计算机 BL2100 IDC Headers RoHS:否 制造商:Ampro By ADLINK 外观尺寸:EPIC 处理器类型:Intel Atom D510 频率:1.66 GHz 存储容量:2 GB (max) 存储类型:DDR2, L2 Cache 接口类型:Ethernet, PS/2, SATA, Serial, USB 工作电源电压:5 V, 12 V 功耗:13 W 最大工作温度:+ 70 C 尺寸:165.1 mm x 114.3 mm
101-0568 功能描述:单板计算机 BL2100 512K RoHS:否 制造商:Ampro By ADLINK 外观尺寸:EPIC 处理器类型:Intel Atom D510 频率:1.66 GHz 存储容量:2 GB (max) 存储类型:DDR2, L2 Cache 接口类型:Ethernet, PS/2, SATA, Serial, USB 工作电源电压:5 V, 12 V 功耗:13 W 最大工作温度:+ 70 C 尺寸:165.1 mm x 114.3 mm
101-0569 功能描述:单板计算机 BL2120 Btm Mnt RoHS:否 制造商:Ampro By ADLINK 外观尺寸:EPIC 处理器类型:Intel Atom D510 频率:1.66 GHz 存储容量:2 GB (max) 存储类型:DDR2, L2 Cache 接口类型:Ethernet, PS/2, SATA, Serial, USB 工作电源电压:5 V, 12 V 功耗:13 W 最大工作温度:+ 70 C 尺寸:165.1 mm x 114.3 mm
101-0570 功能描述:单板计算机 BL2120 Friction Lock RoHS:否 制造商:Ampro By ADLINK 外观尺寸:EPIC 处理器类型:Intel Atom D510 频率:1.66 GHz 存储容量:2 GB (max) 存储类型:DDR2, L2 Cache 接口类型:Ethernet, PS/2, SATA, Serial, USB 工作电源电压:5 V, 12 V 功耗:13 W 最大工作温度:+ 70 C 尺寸:165.1 mm x 114.3 mm
101-0571 功能描述:单板计算机 BL2120 IDC Headers RoHS:否 制造商:Ampro By ADLINK 外观尺寸:EPIC 处理器类型:Intel Atom D510 频率:1.66 GHz 存储容量:2 GB (max) 存储类型:DDR2, L2 Cache 接口类型:Ethernet, PS/2, SATA, Serial, USB 工作电源电压:5 V, 12 V 功耗:13 W 最大工作温度:+ 70 C 尺寸:165.1 mm x 114.3 mm
10-105712-03P 制造商:Amphenol Aerospace 功能描述:RECEPT