Bolymin BE220C User manual
Bolymin BE220C is a powerful industrial-grade computer module that combines advanced processing capabilities with a wide range of connectivity options and multimedia features, making it ideal for a variety of applications in automation, control, and data acquisition systems.
Advertisement
Advertisement
BE220C
USER MANUAL
Features:
ARM 9 CPU
7” 800X480 TFT with Touch Panel @18bit color
Wi-Fi
10/100Mbps LAN
RS-232/485/422
Audio
Host USB1.1 x 1
Device USB2.0 x 1
card
Support WINCE 5.0 OS
Support .Net Compact Framework 3.5
BOLYMIN, INC.
5F, 38 Keya Rd., Daya Dist., Taichung City 42881, Taiwan, R.O.C.
WEB SITE: http://www.bolymin.com.tw
TEL: +886-4-2565-8689 FAX: +886-4-2565-8698
Declaration of Conformity
CE Class A
This product has passed the CE test for environmental specifications. Test conditions for passing included the equipment being operated within an industrial enclosure. In order to protect the product from being damaged by ESD (Electrostatic Discharge) and EMI leakage, we strongly recommend the use of CE-compliant industrial enclosure products.
FCC Class A Federal Communication Commission Interference Statement
This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to Part 15 of the FCC Rules.
FCC Caution:
Any changes or modifications not expressly approved by the party responsible for compliance could void the user’s authority to operate this equipment.
Note:
This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:
(1) This device may not cause harmful interference, and
(2) This device must accept any interference received, including interference that may cause
undesired operation.
IMPORTANT NOTE:
FCC Radiation Exposure Statement:
This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the radiator & your body.
This device and its antenna(s) must not be co-located or operation in conjunction with any other antenna or transmitter.
For product available in the USA/Canada market, only channel 1~11 can be operated. Selection of other channels is not possible.
Caution:
To comply with FCC part 15 rules in the United States, the system must be professionally installed to ensure compliance with the Part 15 certification. It is the responsibility of the operator and professional installer to ensure that only certified systems are deployed in the United States.
The use of the system in any other combination (such as co-located antennas transmitting the same information) is expressly forbidden.
This BE220C must be installed and used in strict accordance with the manufacturer's instructions as described in the user documentation that comes with the product. Any other installation or use will violate FCC Part 15 regulations. Modifications not expressly approved by manufacture could void your authority to operate the equipment.
BE220C USER MANUAL - 2 -
History of Version
Version
01
Original version
Contents
BE220C USER MANUAL - 3 -
Date Note
2013/12/18 Spec.
TABLE OF CONTENTS
1
GENERAL INFORMATION ....................................................... 5
1.1
I
NTRODUCTION
............................................................................................................................................. 6
1.1.1
Packing Content ................................................................................................................................................ 6
1.1.2
Module Layout ................................................................................................................................................... 7
1.2
S
PECIFICATIONS
........................................................................................................................................... 9
1.2.1
System Functional Blocks ............................................................................................................................. 9
1.2.2
Module Specifications ................................................................................................................................... 10
1.3
M
ECHANICAL
S
PECIFICATIONS
.................................................................................................................... 11
1.3.1
Module Specifications .................................................................................................................................... 11
2
BE220C INSTALLATION & TESTING .................................. 12
2.1
C
ONNECT
P
OWER
....................................................................................................................................... 13
2.2
C
ONNECT A
SD/MMC C
ARD
....................................................................................................................... 14
2.3
C
ONNECT
H
OST
USB ................................................................................................................................. 15
2.5
C
ONNECT
W
I
-F
I
.......................................................................................................................................... 19
2.6
C
ONNECT
C
OMMUNICATION
B
US
................................................................................................................. 23
2.6.1
Pin Assignment of Communication Bus .................................................................................................. 23
2.6.2
Serial Port Test ................................................................................................................................................ 24
2.6.2.1
Connect Serial Port ................................................................................................................................................ 24
2.6.2.2
Serial Port test procedure ..................................................................................................................................... 28
2.6.3
Device USB installation ................................................................................................................................ 33
2.6.4
Speaker installation ....................................................................................................................................... 34
2.7
ADC_GPIO B
US
....................................................................................................................................... 35
2.7.1
Pin Assignments of ADC_GPIO Bus .......................................................................................................... 35
2.7.2
GPIO Test .......................................................................................................................................................... 36
2.7.3
ADC test ............................................................................................................................................................ 39
2.7.3.1
ADC test set-up ....................................................................................................................................................... 39
2.7.3.2
ADC test procedure ................................................................................................................................................ 40
2.8
H
OW TO INSTALLATION THE
BE220C
ON EQUIPMENT
................................................................................... 42
3
BE220C PROGRAMMING GUIDE ...................................... 46
3.1
T
RANSFER
F
ILE
B
ETWEEN
BEGA220C
AND
PC ......................................................................................... 47
3.1.1
Connect PC and BE220C .............................................................................................................................. 47
3.1.2
Transfer Files ................................................................................................................................................... 51
3.2
P
ROGRAMMING FOR
BE220C ..................................................................................................................... 52
3.2.1
Setup Development environment ............................................................................................................... 52
3.2.2
Create New Project ......................................................................................................................................... 53
3.3
S
ERIAL
P
ORT
F
UNCTION
............................................................................................................................. 56
3.3.1
Overview ........................................................................................................................................................... 56
3.3.2
Serial Port Control-CSerialPort class ........................................................................................................ 57
3.3.2.1
Basic concept of class CSerialPort .................................................................................................................... 57
3.3.2.2
Member function of class CSerialPort ............................................................................................................... 58
3.3.2.3
How to catch the receive message ..................................................................................................................... 59
3.3.3
Example Code ................................................................................................................................................. 60
3.4
GPIO C
ONTROL
......................................................................................................................................... 64
3.4.1
How to Control GPIO for BE220C ............................................................................................................... 64
3.4.2
GPIO Control Function for BE220C ........................................................................................................... 65
3.4.3
Definition of GPIO Index ............................................................................................................................... 66
3.5
ADC C
ONVERTER AND
B
ACKLIGHT
A
DJUSTMENT
........................................................................................ 67
3.5.1
Overview ........................................................................................................................................................... 67
3.5.2
Control Function of A/D Converter ............................................................................................................ 68
3.5.3
Function about Backlight Adjustment ...................................................................................................... 69
4 TROUBLESHOOTING
BE220C USER MANUAL - 4 -
1
General Information
This chapter provides basic information about Bolymin’s BE220C module and it consists of :
1.1 Introduction
1.2 Specifications
1.3 Mechanical Specifications
BE220C USER MANUAL - 5 -
1.1 Introduction
BE22C 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 BE220C family:
Order Information
Part No. RS-485 RS-422 WLAN 20 PIN EXT BUS(
IOX12,ADCX6
)
BE220C
☆
BE220C1
BE220C2
BE220C3
☆
☆
☆
☆
☆
☆
☆
BE220C4 ☆
BE220C5 ☆
☆
☆
BE220C6 ☆
BE220C7 ☆
☆ ☆
1.1.1 Packing Content
A complete package should contain all of the following:
BE220C module
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)
CD for user manual and utility software
BE220C USER MANUAL - 6 -
1.1.2 Module Layout
No.
1
1
Name Description
Touch screen To support touch screen operation on BE220C
2 3 4 5 6
No. Name Description
2 Power
Use 12V/3A power with a spec. of DC Plug_in φ2.5 socket
4
Communication
Bus
5 Host-USB 1.1
6 RJ-45
BE220C USER MANUAL
Device USB 2.0,RS-232x3,RS485/422x1(Optional)。
Connect to USB 1.1 peripheral (keyboard, mouse, etc)
Connect to Ethernet network
- 7 -
8
7
No.
7
Name
Wi-Fi Antenna socket
Connect Wi-Fi antenna
Description
8 SD Card socket Connect SD and MMC Card (4GB max.)
BE220C USER MANUAL - 8 -
1.2 Specifications
1.2.1 System Functional Blocks
BE220C USER MANUAL - 9 -
1.2.2 Module Specifications
Parameter
CPU
System Memory
Storage Device
Serial Port
USB
Specification
Samsung S3C2416X 400MHz
32 bit RISC architecture ARM926EJ CPU core
16-bit 64MB/133MHz DDR2 memory
2GB NAND Flash
2 wire RS-232 x 3
Isolated RS485/422 x1(Option)
1x USB device (USB2.0) for Active Sync only
1XUSB host (USB1.1)
ADC
LAN
Audio
Wi-Fi
OS
LCD Size
LCD Resolution
LCD Brightness
Power Supply
Operating Temperature
Support 6 x channel 12 bit high speed A/D converter
High performance 16-bit 10/100 Ethernet controller
Dual channels 2 watts speaker output
IEEE 802.11b/g, Wi-Fi compliant
WinCE 5.0(default), preloaded with .Net CF3.5
7” TFT LCD
800x480
400 cd/m²
DC9V~DC28V
-20℃ ~ +70℃
BE220C USER MANUAL - 10 -
1.3 Mechanical Specifications
1.3.1
Module Specifications
BE220C USER MANUAL - 11 -
2
BE220C Installation & Testing
This chapter provides installation information for BE220C module and it consists of :
2.1 Connect Power
2.2 Connect SD/MMC Card
2.3 Connect Host USB
2.4 Connect LAN
2.5 Connect Wi-Fi
2.6 Connect Communication Bus
2.7 Connect ADC_GPIO Bus
2.8 How to Installation the BE220C on equipment
BE220C USER MANUAL - 12 -
2.1 Connect Power
User may prepare a power adaptor with an output of DC12V/3A and a 2.5φas illustrated.
DC Plug_in φ2.5
BE220C USER MANUAL - 13 -
2.2 Connect a SD/MMC Card
Insert SD/MMC card 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.
WinCE will then detect the SD/MMC Card and appears a storage card icon as follows:
BE220C USER MANUAL - 14 -
2.3 Connect Host USB
Users may connect host USB to any USB1.1 device, for example mouse, keyboard, USB storage, through a mini-USB cable as illustrated.
BE220C USER MANUAL - 15 -
2.4 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.
STEP3:
Select ” DM9ISA1 ” to set up a LAN parameters.
BE220C USER MANUAL - 16 -
STEP4:
Select static IP or DHCP IP as appropriate.
STEP5:
Select Internet Explorer.
STEP6:
Enter URL at the Address box
BE220C USER MANUAL - 17 -
STEP7:
Enter URL at the Address box
BE220C USER MANUAL - 18 -
2.5 Connect Wi-Fi
STEP1:
Screw up the Antenna on BE220C as illustrated.
STEP2:
Click on the network icon as highlighted to enter the wireless setup.
BE220C USER MANUAL - 19 -
STEP3:
Click on ” Wireless Information ” tab to set up wireless parameters
STEP4:
Click on ”Add New…” to add a new wireless connection.
STEP5:
Set up SSID, WEP, IEEE802.1X Authentications parameters as appropriate on BE220C, then click OK.
BE220C USER MANUAL - 20 -
STEP6:
Select the wireless access point, or SSID as appropriate, then click ”Connect” to enable wireless connection of BE220C. The connection status is shown right beneath the
SSID selection box.
STEP7:
Select ” IP Information ” tab and click on “renew” to refresh IP address.
STEP8:
Select “ Internet Explorer ” on desktop.
BE220C USER MANUAL - 21 -
STEP9:
Enter URL address in the ”Address” box
STEP10:
then the browser will surf to the URL as specified.
BE220C USER MANUAL - 22 -
2.6 Connect Communication Bus
2.6.1 Pin Assignment of Communication Bus
1 NC Yellow/Red 21 GND Green/White
2 NC Yellow/Blue 22 GND Blue/White
3 DSPC1 Black 23 DSPC2 White/Red
4 DSPC3 Brown 24 DSPC4 Brown/Black
NC Orange/Green
6
USBDP Red 26 USBDN Red/Black
7
NC Brown/Green 27 GND Orange/White
8
TXD1T Orange 28 RXD1T Orange/Black
9
RTS1T Yellow 29 CTS1T Yellow/Black
10
GND Green/Black
11
TXD2T Blue 31 RXD2T Blue/Black
12
GND
Red/White
Red/Green
13
TXD3T Purple 33 RXD3T Purple/Black
14
GND2 Orange/Blue
15
A-422R+ White 35 A-422R- White/Black
16
17
A-422T+
A-485D+
Pink 36
VDD2 Grey/Black 37
A-422T-
A-485D-
Pink/Black
GND2 Red/Blue
18
19
SS Light 39
GND
SPIMOSI
Purple/White
Purple/Red
Light green/Black
20
SPIMISO Light blue/Black
BE220C USER MANUAL - 23 -
2.6.2 Serial Port Test
BE22C provides 3 sets of RS-232 for serial connection. There is also optional RS-485 or RS-422 interface available as options.
2.6.2.1 Connect Serial Port
1 st
set of RS-232 (Debug Port)(for update only)
Connect 1 st
set of RS-232 on BE220C to DB9-female on PC’s COM port. This RS-232 port is used as debug port only with a signal level of +/-12v.
Pin Assignment of RS-232
RS-232 DB9 Female BE220C
Pin No Pin Name Pin No Pin Name
1 DCD — —
4 DTR — —
5 GND 27 GND
6 DSR — —
9 RI — —
BE220C USER MANUAL - 24 -
2 nd
set of RS-232 (COM3)
Connect 2 nd
set of RS-232 to PC’s COM port. BE220C reserves COM3 port for the 2 of RS-232 and its signal level is at +/-12 v. nd
set
Pin Assignment of RS-232
RS-232 DB9 Female BE220C
Pin No Pin Name Pin No Pin Name
1 DCD — —
4 DTR — —
5 GND 32 GND
6 DSR — —
7 CTS — —
8 RTS — —
9 RI — —
BE220C USER MANUAL - 25 -
3 rd
set of RS-232(COM4)
Connect 3 rd
set of RS-232, which is defaulted to COM4 on BE220C, to DB-9 COM port of PC.
The signal level runs at +/-12v.
Pin assignment of RS-232
RS-232 DB9 Female BE220C
Pin No Pin Name Pin No Pin Name
1 DCD — —
4 DTR — —
5 GND 30 GND
6 DSR — —
7 CTS — —
8 RTS — —
9 RI — —
BE220C USER MANUAL - 26 -
RS-422 (Option)(COM1)
BE220C 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 connect to PC’s COM port for connectivity test.
Pin Assignment of RS-422
Pin No Pin Name
14 VDD2
35 A-422R-
15 A-422R+
16 A-422T+
36 A-422T-
34 GND2
*
Note that either RS-422 or RS-485 can be used at a time.
*
Please connect Pin 14(VDD2) to a voltage of 5 +/- 10% voltage (4.75-5.25v) from external power and Pin 34(GND2) to ground .
RS-485 (Option)(COM1)
BE220C support one set of RS-485 serial interface and defaulted to COM1 port. During connectivity test, it is applicable to use a RS-232 to RS-422/485 converter board to connect to
PC’s COM port.
Pin assignment of RS-485
Pin No Pin Name
14 VDD2
37 GND2
16 A-485D+
36 A-485D-
*
Note that either RS-422 or RS-485 can be used at a time.
*
Please connect Pin 14(VDD2)to a voltage of 5 +/- 10% voltage (4.75-5.25v) from external power and Pin 34(GND2) to ground .
BE220C USER MANUAL - 27 -
2.6.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.
STEP2:
Select PC’s COM port in ”Connect using” box to connect to serial port on BE220C.
Then click OK.
BE220C USER MANUAL - 28 -
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 BE220C.
Select None for ” Flow control ”, then click ” Apply ”, and click ” OK ”.
Bits per second
Flow control
BE220C USER MANUAL - 29 -
BE220C set up procedure:
STEP1:
Select ” My Device ” on BE220C
STEP2:
Select “ Windows ” folder
STEP3:
Run ” SerialPortTest ”
BE220C USER MANUAL - 30 -
STEP4:
” Here is the initial screen of SerialPortTest ”
STEP5:
Select COM port as appropriate. Pull down at Baud Rate ranged between 9600 to
115200 and use the same value at both BE220C and PC end. Then click on “ Open port ” to activate a serial connection.
Serial port select
BaudRate select
Open port
STEP6:
If everything goes right, you will see the pop-up window as follows. Click on OK to proceed.
BE220C USER MANUAL - 31 -
STEP7:
Enter “ text” at Tx ” window and click on” Send Tx ” button.
STEP8:
At PC end, you will see the same text entered echoed back.
STEP9:
Enter some text at PC end and note an echo of the text will appear at RX window at
BE220C end.
BE220C USER MANUAL - 32 -
2.6.3 Device USB installation
BE220C 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.
Pin assignment of Device USB
USB BE220C
Pin No Pin Name Pin No Pin Name
1 VBUS 10 VBUS
4 GND 30 GND
BE220C USER MANUAL - 33 -
2.6.4 Speaker installation
BE220C offers 2 sets of speaker circuits to connect to 8Ω/2W speaker. Connect speakers as illustrated to support audio playback.
1 st
set of Speaker
Pin Assignment of Speaker
Speaker BE220C
Pin No Pin Name Pin No Pin Name
2 nd
set of peaker
Pin Assignment of Speaker
Speaker BE220C
Pin No Pin Name Pin No Pin Name
BE220C USER MANUAL - 34 -
2.7 ADC_GPIO Bus
1 ADCT0 Brown 11 ADCT3 Blue
2 ADCT1 Orange 12 ADCT4 Blue/Black
3 ADCT2 ADCT5 Purple
6 k
14
5 KEY1 Red 15
GND White
KEY6 Purple/Black
KEY7 White/Black
7
KEY3 Red/Black 17
KEY4 Yellow/Black 18
KEY8 Grey
8
9
10
KEY5 Green KEY10 Grey/Black
KEY11 Green/Block 20 KEY12
Light blue/Black
BE220C USER MANUAL - 35 -
BE220C offers 12 general purpose programmable I/O ports (GPIO). Please refer to sample code at chapter 4.4.The typical signal length is around 10 to 15 cm and the rated voltage is as follows
Item Symbol Min Typ Max Unit
High Level Input Voltage VIH 2.3 — 3.6 V
Low Level Input Voltage VIL -0.3
High Level Output Voltage VOH 3.1
Low Level Output Voltage VOL —
Test Procedure:
—
—
—
0.9 V
3.3 V
0.2 V
STEP1:
Select” My Device ” on BE220C.
STEP2:
Select “ Windows ” folder.
BE220C USER MANUAL - 36 -
STEP3:
Run ” GpioTest_220A ”.
STEP4:
Here is the initial screen of ” GpioTest_220A ” and defaulted to test all keys as inputs.
STEP5:
A green light at key stands for a high input signal.
BE220C USER MANUAL - 37 -
STEP6:
To test output, pull down the Input and change the key to output.
STEP7:
While key is defined as OUTPUT as step6, check on red circle to the left of key to generate a high output voltage.
BE220C USER MANUAL - 38 -
2.7.3.1 ADC test set-up
Prior to ADC port testing, connect ADCT0 port as illustrated. Use a Vdd of 3.3 volt and voltage divider to limit maximum ADCT0 to be 1.6 volt ( ADC readout as 4095, 12-bit unsigned ). Then run the ADC test by using test program as BE220C provided. Note that the maximum voltage of
ADCTO should not exceed 1.6 volt.
BE220C USER MANUAL - 39 -
2.7.3.2 ADC test procedure
STEP1:
Select” My Device ”on BE220C
STEP2:
select “ Windows ” folder.
STEP3:
Run “ ADCTest ” program by double-clicking the icon.
BE220C USER MANUAL - 40 -
STEP4:
” ADCTest ” initial screen is as follows:
STEP5:
Click ” Start ” button to start testing ADC.
STEP6:
Adjust variable resistor (VR) and observe the changes in read-out of ADC Port value. Click on “ Stop ” to finish the ADC test.
BE220C USER MANUAL - 41 -
2.8 How to installation the BE220C on equipment
How to installation the BE220C on the users equipment, please refer to the following as illustrated.
STEP1:
The user need to open a frame of window, the dimension is 180.8mm*115.7mm.
BE220C USER MANUAL - 42 -
STEP2:
The Mounting Clip assembled into BE220C according to the direction of the arrow following as illustrated.
STEP3:
The Mounting Clip the screws into the user equipment to fixed BE220C.
BE220C USER MANUAL - 43 -
STEP4:
After assembly finished as illustrated.
(Front view)
(Bottom view)
BE220C USER MANUAL - 44 -
(Side view)
BE220C USER MANUAL - 45 -
3 BE220C Programming Guide
This chapter demonstrates connection from BE220C to PC and how to use software to control serial port, GPIO, ADC, and Backlight. This chapter consists of the following:
3.1 Transfer File Between BE220C and PC
3.2 Programming for BE220C
3.3 Serial Port Function
3.4 GPIO Control
3.5 A/D Converter and Backlight Adjustment
BE220C USER MANUAL - 46 -
3.1 Transfer File Between BEGA220C and PC
3.1.1 Connect PC and BE220C
User may setup the connection between desktop PC and BE220C 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=9e641c34-6f7f-404d-a04bdc09f8141141&displaylang=en&tm , After installation, you need to restart PC.
STEP 2.
Connect desktop PC and BE220C by USB cable. Below picture shows the hardware connection between desktop PC and BE220C for file transfer.
Host USB used for USB 1.1 device, such as mouse, keyboard or USB storage device.
USB cable
BE220C
40 pin external bus
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 pin external bus.
USB connector
Pin No Pin Name
40 pin communication bus of
BE220C
Pin No Pin Name
1 VBUS 10 VBUS
4 GND 30 GND
BE220C USER MANUAL - 47 -
STEP 3.
Power on BE220C and connect BE220C and PC by USB cable. For the first connection, windows system on PC will request the USB device driver of BE220C. Please install
USB driver by following procedures.
(1). Select the advance item on below dialog and click “Next” button.
(2). Click “Browse” button and then select the directory which includes USB device driver file of
BE220C. Click “Next” button.
Directory which includes USB device driver file of BE220C
*The following download URL contains all needed driver for 220C Active Sync/Samsung drivers: http://www.bolymin.com.tw/manual/dnw.rar
BE220C USER MANUAL - 48 -
(3). Click “Continue” button
(4). Click “Finish” button. Now BE220C may connect to PC by ActiveSync.
BE220C USER MANUAL - 49 -
(5). Select “No” and click “Next” button to cancel the synchronization.
BE220C USER MANUAL - 50 -
After connecting PC and BE220C, below screen will display. The green cycle means the connection between PC and BE220C has been built.
Execute ”Explore” program and move into the folder of BE220C, you can transfer files between
PC and BE220C.
Folder of BE220C
BE220C USER MANUAL - 51 -
3.2 Programming for BE220C
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 PC :
eVC 4.0 can be downloaded from http://www.microsoft.com/downloads/details.aspx?FamilyID=1DACDB3D-50D1-41B2-A107-
FA75AE960856&displayLang=en.
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 sp4 version is 4.00.1610.0.
3. Connect BE220C and Desktop PC by procedures in section 3.1.2
4. Install SDK of BE220C 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_INX_SDK_101109_v094.msi
5. The platform setting of embedded Visual C++:
The following picture shows the required setting of eVC 4.0 sp4:
Select SMDK2416 or
BEGA220A platform
Debug or release version
SMDK2416 device or
BEGA220A device
BE220C USER MANUAL - 52 -
3.2.2 Create New Project
In this section, we will describe how to create a new project in eVC 4.0 sp4. 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 sp4.
STEP 2 :
Select “File”-“New…: function.
STEP 3:
Select your application type, setup the location and name of your project and. Please select “WCE MFC AppWizard(exe)” as application type.
Project name
Project location
Application type
Only select “ARMV4I” as CPU type
BE220C USER MANUAL - 53 -
STEP 4:
Select “Dialog based” and “language” setting. Click “Next” button.
STEP 5:
Click “Next” button.
BE220C USER MANUAL - 54 -
STEP 6:
Click “Next” button.
STEP 7:
Click “Finish” button.
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
BE220C USER MANUAL - 55 -
3.3 Serial Port Function
3.3.1 Overview
There are 4 serial ports in BE220C. The following table lists the function of each serial port:
Name
COM1:
Function
RS-422 or RS485 port
Comment
Option
COM3:
COM4:
Used by application program. 2 wire RS-232
Used by application program. 2 wire RS-232
Debug port Internal used. May not open by application program.
BE220C USER MANUAL - 56 -
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
User application should catch this message to get received data
Call Send() function to send data by serial port
Send user defined message to user window
CSerialPort object
Received data
Serial port
BE220C USER MANUAL - 57 -
3.3.2.2 Member function of class CSerialPort
CSerialPort Function:
Constructor function of calss CSerialPort.
Syntax
Parameters
None
CSerialPort();
Return value
None
Open Function:
Open a serial port.
Syntax
BOOL Open(
LPCTSTR port, int baud_rate, 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, ONE5STOPBITS or TWOSTOPBITS.
parity Parity , NOPARITY, ODDPARITY, EVENPARITY.
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
);
Parameters
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,
UINT 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.
Syntax
BOOL Close (
);
Parameters
None
Return value
TRUE: Close serial port successfully.
FALSE: Cloas serial port fail.
BE220C USER MANUAL - 58 -
3.3.2.3 How to catch the receive message
Please apply following steps to catch the receive message.
STEP 1:
Define a receive message in your code as below:
const UINT WM_CMD_OK = WM_USER+1;
STEP 2:
Declare a message processing function in the window that will process receive message.
STEP 3:
Create message mapping.
STEP 4:
Implement the receive message processing function.
BE220C USER MANUAL - 59 -
3.3.3 Example 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.
Data will be sent by selected serial port
Received data
Send data Clear sent data.
Clear received data
Below are the major source codes of the test program:
File: SerialPortDlg.cpp
/////////////////////////////////////////////////////////////////////////////
// CSerialPortDlg dialog
/////////////////////////////////////////////////////////////////////////////
const UINT WM_CMD_OK = WM_USER+1;
BEGIN_MESSAGE_MAP(CSerialPortDlg, CDialog)
//{{AFX_MSG_MAP(CSerialPortDlg)
Define a receive message
ON_WM_DESTROY()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
BE220C USER MANUAL - 60 -
Map the receive message processing function to user defined message.
/////////////////////////////////////////////////////////////////////////////
// CSerialPortDlg message handlers
/////////////////////////////////////////////////////////////////////////////
BOOL CSerialPortDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, FALSE);
// icon
// Set small icon
CenterWindow(GetDesktopWindow()); // center to the hpc screen m_ComboBaud.SetCurSel(5); /* Define BaudRate: 115200 */ m_ComboData.SetCurSel(1); m_ComboParity.SetCurSel(0); m_ComboPort.SetCurSel(0); m_ComboStop.SetCurSel(0);
/* Define data bit: 8 bit */
/* Define parity: none */
/* Define searial port: COM1 */
/* Define stop bit: 1bit */ m_strRecDisp = _T(""); m_cSendBuffer = new char[60];
UpdateData(FALSE);
m_pSerialPort = new CSerialPort();
Create a CSerialPort object and set current window as the window which will process received data.
}
/*******************************************************************************************
Implement function used to process receive data from serial port
********************************************************************************************/
LRESULT CSerialPortDlg::OnCommRecv(WPARAM wParam, LPARAM lParam)
{ buf = (char *)wParam; buflen = (DWORD)lParam;
// memory pointer of received data
// received data length
CEdit *pRecvStrEdit = (CEdit*)GetDlgItem(IDC_REC_DISP);
BE220C USER MANUAL - 61 -
{ for (int i = 0; i < buflen; i++, buf++) tmp.Format(_T("%c"), *buf);
}
pRecvStrEdit->SetWindowText(m_strRecDisp); /* Show */
}
// Initial user interface const CString PorTbl[4] = {_T("COM1:"),_T("COM3:"),_T("COM4:"),_T("COM6:")}; const DWORD BaudTbl[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.
********************************************************************************************/ void CSerialPortDlg::OnOpenCom()
{
UpdateData(TRUE);
DWORD baud = BaudTbl[m_ComboBaud.GetCurSel()];
DWORD databit = DataBitTbl[m_ComboData.GetCurSel()];
BYTE stopbit = StopBitTbl[m_ComboStop.GetCurSel()];
BYTE parity = ParityTbl[m_ComboParity.GetCurSel()];
Open selected serial port by specified parameter values.
BOOL ret = m_pSerialPort->Open(strPort, baud, databit, stopbit, parity);
if (ret == FALSE)
{
MessageBox(_T("Open ") + strPort + _T(" Fail!"));
}
return;
} m_ButOpen.EnableWindow(FALSE); /* Disable "open" button */ m_ButClose.EnableWindow(TRUE); /* Enable "close" button */
MessageBox(_T("Open ") + strPort + _T(" is OK!"));
BE220C USER MANUAL - 62 -
/*******************************************************************************************
Function for “CLOSE” button used to close current serial port.
********************************************************************************************/ void CSerialPortDlg::OnCloseCom()
{
m_pSerialPort->Close();
Close current serial port.
} m_ButClose.EnableWindow(FALSE); /* Disable "close" button */
/*******************************************************************************************
Function for “SEND” button used to send data by serial port.
********************************************************************************************/ void CSerialPortDlg::OnSend()
{
UpdateData(TRUE); for(int i = 0; i < len;i++)
Send data by current serial port.
BOOL status = m_pSerialPort->Send(m_cSendBuffer, len);
}
/*******************************************************************************************
Destory function of serial port test dialog
********************************************************************************************/ void CSerialPortDlg::OnDestroy()
{
CDialog::OnDestroy();
m_pSerialPort->Close();
Close current serial port and delete
CSerialPort object.
}
BE220C USER MANUAL - 63 -
3.4 GPIO Control
3.4.1 How to Control GPIO for BE220C
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. In BEGA220A, there are 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_pGetGPInput)(int); void (*m_pSetGPOutput)(int, BOOL);
BOOL (*m_pIsOutput)(int); void (*m_pSetIOAttribute)(int, BOOL);
Load “pGPIO_220A.dll” and get the address of
GPIO control functions. m_hModule=::LoadLibrary(_T("pGPIO_220A.dll")); m_pGetGPInput = (BOOL (*)(int))::GetProcAddress(m_hModule,_T("GetGPInput")); m_pSetGPOutput = (void (*)(int, BOOL))::GetProcAddress(m_hModule,_T("SetGPOutput")); m_pIsOutput = (BOOL (*)(int))::GetProcAddress(m_hModule,_T("IsOutput")); m_pSetIOAttribute = (void (*)(int, BOOL))::GetProcAddress(m_hModule,_T("SetIOAttribute")); m_pSetIOAttribute(GIO_KEY1, GA_INPUT); m_bPOUT1 = m_pGetGPInput(GIO_KEY1);
Execute GPIO control functions. m_pSetIOAttribute(GIO_KEY1, GA_OUTPUT); if (m_pIsOutput(GIO_KEY1)) m_pSetGPOutput(GIO_KEY1, TRUE);
BE220C USER MANUAL - 64 -
3.4.2 GPIO Control Function for BE220C
GetGPInput 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
);
Parameters
gpio_index The index of specified GPIO. Refer to section 3.4.3 for the value definition.
Return value
TRUE: The specified GPIO is output.
FALSE: The specified GPIO is input.
SetIOAttribute Function:
Set the attribute of the specified GPIO.
Syntax
void SetIOAttribute (
int gpio_index,
BOOL value
);
Parameters
gpio_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
BE220C USER MANUAL - 65 -
3.4.3 Definition of GPIO Index
Class CGPIO_220A support following index values:
GPIO index
GIO_KEY1
Description
User defined general purpose input/output. (KEY1)
GIO_KEY2
GIO_KEY3
GIO_KEY4
GIO_KEY5
GIO_KEY6
GIO_KEY7
GIO_KEY8
GIO_KEY9
User defined general purpose input/output. (KEY2)
User defined general purpose input/output. (KEY3)
User defined general purpose input/output. (KEY4)
User defined general purpose input/output. (KEY5)
User defined general purpose input/output. (KEY6)
User defined general purpose input/output. (KEY7)
User defined general purpose input/output. (KEY8)
User defined general purpose input/output. (KEY9)
GIO_KEY10
GIO_KEY11
GIO_KEY12
GO_BLIGHT_ENABLE
User defined general purpose input/output. (KEY10)
User defined general purpose input/output. (KEY11)
User defined general purpose input/output. (KEY12)
Backlight control. Default value : HIGH.
GO_LCD_POWER_ENABLE LCD power control. Default value : LOW.
GO_AMP_SWITCH Amplifier switch. Default vale: LOW.
GO_EN485 Reserved for internal use.
BE220C USER MANUAL - 66 -
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);
Load “CtrlFunc_220A.dll” and get the address of control functions. 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();
Execute control functions of A/D converter.
Execute control functions of backlight adjustment. m_pSetBrightness(0); // OFF the backlight
FreeLibrary(m_hModule); // free the instance of “CtrlFunc_220A.dll”
BE220C USER MANUAL - 67 -
3.5.2 Control Function of A/D Converter
initADC Function:
A/D converter initialization. User need to call this function before
Syntax
Parameters
None
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 adc_channel
);
Parameters
adc_channel The index of specified A/D converter channel.
ADC_CHANNEL0~ADC_CHANNEL5
Return value
A/D converted data from specified A/D converter channel.
BE220C USER MANUAL - 68 -
3.5.3 Function about Backlight Adjustment
InitBacklightCtrl Function:
Initial backlight controller. User need to call this function before
Syntax
Parameters
None
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.
Syntax
int GetBrightness ();
Parameters
None
Return value
Current brightness value of backlight. (0~100)
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
Return value
Original brightness value of backlight.
BE220C USER MANUAL - 69 -
4 Troubleshooting
Q1. When 220C is connected to a PC via USB for Active Sync (AS- a communication link for file transfer between 220C and PC), 220C does not boot. How to fix the problem?
A1. Solution: Before booting up 220C, make sure the USB connection for AS is disconnected.
Reason:
It is due to the boot loader program mistakenly identify AS device and cause the hang.
The boot-up sequence was incomplete and never got to WinCE boot up sequence.
Q2. Why the program disappears as OS reboot?
A2.
There are two folders available as non-volatile memory, which is partitioned from flash memory. Note that on embedded system, the whole OS is running on 64MB DDR2 SDRAM- meaning most directories seen such as \temp, \windows, \my documents, etc., are all volatile(will be gone after reboot). Only \PocketMory and \PocketMory1 are good for permanent data storage. Click on My Device icon on desktop to bring up the follow screen, select PocketMory, click on File-Property to view folder details. Repeat above steps for PocketMory1.
Click Start-Control-Storage Manager to view partition info.
Cross reference storage and property to know PocketMory and PocketMory1 allocation/free/used space on 2GB flash memory.
BE220C USER MANUAL - 70 -
Q3. When the LAN and Wi-Fi status is active on 220C device and if I pull out the Ethernet cable from RJ45 port, then the Wi-Fi connection would not be available. How to fix this problem?
A3.
When this case occurred, you could first release the IP settings of LAN manually and the
Wi-Fi connection would be available then.
Step 2.
Click ‘Renew’ button to release the previous IP setting of LAN port.
BE220C USER MANUAL - 71 -
<End of BE220C User Manual >
BE220C USER MANUAL - 72 -
Copyright
Copyright © 2010-2012 BOLYMIN, INC. All rights reserved. No part of the materials may be reproduced in any form or by any means without prior written consent of BOLYMIN, INC.
Disclaimer
THE CONTENTS OF THIS DOCUMENT ARE SUBJECT TO CHANGE WITHOUT NOTICE.
BOLYMIN, INC. RESERVES THE RIGHT TO MAKE CHANGES WITHOUT FURTHER NOTICE
TO ANY PRODUCTS HERIN TO IMPROVE RELIABILITY, FUNCTION OR DESIGN. BOLYMIN,
INC. DOES NOT ASSUME ANY LIABILITY ARISING OUT OF THE APPLICATION OR USE OF
ANY PRODUCT OR CIRCUIT DESCRIBED HERIN; NEITHER DOSE IT CONVEY ANY
LICENSE UNDER ITS PATENT RIGHTS, NOR THE RIGHTS OF OTHERS. CUSTOMERS ARE
ADVISED TO CONSULT WITH BOLYMIN, INC. OR ITS COMMERCIAL DISTRIBUTORS
BEFORE ORDERING.
BOLYMIN, INC.
5F, 38 Keya Road, Daya Dist., 42881 Taichung City, Taiwan, R.O.C.
WEB SITE: http://www.bolymin.com.tw
TEL: +886-4-2565-8689
FAX: +886-4-2565-8698
BE220C USER MANUAL - 73 -

Public link updated
The public link to your chat has been updated.
Advertisement