Home

BEGA220A

image

Contents

1. Destory function of serial port test dialog cUm nd edi um CSerialPortDlg OnDestroy CDialog OnDestroy m_pSerialPort gt Close delete m_pSerialPort delete m_cSendBuffer BEGA220A USER MANUAL 58 3 4 GPIO Control 3 4 1 How to Control GPIO for BEGA220A Bolymin provides a DLL file PGPIO 220A dll which is already included in your WinCE OS as a hidden file to control the General Purpose Input and Ouput GPIO signal BEGA220A there 12 user defined GPIO User may read current value of all GPIO of BEGA220A change values of GP output signal and set the attribute of GPIO by functions in pGPIO 220A dll User may use GPIO control functions by following procedures STEP 1 Add pGPIO 220A h into project STEP 2 Load pGPIO 220A dll by Loadlibrary function STEP 3 Get the address of control functions by GetProcAddress function STEP 4 Execute GPIO control functions by the address got at STEP3 Below is a simple example code to use the GPIO control functions variable declaration HINSTANCE m hModule BOOL m pGetGPlInput int void m pSetGPOutput int BOOL BOOL m plsOutput int void m pSetlOAttribute int BOOL hModulez LoadLibrary T pGPIO 220A dll _pGetGPinput BOOL int GetProcAddress m hModule T GetGPlInput _pSetG
2. PocketMory1 Program Files Temp Windows Control ata Documents Panel BEGA220A USER MANUAL 35 WIES EN NC STEP3 Run GpioTest 220A DERMEE e Desktop Favorites Fonts Help Programs Recent StartUp ADCTest ceconfig GarField a i amp n EFE LCDTest regedit SerialPortT PPCCapture STEP4 is the initial screen of GpioTest 220A and defaulted to test all KEYs as inputs File Edit View Go EJ GPIOTest for 220A 1 01 Desktop Favorites pa AM t GpioTest LCDTest GarField LCD power Enable Amplifier switch aues EET F STEP5 A green light at KEY stands for a high input signal File Edit View Go 7 x Ww TTT e 7 GPiotest for 220A v1 01 x e Desktop Fav rites EENT GarField 2 c LCD power Enable GpioTest LCDTest 7 Amplifier switch BEGA220A USER 36 Jum STEPS To test output pull down the Input and change the KEY to output X GPIOTest fr 2204 vi n1 Desktop Favorites M 24 Wo W GpioTest LCDTest STEP7 While KEY is defined as OUTPUT as step6 check on red circle to the left of KEYto generate a high output voltage BEGA220A USER MANUAL 37 WIES 2
3. CSerialPortDlg SerialPort Win32 WCE ARMVAI Debug v ISMDK2418 Device Select SMDK2416 BEGA220A platform Debug or release version SMDK2416 device or BEGA220A device BEGA220A USER MANUAL 47 WIES n NC 3 2 2 Create New Project In this section we will describe how to create a new project in eVC 4 0 An experienced programmer may jump to next section directly You may create a new project for your application by following steps STEP 1 Execute eVC 4 0 STEP 2 Select File New function E Microsoft eMbedded Visual C Edit View Insert Biojept Build Tools Window Help LORE my p iStartTim Ge Open LEER ELI kspace Open Wor LII or Recent Files Recent Workspaces Exit STEP 3 Select your application type setup the location and name of your project and Please select WCE AppWizard exe as application type New Files Projects Workspaces Application Project name amp jW CE ATL COM AppWizard TestAP1 WCE Dynamic Link Library f WCE MFC ActiveX Control Wizard TEGERE s WCE AppWizard dll DAPHENIX PROJECT BETASO3A oe Create new workspace Add to curren
4. 1 45 Serial Port Test BEGA220A Ver 1 05 3 2 59 e 220 30 WIES STEP7 Enter text at TK window and click on Send Tx button File Edit View Go 9 y ke E oe E E M Port Test BEGA220A 1 05 ADC Test e Set Serial port Databit 8 Ene ceconfig GarField Go Serial Parity BaudRate 9600 Stop 1 BOLYMIN Close Port JE TEST HyperTerminal File Edit view Call Transfer Help Dg 5 DH Connected 0 00 02 Auto detect Auto detect STEP9 Enter some text at PC end and note an echo of those text will appear at RX window at BEGA220A end ie 2 i Wa Coen ads Serial Port Test BEGA220A 1 05 OK x p ADCTest Set Serial port ceconfig 7778 com Data bit e Parity mE BaudRate 9600 sl Stop 1 E Close Port Send PY ab Serial Port Test BEGA220A 1 05 edd 2 59 7 BEGA220A USER MANUAL 3l WIES NM 2 5 3 Device USB installation BEGA220A supports one set of Device USB to communicate with a PC through ActiveSync software for data sync Here illustrates the connection of Device USB Please refer to chapter 3 1 1 for ActiveSync operation USB 220 connector 40 Pin External Bus
5. Internet Explorer Ji 7 Microsoft Media Player Lap Windows C EES 7 23 pM L f BEGA220A USER MANUAL 20 WIES STEP9 Enter URL address the Address box Toms cw penam windows default Welcome to Microsoft Pocket Internet Explorer Windows g CE 2004 Microsoft Corporation All rights reserved Terms of use Jr 3 19 5 STEP10 then the browser will surf to the URL as specified address http www bolymin com tw gee EMIN Professional x E Display Embedded SYSiem S Lou o RN About Boiym n Products Technical Support Numbering System Service Quality Poticy 87 BOLYMIN Display Embedded System AVL MDT LCM embedded electronics embedded BEGA220A USER MANUAL 21 2 5 Connect Communication 2 5 1 Pin Assignment of Communication Bus artic men mer mn Segen DENN SE Red Green mes mer 88 mm orangerie SE o ee SE 2 15 17 O oo BEGA220A USER MANUAL 22 WIES 2 5 2 Serial Port Test BEGA220A provides sets of RS 232 for serial connection There is also optional RS 485 or RS 422 interface available as options 2 5 2 1 Connect Serial Por
6. 2 SmartERP SmartReport C3 WINDOWS LEO C2KP D 1 WINXPSP3 E 90 on 192 168 1 251 2 Control Panel 1235 Documents E Network Places 2 Recycle Bin BEGA220A USER MANUAL 46 olin r 3 2 Programming for BEGA220A 3 2 1 Setup Development environment By following steps we can setup the development environment for WinCE 5 0 1 Install Microsoft eMbedded Visuall C 4 0 eVC 4 0 into desktop eVC 4 0 can be downloaded from http www microsoft com downloads details aspx FamilyIDz1DACDB3D 50D1 41B2 A107 FA75AE960856 amp displayLangzen Use free serial number TRT7H KD36T FRH8D 6QH8P VFJHQ 2 Install service pack 4 for eVC 4 0 and here is the download URL http download microsoft com download a 7 3 a735c7fb dcbd 429f 9090 d09b3b15d3fa e vc4sp4 exe After the patch the eVC version 15 4 00 1610 0 3 Connect BEGA220A and Desktop PC by procedures in section 3 1 2 4 Install SDK of BEGA220A provided by Bolymin The installation file may be found in the product CD Here is the download URL http www bolymin com tw manual BEGA220A SDK 100804 093 msi 5 The platform setting of embedded Visual C Following pictures show the required setting of eVC 4 0 SerialPort Microsoft eMbedded Visual SersalPortDlz cpp B File Edit View Insert Project Build Tools Window Help ei Ge x c m ClosePort
7. Pin assignment of Device USB in No Pin Pin No 26 e Ds 8 BEGA220A USER MANUAL 32 2 5 4 Speaker installation BEGA220A offers 2 sets of speaker circuits to connect to 80 2W speaker Connect speakers as illustrated to support audio playback opeaker opeaker Pin3 DSPC1 4 DSPC3 Pin23 DSPC2 24 DSPC4 3 set of Speaker Pin Name DSPC2 d set of peaker Pin Assignment of Speaker BEGA220A PinNo Pin Name Jin Name o x o4 DEG 3 M DSPC4 BEGA220A USER MANUAL 33 _ 2 6 ADC GPIO Bus 2 6 1 Pin Assignments of ADC GPIO Bus ADCTO ADCTS C i ADCT ADCT4 Blue Black 2 ME ADCT5 KEYI 1 KEY6 Purple Black oa 1 18 tute 9 Green 1 DI _ 0 KEY10 Grey Black Light n KEY11 KEY12 blue Black BEGA220A USER MANUAL 34 RN 2 7 2 6 2 Test BEGA220A offers 12 general purpose programmable I O ports GPIO Please refer to sample code at chapter A A The typical signal length is around 10 to 15 cm and the rated voltage is as follows Test Procedure STEP1 Select My Device on BEGA220A Internet Explorer gt Microsoft Media Player Windows C STEP2 Select Windows folder E En Application Network
8. 1 Packing Content A complete package should contain all of the following e BEGA220A module e Female USB to mini USB cable with 20cm length CB04P201LC01 220 communication cable with 3M 40 pin connector and length100cm CB40P1000LC01 only on sample stage e CD for user manual and utility software BEGA220A USER MANUAL 5 WIES M ur 1 1 2 Module Layout Touch screen To support touch screen operation BEGA220A Powersocket Use 12V 3A power with a spec of DC Plug in 2 5 socket ADC GPIO Bus GPIOx12 ADCx6 gt pommunication en x1 Device USB 2 0 RS 232x3 RS485 422x1 Optional 5 Host USB 1 1 Connect to USB 1 1 peripheral keyboard mouse etc HJ 45 Connect to Ethernet network BEGA220A USER MANUAL 6 WIES wu 7 Wi Fi Antenna Connect Wi Fi antenna socket SD Card socket SD and Card 4GB maz BEGA220A USER MANUAL 7 BOLYMIN A 1 2 Specifications 1 2 1 System Functional Blocks BEGA220A USER MANUAL 8 olin Ur 1 2 2 Module Specifications Specification CPU Samsung S3C2416X 400MHz 32 bit RISC architecture ARM926EJ CPU core System Memory 16 bit 64MB 133MHz DDR2 memory Storage Device 2GB NAND Flash 2 wire RS 232 x 3 Series Port Isolated RS485 422 x1 Option e SPI x1 Option 1x USB device USB2 0 for Active Sync only 1XUSB host 0581 1 7 TFT LCD LCD
9. Help Programs Recent StartUp ADCTest ceconfig GarField ap E pioTest_ LCDTest ADC1 ADC2 ADC3 ADC4 ADCS STEP6 Adjust variable resistor VR and observe the changes read out of ADC Port value Click on Stop to finish the ADC test 7 E E Desktop Favorites Fonts Help Programs Recent StartUp ADCTest ceconfig GarField Ju KZ io E ADCTest ver1 01 GpioTest LCDTest ADCO ADC1 ADC2 ADC3 ADC4 ADCS Fe 220 40 _ 3 BEGA220A Programming Guide This chapter demonstrates connection from BEGA20A to PC and how to use software to control serial port GPIO ADC Backlight and SPI Chapter 3 consists of the following 3 1 Transfer File Between BEGA220A and PC 3 2 Programming for BEGA220A 3 3 Serial Port Function 3 4 GPIO Control 3 5 A D Converter and Backlight Adjustment BEGA220A USER MANUAL 41 eee 3 1 Transfer File Between BEGA220A and 3 1 1 Connect PC and BEGA220A User may setup the connection between desktop PC and BEGA220A by following steps STEP 1 Install Microsoft ActiveSync 4 5 on desktop PC You may download ActiveSync from http www microsoft com downloads details aspx familyid 9e64 1c34 6f7f 404d a04b dc09f814 1141 amp displaylang en amp tm After installation you need to restart PC STEP 2 Connect desk
10. value definition TRUE The specified GPIO is output FALSE The specified GPIO is input SetlOAttribute Function Set the attribute of the specified GPIO Syntax void SetlOAttribute int gpio index BOOL value Parameters index The index of specified GPIO GIO KEY1 GIO KEY12 value New attribute of the specified GPIO GA OUTPUT Set the specified GPIO as output GA INPUT Set the specified GPIO as input Return value None BEGA220A USER MANUAL 60 BOLYMIN 3 4 3 Definition of GPIO Index Class CGPIO 220A support following index values Description User defined general purpose input output KEY1 User defined general purpose input output KEY3 User defined general purpose input output KEY5 RE OOO Sr GIO_KEY7 User defined general purpose input output KEY 7 GIO KEY8 User defined general purpose input output KEY8 GIO KEY9 User defined general purpose input output 9 GIO KEY10 User defined general purpose input output KEY10 User defined general purpose input output KEY11 User defined general purpose input output KEY 12 Backlight control Default value HIGH LCD power control Default value LOW Amplifier switch Default vale LOW Reserved for internal use m HY BEGA220A USER MANUAL 61 3 5 ADC Converter and Backlight Adjustment 3 5 1 Overview Bolymin provides a dynamic link
11. 6 3 ADC test 2 6 3 1 ADC test set up Prior to ADC port testing connect ADCTO port as illustrated Use Vdd of 3 3 and voltage divider to limit makimum ADCTO to be 1 6 ADC readout as 4095 12 bit unsigned Then run the ADC test by using test program as BEGA220A provided Note that the maximum voltage of ADCTO should not exceed 1 6 volt VDD RO 10K ADCTO gt gt VR 10K BEGA220A USER MANUAL 38 mmm 2 6 3 2 ADC test procedure STEP1 Device on BEGA220A My Device e Recycle Bin Internet Explorer Microsoft Media Player Windows STEP2 select Windows folder Application My Network PocketMory PocketMpbry1 Program Fies Temp Window s Control Data Documents Panel Desktop Favorites C ADCTest ceconfig GarField JL OE E E GpioTest LCDTest netmui regedit SerialPortT PPCCapture BEGA220A USER MANUAL 39 WIES 57 STEP4 ADCTest initial screen is as follows EN uw ae e Desktop Favarites Fonts Help Programs Recent StartUp ADCTest ceconfig GarField Ju Ju 4 fio W ADCTest ver1 01 pioTest LCDTest ADC1 ADC2 ADC3 ADC4 ADCS 3 z ADCTest ver1 01 STEP5 Click Start button to start testing ADC 0191 ea des 8 E gp E ee Desktop Favorites Fonts
12. BEGA220A USER MANUAL Features 9 CPU 7 800 480 with Touch Panel Wi Fi 10 100Mbps Ethernet RS 232 485 422 Audio SD MMC WINCE OS BOLYMIN INC 13F 1 20 Ta Long Rd 40310 Taichung Taiwan R O C WEB SITE http www bolymin com tw TEL 886 4 23293029 FAX 886 4 23293055 W History of Version NEW VERSION 2010 05 17 SPEC SPEC 2010 10 18 Revision evc4sp4 driver download URL etc BEGA220A USER MANUAL 2 _ ori TABLE OF CONTENTS 1 GENERAL INFORMATION e eene ee eere eere d 1 1 INTRODUCTION E 5 11 1 Packing CO 5 6 1 2 8 1 2 1 System Functional Plocks 8 1 2 2 Module ZSpoechfications 000000000000000000000000000000000000000 9 1 3 MECHANICAL 22225 10 1 3 1 Module ZSpoechfications 01000 10 2 BEGA220A INSTALLATION amp 11 2 1 CONNECT Ge UE 12 2 2 CONNECT A SD MMC Coppi 13 2 3 CONNECT HOST USB EE 14 2 4 CONNECT TOLAN a AA 15 2 5 CONNECT 18 2 6 CONN
13. Basic concept of class CGertalbort 0 0000 52 3 3 2 2 Member function of class 2 22044770 53 3 3 2 3 How to catch the receive message 00000 54 33 3 0o E850 E 55 3 4 GPIO CONTROL 59 3 41 How to Control GPIO for PBEGAZ20OA 59 3 4 2 GPIO Control Function for BEGAZ20A 0000 03 60 3 43 Definition of GPIO 2 2 4 0 00000000002000000000000 61 3 5 ADC CONVERTER AND BACKLIGHT ADJUSTMENT 00 62 39 1 62 3 5 2 Control Function of A D Converter 63 3 5 3 Function about Backlight Adiustment www 64 M u BEGA220A USER MANUAL 3 WIES 1 General Information This chapter provides basic information about Bolymin s BEGA220A module and it consists of 1 1 Introduction 1 2 Specifications 1 3 Mechanical Specifications BEGA220A USER MANUAL LAs f EN 1 1 Introduction BEGA220A module is a general purpose embedded system and is suitable for versatile applications such as medical probing devices in car automation human machine interface HMI etc And here is the order information for the BEGA220A family Order Information 20 PIN EXT BUS ox12 aDcx6 pea BEGA220A4 BEGA220A5 BEGA220A6 BEGA220A7 1 1
14. D databit DataBitTbl m_ComboData GetCurSel BYTE stopbit StopBitTbl m ComboStop GetCurSel BYTE parity ParityTbl m ComboParity GetCurSel BOOL m pSerialPort Open strPort baud databit stopbit parity if ret FALSE _ strPort _ Fail return m ButOpen EnableWindow FALSE Disable open button m ButClose EnableWindow TRUE Enable close button MessageBox strPort T is BEGA220A USER MANUAL 57 olin n X 5 DIST UU T ONES CIS Function for CLOSE button used to close current serial port KAA a void CSerialPortDlg OnCloseCom d m pSerialPort 2Close m ButOpen EnableWindow TRUE Enable Open button m ButClose EnableWindow FALSE Disable close button Function for SEND button used send data by serial port d AN AAA AAA void CSerialPortDlg OnSend UpdateData TRUE int len m strSendEdit for int 0 i lt len i m cSendBuffer i char m_strSendEdit GetAt i BOOL status m_pSerialPort gt Send m_cSendBuffer len if status MessageBox T Can t write string to COM T Error MB OK
15. ECT COMMUNICATION BUS 2 2 0201 27 2 601 Pin Assignment of Communication Bus 22 252 M MU ae 23 2 6 2 1 Connect Serial u L REE 23 2 6 2 2 Serial Port test procedure 27 2 6 3 Device UGbmstallaton 32 2 6 4 SpeakerJIJnstallallOn 33 2 7 ADC GPIO BUS AA 34 2 7 1 Pin Assignments of ADC Pus 000000002899 34 27 35 27 3 ADC fesl PEE 38 2 7 3 1 ADC ESI SA E 38 2 7 3 2 ADC test pDrocedure 39 3 BEGA220A PROG RAMMING GUIDE eeeeeececcccee 4 3 1 TRANSFER FILE BETWEEN BEGA220A aNpbC 42 3 1 1 Connect PC and BEGAZ20A 42 3 1 2 TranstierFiles 000000000000 46 3 2 PROGRAMMING FOR BEGAZZOA 47 3 2 1 Setup Development sess eene nnne enne nnne nnns 47 222 Create New ad no _ 48 3 3 SERIAL PORT FUNCTION Eden 51 3 3 1 51 3 3 2 Serial Port Control CSerialPort case 52 3 3 2 1
16. L void GetProcAddress m hModule T InitADC _pReadADC int int GetProcAddress m hModule T ReadADC plnitBacklightCtrl BOOL void GetProcAddress m hModule T InitBacklightCtrlI _pGetBrightness int void GetProcAddress m hModule T GetBrightness pSetBrightness int int GetProcAddress m hModule T SetBrightness _plnitADC alue m pReadADC ADC CHANNELO plnitBacklightCtrl brightness m pGetBrightness _pSetBrightness brightness 5 Increase the brightness by 5 _pSetBrightness 0 OFF the backlight FreeLibrary m_hModule free the reference of CtrlFunc_220A dIl BEGA220A USER MANUAL 62 H BOLYMIN eee S 3 5 2 Control Function of A D Converter initADC Function A D converter initialization User need to call this function before using A D converter BOOL initADC Return value TRUE Initial A D converter successfully FALSE Fail to initial A D converter ReadADC Function Read A D converted data from specified A D converter channel Syntax Int ReadADC int channel Parameters adc channel of specified A D converter channel ADC CHANNELO ADC CHANNEL5 A D converted data from specified A D converter channel BEGA220A USER MANUAL 63 57 mem 3 5 3 Function about Backlight Adjustment InitBacklightCtrl Function Initial backlight
17. LYMIN ee r NEN 5 Select No and click Next button to cancel the synchronization New Partnership Set Up a Partnership Before you can synchronize information between your mobile device and this computer vou must set up a partnership between them Would you like to set up a partnership Q Yes Set up a partnership so that can synchronize information between my device and this computer don t want to synchronize information Set up my device as a quest so that can copy or move information between my device and this computer BEGA220A USER MANUAL 45 WIES wu 3 1 2 Transfer Files After connecting PC and BEGA220A below screen will display The green cycle means the connection between PC and BEGA220A has been built Microsoft Activesync File View Tools Help schedule EU Explore lt Connected Hide Details amp Information Type Execute Explore program and move into the folder of BEGA220A you can transfer files between BEGA220A Br Mobile Device File Edit View Favorites Tools Help K Bak QJ 2 Search Folders Address Mobile Device Go i 59 p p p B D B My Documents Application Documents Network PocketMory PocketMory1 Program Files EI 4 Computer eg w Local Disk C e fer C Documents and Settings LJ LJ PhenixData Windows Control Panel 22 Program Files
18. OL Open LPCTSTR port int baud int data_bit int stop bit int parity Parameters port Name of serial port listed in the table of section 3 3 1 baud rate Baud rate ex 9600 data bit Data bit 7 8 stop bit Stop bit ONESTOPBIT ONESSTOPBITS TWOSTOPBITS parity Parity NOPAHITY ODDPARITY EVENPAHIT Y Return value TRUE Open serial port successfully FALSE Open serial port fail Send Function Send specified data by this serial port Syntax BOOL Send LPCVOID buf ptr DWORD data len buf ptr Memory pointer of data will be sent data len Length of data will be sent UNIT byte Return value TRUE Send data successful FALSE Send data fail SetCommMsg Function CSerialPort object will send a receive message to specified window User need to call this function to set the receive message value and the window that will receive message Syntax void SetCommMsg HWND win handle receive msg Parameters win handle Handle of the window that will receive message receive msg User defined message value Return value None Close Function Close current serial port BOOL Close Parameters None Return value TRUE Close serial port successfully FALSE Cloas serial port fail BEGA220A USER MANUAL 53 WIES 3 3 2 3 How to catch the receive message Please follow below steps to catch the receive message STEP 1 Define a receive messag
19. POutput void int BOOL GetProcAddress m hModule T SetGPOutput _plsOutput BOOL int GetProcAddress m hModule T IsOutput _pSetlOAttribute void mt BOOL GetProcAddress m hModule T SetlOAttribute pSetlOAttribute GIO KEY1 GA INPUT bPOUT1 m pGetGPInput GIO KEY pSetlOAttribute GIO KEY1 GA OUTPUT if m plsOutput GIO 1 oSetGPOutput GIO KEY1 TRUE H H Ta BEGA220A USER MANUAL 59 W 3 4 2 GPIO Control Function for BEGA220A GetGPlInput Function Get current status of specified GPIO Syntax BOOL GetGPInput int gpio index Parameters gpio index The index of specified GPIO Refer to section 3 4 3 for the value definition Return value TRUE Current status of specified GPIO is HIGH FALSE Current status of specified GPIO is LOW SetGPOutput Function Set value of specified GP Output Syntax void SetGPOutput int gpio index BOOL value Parameters gpio index The index of specified GP output Refer to section 3 4 3 for the value definition value New value of specified GP output TRUE Set specified GP output to HIGH FALSE Set specified GP output to LOW Return value None IsOutput Function Check if the specified GPIO is output or not Syntax BOOL IsOutput int gpio index gpio index The index of specified GPIO Refer to section 3 4 3 for the
20. Resolution 800 480 LCD Brightness 400 cd m Power Supply DC9V DC28V Operating Temperature 20C 70 C WinCE 5 0 default BEGA220A USER MANUAL 9 WIES m 1 3 Mechanical Specifications 1 3 1 Module Specifications BEGA220A USER MANUAL 10 WIES wu 2 BEGA220A Installation amp Testing This chapter provides installation information for BEGA220A module and it consists of 2 1 Connect power 2 2 Connect SD MMC 2 3 Connect Host USB 2 4 Connect LAN 2 5 Connect Wi Fi 2 6Connect Communication Bus 2 7 Connect ADC GPIO Bus BEGA220A USER MANUAL 11 WIES 2 1 Connect Power User may prepare a power adaptor with an output of DC12V 3A and 2 59 as illustrated DC Plug in 2 5 BEGA220A USER MANUAL 12 WIES 2 2 Connect SD MMC Insert SD MMC as illustrated and eject card only when it s not at reading mode Note that there is write protection toggle switch on the card and make sure it s not write protected so data can be written into the card SD MMC Card 00 6 9299 File Edit View Go 019 N Application Network PocketMory 1 Program Files ERa e Windows Control Data Documents Panel Printer BEGA220A USER MANUAL 13 WIES 2 3 Connect Host USB Users
21. controller User need to call this function before adjusting backlight brightness BOOL InitBacklightCtrl Return value TRUE Initial backlight controller successfully FALSE Fail to initial backlight controller GetBrightness Function Get current brightness value of backlight int GetBrightness None Current brightness value of backlight 0100 SetBrightness Function Set brightness value of backlight Syntax Int SetBrightness int new value Parameters new value New brightness value of backlight 0 100 0 Turn OFF the backlight Original brightness value of backlight BEGA220A USER MANUAL 64 Borin lt End of BEGA220A User Manual gt BEGA220A USER MANUAL 65
22. e in your code as below const WM CMD OK WM_USER 1 STEP 2 Declare a message processing function in the window that will process receive message Generated message map functions OFK WSG CSerialPortDlg virtual BOOL OnInitDialogt afx msg void n penCom afx msg void nCloseCom afx msg void afx msg void nClearSendl afx msg void nClearRec afx msg void nDestroyt afx msg void OnCmdTest afx msg LRESULT OnCommRece WPRRAM wParam LPARAM lParam DECLARE MESSAGE HAPI STEP 3 Create message mapping BEGIN HESSAGE_MAP CSerialPortDlg CDialog AFK MSG _MAP CSerialPortDlg ON CLICKED IDC OPEN COM ON BN CLICKED IBC CLOSE COM On loseCom ON BN CLICKED IDC SEND OnSend ON BN CLICKED IBC CLEAR SEND OnClearSend BN CLICKED IDC CLERR REC OnClearRec BN CLICKED LIDC TEST OnC mdTest WA DESTROV ab MESSAGE HM CHD OnCommRecv END STEP 4 Implement the receive message processing function BEGA220A USER MANUAL 54 WIES EN NC mm 3 3 3 Code Bolymin provide a test application and its source code for example Below picture is the screen shot of the serial port test program Select serial port and setup its parameter values Open Close selected serial port Clear received data Send data Clear sent data Clear received data Below are th
23. e major source codes of the test program File SerialPortDlg cpp CSerialPortDlg dialog const WM WM_USER 1 BEGIN MESSAGE MAP CSerialPortDlg CDialog II AFX MSG MAP CSerialPortDlg ON BN CLICKED IDC OPEN COM OnOpenCom ON BN CLICKED IDC CLOSE COM OnCloseCom ON BN CLICKED IDC SEND OnSend ON BN CLICKED IDC CLEAR SEND OnClearSend ON BN CLICKED IDC CLEAR REC OnClearRec ON WM DESTROY AFX MSG MAP ON MESSAGE WM OK OnCommRecv END MESSAGE BW I CSerialPortDlg message handlers 220 55 olin 2 NW BOOL CSerialPortDlg OnlnitDialog CDialog OnlnitDialog Set the icon for this dialog The framework does this automatically when the application s main window is not a dialog Setlcon m hicon TRUE Set big icon Setlcon m hlcon FALSE Set small icon CenterWindow GetDesktopWindow center to the hpc screen m ComboBaud SetCurSel 5 Define BaudRate 115200 m_ComboData SetCurSel 1 Define data bit 8 bit m_ComboParity SetCurSel 0 Define parity none m_ComboPort SetCurSel 0 Define searial COM1 m_ComboStop SetCurSel 0 Define stop bit 1bit m_ButClose EnableWindow FALSE Close Button is disable m strRecDisp _ m cSendBuffer new char 60 UpdateData FALSE m pSerialPort new CSerialPort m pSerialPor
24. egedit PAcCapture t GpioTest BEGA220A USER MANUAL 29 olin f STEP4 is the initial screen of SerialPortTest gt E E E E E E AppMgr Desktop Fa EW EE ol bn Set Serial port Databit 8 D il None ceconfig GarField Serial Parity BaudRate 08 Stop 1 NI X Send Tx gt ab Serial Port Test BEGA220A Ver 1 05 STEP5 Select COM port as appropriate Pull down at Baud Rate ranged between 9600 to 115200 and use the same value at both BEGA220A and PC end Then click on Open port to activate a serial connection le T E E E E E Port Test BEGA220A 1 05 ADC Test Bd Serial Databit Noe DID RA TX Send Tx 27 Serial Port Test BEGA220A 1 05 9 2 50 STEP6 everything goes right you will see the pop up window as follows Click on OK to proceed E E E E AppMgr Desktop EW EE ol bn Set Serial port isl comi gt Data bit Je Parity BE ceconfig GarField Gpio Serial D mmm BaudRate 9600 SerialPortTest 4 Open Port Open COML is OK E Send Tx Clear
25. erial ports in BEGA220A Below table lists the function of each serial port Name Function Comment RS 422 or RS485 port Used by application program 2 wire RS 232 COMA Used by application program 2 wire RS 232 Debug port May not open by application program BEGA220A USER MANUAL 51 f EN 3 3 2 Serial Port Control CSerialPort class Bolymin provided a class CSerialPort which implements basic control logic for serial port Application may use this class by adding CSerialPort cpp and CSerialPort h into project Customer may modify the source code of class CSerialPort to expand the serial port functions 3 3 2 1 Basic concept of class CSerialPort The object of class CSerialPort will handle all data transfer and receive of opened serial port Once there is any data is received by the opened serial port CSerialPort object will send a user defined message to user defined window which should be main window of application program Below picture shows the flow Window of user application Call Send function to Send user defined send data by serial port message to user window CSerialPort object e Serial port ata BEGA220A USER MANUAL 52 W 3 3 2 2 Member function of class CSerialPort CSerialPort Function Constructor function of calss CSerialPort CSerialPort None Open Function Open a serial port BO
26. he key is provided automatically 802 1 Authentication Enable 802 1 authentication on this network EAP type TLS Properties 47 501086861 EEEN 7 26 220 USER 19 olin ee STEP6 Select the wireless access point SSID as appropriate then click Connect to enable wireless connection of BEGA220A The connection status is shown right beneath the SSID selection box t Device Recycle Bin IP Information IPv6 Information Wireless Information Select a network and press connect or right click for more options add a new network double click Add Y Add New corega preferred savesafe WiFi Test Status Connecteg to corega Signal Strength Very Low Notify me when new wireless networks are available Advanced View Log 27 501086861 a JL 7 31 5 STEP7 Select IP Information tab and click on renew to refresh IP address LIP Information EPv6 Information wireless Information Recycle Bin o intermet Bs tocol TCP IP Internet Address Type DHCP Explorer IP Address 192 168 1 33 5 Subnet 255 255 255 0 Postes Default Gateway 192 168 1 254 Details 24 501085861 So 39 3 18 DA STEP8 Select Internet Explorer on desktop t My Device Recycle Bin 2
27. library CtrlFunc 220A dll which includes all control functions of A D converter and backlight adjustment e 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 e 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 CtriFunc_220A h into project STEP 2 Load 220A dll by Loadlibrary function STEP Get the address of control functions by GetProcAddress function STEP A 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 plnitADC void int Um pReadADOC int hModulez LoadLibrary T CtrlFunc 220A dll plnitADC BOO
28. may connect host USB to any USB1 0 device for example mouse keyboard USB storage through a mini USB cable as illustrated 55 Host USB 11 BEGA220A USER MANUAL 14 aaa Connect to LAN STEP1 Connect to LAN port as illustrated STEP2 Click on Start Setting Networking and Dial up connections to set up a network r Device g Recycle Bin H Internet Explorer d Microsoft Media Player A Windows d Make New 501086861 DM9ISA1 Connection BEGA220A USER MANUAL 15 STEP4 Select static IP DHCP IP as appropriate y Make New 501086861 DMOSISA1 Connection DM9000 Fast Ethernet Adapter Settings Recycle Bin fd Internet Explorer gt Microsoft wA Player Windows STEP6 Enter URL the Address Welcome to Microsoft Pocket Internet Explorer up A 2004 Microsoft Corporation All rights reserved Terms of use BEGA220A USER MANUAL 16 M r STEP7 Enter URL the Address box MI srt war bolymin com tw rrotessional Display Em tn CL M re ma BEGA220A USER 17 WIES F 2 4 Connect W 149 1 7 23 A E t 5 5 7 18 Hi 2 Media Player e Internet Bin Expl
29. nected Auto detect Auto detect STEP2 7 Select PC s COM port in Connect using box to connect to serial port on BEGA220A Then click OK TEST HyperTerminal File Ed call ansfer Help Bis Enter details for the phone number that you want to dial Country region Area code Phone number EE D eee Disconnected Auto detect Auto detect BEGA220A USER MANUAL 27 WIES M STEP3 Pull down Bits per second to set up communication speed usu Ranges from 9600 to 115200 Make sure the baud rate value is identical to that on BEGA220A Select None for Flow control then click Apply and click OK TEST HyperTerminal File Edit View Transf COM1 Properties Port Settings Bits per second 9600 Parity Mone Stop bits Disconnected Auto detect Auto detect BEGA220A USER MANUAL 28 M r BEGA220A set up procedure STEP1 Select My Device on BEGA220A My Device Recycle Bin Internet Explorer Microsoft Media Player Windows STEP2 Select Windows folder Temp Windows Control Panel Network PocketMory PocketMory1 Program Files Application Data Documents ae uU Program StartUp ADCTest ceconfig GarField Recent Help Desktop Favorites JU Ju 76 LCDTest r
30. onnect to PC s COM port for connectivity test 422 Note that either 85 422 or RS 485 be used at a time If no isolation is required please connect Pin14 to Pin 12 and Pin 34 to Pin 32 otherwise connect Pin 14 and 34 to a voltage of 5 10 voltage 4 75 5 25v RS 485 Option COM1 BEGA220A support one set of RS 485 serial interface and defaulted to COM1 port During connectivity test it is applicable to use RS 232 to RS 422 485 converter board to connect to PC s COM port Pin assignment of RS 485 Note that either RS 422 or RS 485 can be used at a time If no isolation is required please connect Pin14 to Pin 12 and Pin 34 to Pin 32 otherwise connect Pin 14 to a voltage of 5 1096 voltage 4 75 5 25v and pin 34 to ground BEGA220A USER MANUAL 26 WIES 2 5 2 2 Serial Port test procedure To test serial connectivity first connect the RS 232 cable as appropriate and run the hyper terminal program to test if receiving and sending function normally Here is the step guide PC set up STEP1 Run hyper terminal program under start program accessories communication then enter a name for this session and click ok New Connection HyperTerminal Egt VIEW Itansretr D ar sien Connection Description Connection Enter name and choose an icon for the connection Discon
31. orer STEP1 Screw up the Antenna on BEGA220A as illustrated STEP2 Click on the network icon as highlighted to enter the wireless setup BEGA220A USER MANUAL Device Recycle Bin H Internet Explorer o Media Player IP Information Information Wireless Information Internet Protocol TCP IP Address Type IP Address Subnet Mask Default Gateway DHCP 192 168 1 36 255 255 255 0 192 168 1 1 7 501086861 EES 7 25 STEP4 Click Add New to add new wireless connection Device Bin H Internet Explorer gt Media Player Select network and press connect right click for more uu d ICY CICA MAA Tereg peere savesafe WiFi Test Status Connected to corega Signal Strength Low Notify me when new wireless networks are available Advanced View Log STEP5 Set up SSID IEEE802 1X Authentications parameters as appropriate on BEGA220A then click OK D My Device Recycle Bin H Internet Explorer e Media Player This is a computer to computer ad hoc network wireless access points are not used Wireless network key This network reguires key Encryption AES Authentication 2 Network key Key index E T
32. t 1 set of RS 232 Debug Port for update only Connect 15 set of RS 232 BEGA220A to DB9 female on PC s COM port This RS 232 port is used as debug port ONLY with a signal level of 12v BEGAZZOA DB9 Female 40 Pin External Bus connector Pin Assignment of RS 232 ia 232 DB9 Female BEGA220A EE Pin Pin Name 220 USER 23 WIES M 274 set of 5 232 COM3 Connect 274 set of RS 232 to PC s COM port BEGA220A reserves port for the 274 set of RS 232 and its signal level is at 12 v BEGAZZOA DB9 Female 40 Pin External Bus connector BEGAZ2OA n No 1 00 3 RD RXDST CD os 8 o BEGA220A USER MANUAL 24 WIES n 314 set of RS 232 COM4 Connect 3 set of RS 232 which is defaulted to BEGA220A to DB 9 port of PC The signal level runs at 12v BEGAZZOA DB9 Female 40 Pin External Bus connector TXD2 D RXD2T RD GND Pin assignment of RS 232 HS 232 DB9 Female BEGA220A Pin No Name XD2T PEN 2 ELLEN gt 220 USER 25 2 NW EN RS 422 Option COM1 BEGA220A supports 1 set of RS 422 serial interface and defaulted to COM1 port It is supported to use a RS 232 to RS 422 485 converter board to c
33. t SetCcommMsg m hWnd WM CMD return TRUE j Implement function used to process receive data from serial port UU MISMO LRESULT CSerialPortDlg OnCommRecv WPARAM wParam LPARAM IParam CString tmp char buf DWORD buflen buf char wParam memory pointer of received data buflen DWORD IParam received data length CEdit pRecvStrEdit CEdit GetDlgltem IDC REC DISP for int i 0 i lt buflen i buf BEGA220A USER MANUAL 56 olin M AES tmp Format T 96c buf m strRecDisp tmp pRecvStrEdit gt SetWindowText m_strRecDisp Show return 0 Initial user interface const CString PorTbl 4 _ 1 T COM3 T COM4 T COME6 const DWORD 6 4800 9600 19200 38400 57600 115200 const DWORD DataBitTbl 2 7 8 const BYTE StopBitTbl 3 ONESTOPBIT ONE5STOPBITS TWOSTOPBITS const BYTE ParityTbl 4 NOPARITY ODDPARITY EVENPARITY MARKPARITY Function for OPEN button used to open selected serial port IPIE void CSerialPortDlg OnOpenCom UpdateData TRUE CString strPort PorTbl m_ComboPort GetCurSel DWORD baud BaudTbl lm ComboBaud GetCurSel DWOR
34. t workspace e Dependency of 3 WCE Static Library 32 MIPSII FP Cancel 220 USER 48 WIES STEP 4 Select Dialog based and language setting Click Next button WCE AppWizard exe Step 1 of 4 Application What type of application would you like to create Single document Dialog based Finish Application Windows Help Activex Controls Please enter a title for your dialog TestaPt Cancel BEGA220A USER MANUAL 49 olin mE _ STEP 6 Click Next button WCE MFC AppWizard exe Step 3 of 4 Edit View Insert Build Help F TODD No thank you How would you like to use the library C As a shared DLL As a statically linked library lt Back gt Finish Cancel STEP 7 Click Finish button Step 4 of 4 AppWizard creates the following classes for You CTestAPlApp CTest P1 Dlg Class name Header file CTestAP Dig TestAP1 DIg h class Implementation file TestAP1 Dig cpp STEP 8 Now you can add your codes into this new project You can get more development information from below MSDN website http msdn microsoft com en us library bb847963 aspx BEGA220A USER MANUAL 50 _ 3 3 Port Function 3 3 1 Overview There 4 s
35. top PC and BEGA220A by USB cable Below picture shows the hardware connection between desktop PC and BEGA220A for file transfer 2 USB cable Please note that the USB cable should plug into the connector of device USB wiring from the 40 pin communication bus Below table shows the pin assignment of device USB on the 40 bus BEGA220A USER MANUAL 42 olin cr STEP 3 Power on BEGA220A and connect BEGA220A and PC by USB cable For the first connection windows system on PC will request the USB device driver of BEGA220A Please install USB driver by following procedures 1 Select the advance item on below dialog and click Next button Found New Hardware Wizard This wizard helps you install software for SEC 53 2443 lt Test B D If your hardware came with an installation CD lt 4 or floppy disk insert it now What do you want the wizard to do Click Next to continue 2 Click Browse button and then select the directory which includes USB device driver file of BEGA220A Click Next button Found New Hardware Wizard Please choose your search and installation options gt Search for the best driver in these locations Use the check boxes below to limit or expand the default search des local paths and removable media The best driver Found will be insta Search removable media flopp
36. y CD ROM Include this location in the search Browse C Program Files Microsoft ActiveSync Drivers Don t search will choose the driver to install Choose this option to select the device driver from a list Windows does not guarantee that the driver you choose will be the best match for your hardware mmm following download URL contain all needed driver for 220A Active Sync Samgsung drivers http www bolymin com tw manual dnw rar BEGA220A USER MANUAL 43 WIES 3 Click Continue button Hardware Installation Po The software vou are installing for this hardware Samsung 5175151 USB Sync has not passed Windows Logo testing to verify its compatibility with Windows Tell me why this testing is important Continuing your installation of this software may impair or destabilize the correct operation of your system either immediately or in the future Microsoft strongly recommends that you stop this installation now and contact the hardware vendor for software that has passed Windows Logo testing EI Continue Anyway STOP Installation 4 Click Finish button Now BEGA220A may connect to PC by ActiveSync Found New Hardware Wizard Completing the Found New Hardware Wizard The wizard has finished installing the software for Samsung 55151 USB Sync Click Finish to close the wizard BEGA220A USER MANUAL 44 BO

Download Pdf Manuals

image

Related Search

BEGA220A bega 22002926l beg220k bga2200

Related Contents

AC-Safe AC-337 Instructions / Assembly : Free Download, Borrow, and Streaming : Internet Archive  DÉTERMINATION DU pH Méthode de type I  HP Pavilion G5402uk  ABAQUS GUI Toolkit User's Manual  EXE-CDVI_IM CIP12DR CMYK A5 EN  User Manual  IAN 114249 - Kompernass  

Copyright © All rights reserved.
Failed to retrieve file