![Rabbit RabbitCore RCM4100 Скачать руководство пользователя страница 55](http://html1.mh-extra.com/html/rabbit/rabbitcore-rcm4100/rabbitcore-rcm4100_user-manual_3119422055.webp)
User’s Manual
51
anaInDriver
int anaInDriver(unsigned int cmd);
DESCRIPTION
Reads the voltage of an analog input channel by serial-clocking an 8-bit command to
the A/D converter by its Direct Mode method. This function assumes that Mode1 (most
significant byte first) and the A/D converter oscillator have been enabled. See
anaIn-
Config()
for the setup.
The conversion begins immediately after the last data bit has been transferred. An ex-
ception error will occur if Direct Mode bit D7 is not set.
PARAMETERS
cmd
contains a gain code and a channel code as follows.
D7—1; D6–D4—Gain Code; D3–D0—Channel Code
Use the following calculation and the tables below to determine
cmd
:
cmd = 0x80 | (gain_code*16) + channel_code
Gain Code
Gain
Multiplier
0
×1
1
×2
2
×4
3
×5
4
×8
5
×10
6
×16
7
×20
Содержание RabbitCore RCM4100
Страница 1: ...RabbitCore RCM4100 C Programmable Core Module User s Manual 019 0153 090508 G...
Страница 18: ...14 RabbitCore RCM4100...
Страница 102: ...98 RabbitCore RCM4100...
Страница 106: ...102 RabbitCore RCM4100...
Страница 110: ...106 RabbitCore RCM4100...
Страница 112: ......