BEGA220A USER MANUAL
- 64 -
3.5 ADC Converter and Backlight Adjustment
3.5.1 Overview
Bolymin provides a dynamic link library “
CtrlFunc_220A.dll
” which includes all control functions
of A/D converter and backlight adjustment.
For A/D converter, there are 6-ch A/D converters with 12-bit resolution in BEGA220A. User
may read the value from selected A/D converter channel by functions provided by Bolymin.
Suggested hardware wiring about A/D converter may be found in user manual. Detail
description of control functions of A/D converter may be found in section 3.5.2.
For backlight adjustment, user may get current brightness value or change the brightness of
backlight by control functions. The description of control functions of backlight adjustment
may be found in section 3.5.3.
User may use control functions about A/D converter and backlight adjustment by following
procedures:
STEP 1.
Add
“CtrlFunc_220A.h”
into project.
STEP 2.
Load “
CtrlFunc_220A.dll
” by “
Loadlibrary
()” function.
STEP 3.
Get the address of control functions by “
GetProcAddress
()” function.
STEP 4.
Execute control functions about A/D converter by the address got at STEP3.
STEP 5
. Call
“FreeLibrary()”
function to free the reference of “
CtrlFunc_220A.dll
” while ending
the application program.
Below is a simple example code to use the control functions about A/D converter and backlight
adjustment:
// variable declaration
HINSTANCE m_hModule;
BOOL (*m_pInitADC)(void);
int (*m_pReadADC)(int);
m_hModule=::LoadLibrary(_T("
CtrlFunc_220A.dll
"));
m_pInitADC = (BOOL (*)(void))::GetProcAddress(m_hModule,_T("InitADC"));
m_pReadADC = (int (*)(int))::GetProcAddress(m_hModule,_T("ReadADC"));
m_pInitBacklightCtrl = (BOOL (*)(void))::GetProcAddress(m_hModule,_T("InitBacklightCtrl"));
m_pGetBrightness = (int (*)(void))::GetProcAddress(m_hModule,_T("GetBrightness"));
m_pSetBrightness = (int (*)(int))::GetProcAddress(m_hModule,_T("SetBrightness"));
m_pInitADC();
value = m_pReadADC(ADC_CHANNEL0);
m_pInitBacklightCtrl();
brightness = m_pGetBrightness();
m_pSetBrightness(bri5);
// Increase the brightness by 5
m_pSetBrightness(0);
// OFF the backlight
FreeLibrary(m_hModule);
//
free the instance of “CtrlFunc_220A.dll”
Load “
CtrlFunc_220A.dll
” and get the address of
control functions.
Execute control functions of A/D converter.
Execute control functions of
backlight adjustment.
Summary of Contents for BEGA220A
Page 12: ...BEGA220A USER MANUAL 12 1 3 Mechanical Specifications 1 3 1 Module Specifications ...
Page 19: ...BEGA220A USER MANUAL 19 STEP7 Enter URL at the Address box ...
Page 47: ...BEGA220A USER MANUAL 47 5 Select No and click Next button to cancel the synchronization ...
Page 68: ...BEGA220A USER MANUAL 68 End of BEGA220A User Manual ...