The following sample codes are provided by MB95350L Series EV-Board.
4.2 Source Code File Description
Eight drive files are available in this project shown below,
4.2.1 ADC .c
Following table describes the ADC library.
Function Name
void ADC0_Init(void)
unsigned char Read_ADC(void)
Following table describes the function ADC0_Init.
Function name
Function prototype
Behavior description
Input parameter
Return value
Example
Following table describes the function Read_ADC.
Function name
Function prototype
Behavior description
Input parameter
Return value
Example
MB2146-460-E Setup Guide V1.2
Chapter 4 Sample Code Manual
Figure 4-2: Source Code Files
Initialize ADC function
Read and return ADC value
void ADC0_Init(void)
Initializes A/D module
None
None
Sets ADC input channel is AN00, and disable interrupt:
ADC0_Init();
unsigned char Read_ADC(void)
Read the ADC result
None
Return ADC result
[variavle] = Read_ADC();
MCU-AN-500083-E-12 – Page 27
Description
ADC0_Init
Read_ADC