MB2146-450-E Setup Guide
Chapter 4 Sample Code Manual
MCU-AN-500072-E-10 – Page
31
4.2 Source Code File Description
Eight drive files are available in this project shown below,
Figure 4.2 - 1 Source Code Files
4.2.1 ADC .c
In this function, environment temperature and key value will be calculated.
Following table describes the ADC library:
Function Name
Description
void ADC0_Init(void)
Initializes ADC function
void ADCTempSwitKey(void)
Detect keyboard value and temperature
value
Following table describes how to use these functions.
Example
Type
Operation
Return
Key Value Detect
ADC0_Init();
ADCTempSwitKey();
Global variable PraGlo.KEYFuncValue saved
the key value
Temperature Detect
Global variable PraGlo.TempNum saved the
temperature value