Renesas Single-Chip Microcomputer M38C89T-ADF Bedienungsanleitung Seite 116

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 138
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 115
Rev.1.00 May 22 2012
REJ09B0566
4-96
4
3BLibrary Reference
4 4.2.10 41B10-bit Analog to Digital Converter R_ADC_10_Read
4) R_ADC_10_Read
Synopsis
Read the ADC conversion results.
Prototype bool R_ADC_10_Read(
uint16_t * data1
// Pointer to the buffer where the converted values are to be stored
);
Description
Reads the conversion values for an ADC channel.
[data1]
Specify a pointer to a variable or array where the results shall be stored.
Return value
True if a valid unit is selected; otherwise false.
Category
ADC
Reference
R_ADC_10_Create, R_ADC_10_Control
Remarks Between 1 and 4 conversion results will be read and stored. The number depends on the settings for
Input channel selectionand Scan mode when R_ADC_10_Create is used to configure the ADC unit.
The 10-bit data alignment is controlled using the R_ADC_10_Create function.
Ensure that the buffer is big enough for the requested number of values.
If no callback function is used, this function waits for the ADI flag to indicate that conversion is complete
before reading the results. If the ADC units control registers are directly modified by the user, this
function may lock up.
Program example
/* PDL definitions */
#include r_pdl_adc_10.h
/* PDL device-specific definitions */
#include r_pdl_definitions.h
void func(void)
{
uint16_t ADCresult[2];
/* Read the ADC values for channel 2 */
R_ADC_10_Read(
ADCresult
);
}
Seitenansicht 115
1 2 ... 111 112 113 114 115 116 117 118 119 120 121 ... 137 138

Kommentare zu diesen Handbüchern

Keine Kommentare