
Rev.1.00 May 22 2012
REJ09B0566
4.2.10 41B10-bit Analog to Digital Converter R_ADC_10_Control
3) R_ADC_10_Control
Synopsis
Start or stop an ADC unit.
Prototype bool R_ADC_10_Control(
uint16_t control
// ADC ON/OFF control
);
Description
Controls start / stop operation of the ADC.
[data]
Start or stop ADC operation.
• On / off control
PDL_ADC_10_ON or
PDL_ADC_10_OFF
Start or stop ADC conversion for all channels.
Return value
True if all parameters are valid; otherwise false.
Category
ADC
Reference
R_ADC_10_Create, R_ADC_10_Read
Remarks • Use this API function only when the software trigger option is selected.
• For single or one-cycle scan modes, the ADC will stop automatically when the conversion is complete.
• The time delay between starting conversions on multiple units is minimised, but has to use separate
instructions. This function minimises the delay between starts by using an interrupt to prevent other
interrupts from occurring during the start sequence. If the user has disabled interrupts (cleared the ‘I’ bit
in the PSW register) in their own code, this function will lock up.
For true simultaneous starting of ADC units, select a hardware trigger e.g. timer TMR.
Program example
/* PDL definitions */
#include “r_pdl_adc_10.h”
/* PDL device-specific definitions */
#include “r_pdl_definitions.h”
void func(void)
{
/* Stop ADC unit 0 and start ADC unit 1 */
R_ADC_10_Control(
PDL_ADC_10_0_OFF | PDL_ADC_10_1_ON
);
}
Comentários a estes Manuais