101-1006 Rabbit Semiconductor, 101-1006 Datasheet - Page 66

no-image

101-1006

Manufacturer Part Number
101-1006
Description
MODULE POWERCORE FLEX 3800
Manufacturer
Rabbit Semiconductor
Datasheet

Specifications of 101-1006

Module/board Type
MPU Core Module
For Use With/related Products
RCM3800
Lead Free Status / RoHS Status
Contains lead / RoHS non-compliant
DESCRIPTION
58
int anaIn(int channel);
Reads the state of an external analog channel. To read the ramp channels synchronously,
use the ref_conversion_done flag. The adc_rd_external function provides
an example.
The state being read is located in memory, and is updated by the A/D converter inter-
rupt. The update interval is as follows:
There is a macro/hook in the interrupt service routine for you add your A/D converter
MUX control code. The following steps explain how to implement round-robin MUX
control.
• For single-channel designs, the state of the analog channel will be updated approximately
• For multiple-channel designs, the update interval will depend on the number of channels
1. Set the maximum number of external A/D converter channels:
2. Create a pointer to your custom MUX control routine by defining
3. Write your adcmux routine to switch the hardware and adc_mux_channel index to
every 2.5 ms.
you have and the way you have implemented your MUX control (round-robin vs. random
channel selection):
#define MAX_ADCHANNELS <new value>
#define ADC_MUX_CNTRL call adcmux
This step will insert a call to the adcmux routine at the end of interrupt service routine.
This will allow the channel to be ready for the next conversion cycle.
the next A/D converter channel. Make sure you initialize your I/O before executing the
anaInExternalInit function.
the round-robin update interval will be the number of channels times 2.5 ms.
the random-channel-selection update interval will be >2.5 ms for the initial channel
selection and 2.5 ms thereafter.
anaIn
PowerCore FLEX

Related parts for 101-1006