User`s manual

RX62N Group, RX621 Group 4. Library Reference
4.2.25. 10-bit Analog to Digital Converter
1) R_ADC_10_Create
Synopsis
Configure a 10-bit ADC unit.
Prototype
bool R_ADC_10_Create(
uint8_t data1,
// ADC unit selection
uint32_t data2,
// ADC configuration
uint32_t data3,
// ADC conversion clock frequency
float data4,
// ADC input sampling time
void * func,
// Callback function
uint8_t data5
// Interrupt priority level
);
Description (1/2)
Set the ADC’s mode and operating condition.
[data1]
Select the ADC unit (0 or 1) to be configured.
[data2]
Conversion options. To set multiple options at the same time, use "|" to separate each value.
The default settings are shown in bold. Specify PDL_NO_DATA to use the defaults.
Scan mode
PDL_ADC_10_MODE_SINGLE or
PDL_ADC_10_MODE_CONTINUOUS_SCAN or
PDL_ADC_10_MODE_ONE_CYCLE_SCAN
Select Single mode,
Continuous scan mode or
One-cycle scan mode.
Input channel selection
PDL_ADC_10_CHANNELS_OPTION_1 or
Any mode:
For unit 0, channel AN0.
For unit 1, channel AN4.
PDL_ADC_10_CHANNELS_OPTION_2 or
Single mode:
For unit 0, channel AN1.
For unit 1, channel AN5.
Scan mode:
For unit 0, channels AN0 and AN1.
For unit 1, channels AN4 and AN5.
PDL_ADC_10_CHANNELS_OPTION_3 or
Single mode:
For unit 0, channel AN2.
For unit 1, channel AN6.
Scan mode:
For unit 0, channels AN0, AN1 and AN2.
For unit 1, channels AN4, AN5 and AN6.
PDL_ADC_10_CHANNELS_OPTION_4
Single mode:
For unit 0, channel AN3.
For unit 1, channel AN7.
Scan mode:
For unit 0, channels AN0, AN1, AN2 and AN3.
For unit 1, channels AN4, AN5, AN6 and AN7.
R20UT0084EE0112 Rev.1.12 Page 4-221
July. 16, 2014