Rabbit RabbitCore RCM4100 User Manual page 55

C-programmable core module
Table of Contents

Advertisement

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
User's Manual
anaInDriver
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 = 0x80 | (gain_code*16) + channel_code
Gain Code
0
1
2
3
4
5
6
7
Gain
Multiplier
×1
×2
×4
×5
×8
×10
×16
×20
cmd:
51

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the RabbitCore RCM4100 and is the answer not in the manual?

Questions and answers

Table of Contents