
MB2146-450-E Setup Guide
Chapter 4 Sample Code Manual
MCU-AN-500072-E-10 – Page
37
4.4 How to Add these Library
Before using chapter4.2 library, following step ought to be referenced.
Create a new project
Copy .lib file to project document
Add .lib file to project
Add all needed .lib files to project
4.5 Usage Demo
Following table is an example for how to use this C file. Process_Control() is a function user
defined which transfer C file to come true user’s idea when to use ADC when to use I2C
when to use RTC.
ADC0_Init(); // initialise ADC
UART_init(); // initialise UART
EXT_Init(); // initialise Interrupt
Init_LCD(); // initialise LCD
TBT_Init(); // initialise Timebase timer
Init_EEProm(); // initialise EEPROM
while(1)
{
ADCTempSwitKey(); // Judge key value
Process_Control(); // transfer every library
LCD_LigON_NUM(0,2); // display LCD
}