Top Banner
STONE HMI -professional solution provider of embedded touch control computer STeWin7000 REV:110301 User manual
58

-professional solution provider of embedded touch control ...

May 06, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: -professional solution provider of embedded touch control ...

STONE HMI

-professional solution provider of embedded touch control computer

STeWin7000

REV:110301

User manual

Page 2: -professional solution provider of embedded touch control ...

Contests

Chapter 1 Comprehensive description of STeWin7000 . . . . . ... .. ... ... ... ... ... .. ... ... ... ... .. ... ... ... ... ... .. . - 4 -

1.1 Characteristic of product - 4 -

1.2 Specification and performance parameter...................................................................... - 7 -

1.3 Dimensions..................................................................................................................... - 8 -

Chapter 2 System configuration of...................................................................STeWin7000 - 10 -

2.1 Appearance introduction .............................................................................................. - 10 -

2.2 interface introduction .............................................................................................. ..... - 11 -

Chapter 3 Function and setting ........... ... .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. .. - 12 -

3.1 Audio output ................................................................................................................ - 12 -

3.2 USB interface............................................................................................................... - 12 -

3.3 SD card...................................................................... ................................................... - 13 -

3.4 Backlight adjustment.................................................................................................... - 13 -

3.5 Screen rotate............................................ ..................................................................... - 14 -

3.6 Serial port setting ......................................................................................................... - 14 -

3.7 Using of touch screen................................................................................................... - 16 -

3.8Application switching ................................................................................................... - 17 -

3.9Time and dates setting................................................................................................... - 17 -

3.10 Using of I/O port ...................................................................................................... .. - 18 -

3.11 Encryption program ................................................................................................... - 19 -

3.12 FRAM ................................................................................................................... ..... - 19 -

3.13 Watchdog ............................................................................................................... .... - 19 -

Chapter 4 ActiveSync ............ ... .. .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. ... . . .. .. .. .. ... .. .. .. .. .. - 21 -

4.1 Installing Microsoft ActiveSync .................................................................................. - 21 -

4.2 building connection.......................................................................... ............................ - 21 -

4.3 File management .......................................................................................................... - 23 -

STeWin7000

Page 3: -professional solution provider of embedded touch control ...

Chapter 5 Development of application....................................................................................... - 26 -

5.1 Setting up EVC ............................................................................................................ - 26 -

5.2Installing sdk ................................................................................................................. - 32 -

5.3Creating and compiling application .............................................................................. - 37 -

5.3.1Creating a new project ....................................................................................... - 37 -

5.3.2Assoc ia te d with SDK ............ .. .. .. .. .. ... .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. ... .. .. .. .. .. ... .. . - 41 -

5.3.3Connection setup:............................................................................................... - 42 -

5.3.4 Compile and download...................................................................................... - 44 -

Chapter 6 Development with VS2005 ....................................................................................... - 46 -

6.1Setting up VS2005 ........................................................................................................ - 46 -

6.2 Example of ―Hello World‖(VB) .................................................................................. - 46 -

6.3 Example of ―Hello World‖(VC) .................................................................................. - 50 -

Chapter 7 Update logo ............................................................................................................... - 52 -

Chapter 8 Update system ........................................................................................................... - 54 -

Chapter 9 How to run compiled application automatically........................................................ - 55 -

Appendix API ............ .. .. ... .. .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. ... .. .. .. .. .. ... .. .. .. .. .. ... .. .. . - 56 -

Postscript................................................................................................................................. ... - 58 -

- 3 -

Page 4: -professional solution provider of embedded touch control ...

Chapter 1 Comprehensive description of STeWin7000

STeWin7000 is equipped with Microsoft Windows CE Embedded, a stable operating system

used in many industrial touch screen applications. The processor is 32-bit RISC(ARM920T

Core).We have been a member of Windows Embedded Partner Program.

So the products are all pre-installed genuine Windows CE system.

The eWin7000 is possible to switch between different assignments. It combines a graphic

display and touch interface with a high efficiency industrial controller. Coordinating with MCU

perfectly through serial port,eWin7000 is suitable to industrial control, medical device, test

monitoring, intelligent device, smart home, mobile or automotive systems, etc.

Configuration is usually used in man-machine interface, but this pattern is easy to operate and

restricted in application. Windows CE supports applications developed in Microsoft Visual Studio

2005 and EVC. The managed code can be generated in Visual BASIC, C#, VC++. Users can

design man-machine interface and transplant it to other ARM operating systems equipped with

Microsoft Windows CE Embedded.

STeWin7000 supports the .NET Compact Framework 2.0 which simplify development and

testing time.

1.1 Characteristic of product

Hardware Specification

Ultra-high integration, complete Embedded structure and user-friendly on-site fixed.

USB HOST、USB DVICE、100M LAN、SD card, etc.

32-bit RISC ARM chip, ARM920T core, frequency is 400MHz.

SDRAM : 64MB ,NAND FLASH: 128M.

7-inch digital TFT screen(16:9), 800 × 480 resolution, LED backlight.

Four-wire resistive touch screen.

Two standard RS232 , one RS232/RS485 switchable , coordinating with PC ,MCU, PIC, AVR, DSP, etc.

- 4 -

Page 5: -professional solution provider of embedded touch control ...

Internal mono spaker ,external stereo jack.

four input ports and five output ports (driving voltage is 3.3V), serial port and all the other

interface have antistatic design by adding TVS.

Power :9V~28V.

Operating temperature: -20 ℃ ~ +70 ℃ ,Storage temperature: -30 ℃

~+85℃,Operating humidity: 45% ~80%RH.

The screens have been passed the certification of CE, FCC, ROHS and temperatures.

Software Specification

Genuine edition WINDOWS CE5.0 CORE operating system is pre-installed and the starting time is less than 12 seconds. After the system starts, the remaining capacity of SDRAM is up to 60M.

The memory space can be adjusted between program memory and storage memory.

Data would be not lost after power down.

EVC / VS2005 software and MFC.

ActiveSync software, code debugging through USB port.

Supporting for preservation of the registry, time and date under power-down situation.

Applications can run automatically when STeWin7000 turn on by modifying the registry.

SD card can be modified the power-on image and upgrade OS and etc. It can support up to

8GB.

SD card can store softwares, multimedia files and the data.

Supporting for API functions, such as backlight control, volume adjustment, screen rotation,

time control, etc.

Backlight and sound can be adjusted through parameter.

Users can switch between system and application by switch.

Offering fully functional SDK code and API functions.

Offer free source code for simple utility.

Watchdog can prevent system down.

FRAM, stored data and frequent data read and write, read and write speed is equivalent to RAM.

- 5 -

Page 6: -professional solution provider of embedded touch control ...

Nandflash format TFAT, to avoid accidents during the operation file corruption caused by

power failure

Offering method of encryption to make your program security.

Offer UI design and part of ICON components freely.

- 6 -

Page 7: -professional solution provider of embedded touch control ...

1.2 Specification and performance parameter

Name STeWin7000

Size 7-inch(152.4X91.44)

Resolution 800X480

Brightness 300

Contrast 400:1

Backlight LED(adjus ta ble) life:30000h

Touch screen four-wire resistive,1000000/point

Operating temperature -20℃~ +70℃(certified)

Passed certification CE,FCC,RO H S and temperature

System parameters

Operating system Genuine edition WINDOWS CE5.0Core Chinese/English

Basic frequency 400MHz

Processor SAMSU N G S3C2440-40

Internal memory 64MB SDRAM

Memory 128MB NAND Flash

Storage U-Disk ; SD card

Software compilation ARMV4I

method

Interface parameter

Serial RS232(2);RS485(1)

Serial frequency Setted up through software

SD card Up to 8GB (supporting for upgrading OS,boot logo,data storage)

USB HOST USB Host1.1 Connect to U-Disk, USB mice, keyboards

USB DVICE Connect to computer for USB1.1 device access over ActiveS ync

Network 100M, network debugging, data transmission

Audio Stereo headphone output, speaker

Power 9V~28V(12V 130~400mA)

Expansion function WIFI、GPS、GPRS、Bluetooth、Watchdog

Universa l digita l IO Input(4) ,output(5)

Dimensions

Mounting type Embedded installation shell

Safety performance of Waterproof, shakeproof

IP65

Size of front panel 202mmX 148m m

Size of mounting hole 190mmX 138m m

- 7 -

Page 8: -professional solution provider of embedded touch control ...

1.3 Dimensions

Installation size of STeWin7000 Unit: mm

Picture1-1

Picture1-2

- 8 -

Page 9: -professional solution provider of embedded touch control ...

Picture1-3

Picture1-4

- 9 -

Page 10: -professional solution provider of embedded touch control ...

Chapter 2 System configuration of STeWin7000

2.1 Appearance introduction

Picture2-1

- 10 -

Page 11: -professional solution provider of embedded touch control ...

2.2 interface introduction

1、Power: DC 9V~28V 2、LAN: connect to PC with crossover Ethernet cable 3、USB interface: U-Disk (up to 2G), USB mice, USB

keyboards 4、SD card: up to 8G

5、Serial:RS232 and RS485

STeWin7000 can be a displayable terminal control device and connected to subordinate

computer (mcu) through RS232.

STeWin7000 Rs232

MCU

Data

sampling, I/O

control, Bus

control Other

control

operation

Picture2-2

STeWin7000

Serial Rs232

module GPS

module

etc

Picture 2-3

The advantage of separating display interface from control system is making the systems

independent and upgrading conveniently.

6、Audio output port: connect to Stereo headphone output or speaker

- 11 -

Page 12: -professional solution provider of embedded touch control ...

Chapter 3 Function and setting

Connect the STeWin7000 to a power source (12V) and always check the polarity of the

terminals before connecting them to the power source.

After connecting the power and a short period of starting, Windows CE operating system will

run. Using the Windows CE is similar to using the regular Windows operating system. As is

shown in the picture:

Picture3-1

3.1 Audio output

STeWin7000 has a single-channel speaker ins ide. For stereo, headphone or outside speaker

can be connected to 3.5mm audio jack. Double clicking the icon which is volume and sound

control can change the volume.

3.2 USB interface

STeWin7000 has one USB Host port and one USB Device port. USB Host port can be used

to connect to USB mice, keyboards and Flash driver. Using more than one USB device at a time

- 12 -

Page 13: -professional solution provider of embedded touch control ...

will require the use of an external USB hub. The USB Device port is used to connect to a

computer for device access over ActiveSync. Please refer to the ActiveSync section.

3.3 SD card

STeWin7000 SD memory slot supports cards up to 8G in capacity.

SD Flash memory can be used in the following ways:

1、 Images, sounds, log files storage;

2、 Convenient storage for large programs;

3、 Changing the logo conveniently;

4、 System renewal and upgrading.

3.4 Backlight adjustment

The display settings let you control the backlight. Backlight provides a screen saving function.

The backlight can be automatically turned off when the device is no longer used to lengthen the

device life. We offer two methods:

Method one: programs can use the API to adjust the backlight, API is referred to

in appendix1.Recommended only switch (100 / 0) two states. Eg:Test_All.exe

Picture3-2

The backlight can be changed through changing ―Backlight Test‖ in the picture.

Method two: Please go to ―My Device‖ - ―Control Panel‖ -―Display‖-―Backlight‖ ,To set the - 13 -

Page 14: -professional solution provider of embedded touch control ...

time to automatically turn off, tick the check box ―External power,and device is idle for

more than‖ and set the time to elapse by inputting a number in the edit box.

as shown in the Figure below.

Picture3-3

3.5 Screen rotate

The screen can be rotated to different angles through clicking ―Rotate screen‖. Program

controlled by API, API is referred to in appendix1.

3.6 Serial port setting

1、STeWin7000 have three serial resource,com3 which is one of them can be used either as

RS232 or RS485 by setting the RS232/485 conversion switch properly in the program ―485‖.

2、the serial setting is as follows:

1)COM1 has two serial ports which are com1 and com2.com1 use 2-pin,3-pin,5-pin;com2

use 1-pin,6-pin,5-pin,as shown in the following table3-1.

- 14 -

Page 15: -professional solution provider of embedded touch control ...

The following is the definition for the STeWin7000

table3-1

Pin number Function Abbrevia tion Serial number

2 Transmitted TXD com1

3 Received RXD com1

7 Request To Send RTSOUT com1

8 Clear To Send CTSIN com1

1 Transmitted TXD com2

6 Received RXD com2

5 Common GND

A converter port should be prepared if using com2.The sequence is as following:

table3-2

com pin Converter

1 2

6 3

5 5

2)The interface of equipment is marked with ―COM2‖ provides com3 and 485. com3 use 2-

pin,3-pin,5-pin.

3)Because of half-duplex,485 can only send data when select ―send‖ and only receive data

when select ―receive‖.485 connects to 1and 6 pin of com3.1-A; 6-B

Note: API is referred to in appendix.

Corresponding views is as follows:

- 15 -

Page 16: -professional solution provider of embedded touch control ...

Picture3-4

3.7 Using of touch screen

The using of touch screen is similar to operating on a PC with mouse.Clicking on icon is

equivalent to click the left button of mouse. If you want to determine the action the user right-

clicks, you can SHRecognizeGesture function to complete.A long press on icon is equivalent to

click the right button of mouse. Long pressing on icon will appear a pop-down menu, which can

copy, delete, rename and view attribute.As shown below:

Picture3-5

- 16 -

Page 17: -professional solution provider of embedded touch control ...

Touchscreen Calibration ,You can calibrate the touchscreen through‖My Device-Control

Panel-Stylus-Calibration-Recalibration‖,Carefully press briefly hold stylus on the target .Repeats

as the target moves five times around the screen. Click anywhere on the screen back to the system

interface.

3.8Application switching

If not less than two applications are running at the same time and you want to switching

quickly between them, you can use ―queue of running program‖ icon at the button of right side. As

shown below:

Picture3-6

3.9Time and dates setting

It is recommended that the time and dates be intercalated before you use it. The method is

shown below:

1、 Double-clicking the icon ―time and date‖ at bottom of the right side,or entering ―control

panel‖→ ―date/time‖;

2、 In the dialog ―data/time‖, the current date and time can be intercalated accurately.

3、 After intercalating the date and time,users should click ―apply‖ button and the time and

date at the bottom of right side are changed,then click ―OK‖.As shown below:

- 17 -

Page 18: -professional solution provider of embedded touch control ...

Picture3-7

3.10 Using of I/O port

Note: Average voltage of I/O port is 3.3V.

The interface signed ―JTAG‖ is I/O port at back of the board, I/O port has five output ports

and four input ports. Pin Definition and API ,please refer to Appendix 1. JTAG-20 is GND

Picture3-8

- 18 -

Page 19: -professional solution provider of embedded touch control ...

3.11 Encryption program

We provide an encryption method for the program, and each device has unique IMEI, randomly

generated, can not be changed, make the product more secure. Eg:Test_All.exe。Program starts at

the beginning, through a function to read the machine IMEI, and compare the serial number, If not

the same, indicating that the unauthorized use of your program, you can stop the running

programs. API is referred to in appendix1.

Picture3-9

3.12 FRAM

eWin7000 device provides a FRAM,64Kbit. Frequent reading and writing data stored by FRAM,

in order to reduce the frequency of nandflash operation, thereby reducing the risk of system failure.

API is referred to in appendix1.

3.13 Watchdog

You can create a software watchdog to monitor the operation, when the program is

not running properly, the watchdog will automatically restart the system. At system startup,

the watchdog is disabled by default, enable the watchdog program flow is as follows:

1. Set the Watchdog Timer timeout , the time is equal to 10s,20s, maximum is 40s

- 19 -

Page 20: -professional solution provider of embedded touch control ...

2. Enable the watchdog

3. Feed the watchdog , within the time set out in the need to feed the dog, otherwise it will

restart the system

If the watchdog is enabled, you can also disable the watchdog, API is referred to in

appendix1.

- 20 -

Page 21: -professional solution provider of embedded touch control ...

Chapter 4 ActiveSync

Microsoft ActiveSync is a synchronization software that enables data exchange between a

device that runs on Microsoft’s Windows CE and a PC. It is convenient to transfer files or develop

and debug application. It is a basic software for a PC to communicate with mobile devices.

4.1 Installing Microsoft ActiveSync

Double-click the Microsoft ActiveSync installation file in CD, click ―Next‖ and follow the

prompts.

Note: Do not connect USB DEVICE to the board before install ActiveSync.

4.2 building connection

1、Connect the device port to USB port on PC with ActiveSync installed.When the connection is

established, ActiveSync will ask to set up a partnership. As is shown in the picture:

Pictur4-1

- 21 -

Page 22: -professional solution provider of embedded touch control ...

Select ―No‖ and click ―Next‖. 2、ActiveSync should connect to the STeWin7000 and display the following window:

Picture4-2

3、 If the connection is established, the taskbar of PC will display the following icon . The color is green: the connection is successfully

made. The color is gray: disconnected.

If one runs ActiveSync for the first time, after installation, it is displaying the disconnected

states. If ActiveSync does not automatically connect, click―connection settings‖ from ―file‖. It will

display the following dialog:

Picture4-3

- 22 -

Page 23: -professional solution provider of embedded touch control ...

Recommended setting: Delete the hook-like mark in front of ―allow connections to one of the

following:‖, then click ―OK‖ and finish the installation.

Picture4-4

Now connect USB DEVICE port of STeWin7000 to USB port of PC with installed

ActiveSync. If the connection is the first time, PC will identify it as a new hardware, Just by

installing the wizard, ActiveSync installation directory to find X: \ Program Files \ Microsoft

ActiveSync \ Drivers automatically generated driver can be installed, or CD-ROM with the

povided usb drive, find, can be installed..

4.3 File management

When the connection is successfully made, users can copy and transfer files between

STeWin7000 and PC through ActiveSync. 1、 Click the ―Explore‖ button.

- 23 -

Page 24: -professional solution provider of embedded touch control ...

Picture4-5

2、 When you press ―Explore‖ button, you will see STeWin7000’s file folders as shown below:

Picture4-6

The users can operate the files through drag-dropping icon with mice.

- 24 -

Page 25: -professional solution provider of embedded touch control ...

Eg:in this way, users can transfer the MP3 files on PC to the memory and storage card of

STeWin7000. 3、 Double-clicking the icon, you can only see the attribute of files ,but can not open and operate the program.

- 25 -

Page 26: -professional solution provider of embedded touch control ...

Chapter 5 Development of application

Development of application has two steps, the first step is developing and compiling

application on development environment of PC; the second step is downloading it to

STeWin7000.Users can run and debug the program before the connection between STeWin7000

and PC made successfully.

STeWin7000 can execute Windows CE5.0 applications developed with EVC and Visual

Studio 2005.This chapter is a guide to develop application with EVC.

5.1 Setting up EVC

Step1:Enter installation catalog of EVC, and double-click ―setup.exe‖. The installation will start.

Picture5-1

- 26 -

Page 27: -professional solution provider of embedded touch control ...

Picture5-2 Step2:Click ―Next‖

Picture5-3

- 27 -

Page 28: -professional solution provider of embedded touch control ...

Step3:Accept installation agreement, then click ―Next‖

Picture5-4 Step4:Enter the ID number and click ―Next‖

Picture5-5 Step5:Select the list of files to be installed and the fault is ―select all‖, and then click ―Next‖

- 28 -

Page 29: -professional solution provider of embedded touch control ...

Picture5-6

Step6:Create an installation directory, defaults, and then click ―Next‖

Picture5-7 Step7:Display the prompting message and click ―Yes‖

- 29 -

Page 30: -professional solution provider of embedded touch control ...

Picture5-8 Step8:Prepare to install and go to next step automatically after a short time

Picture5-9

Step9:Set up Windows CE platform manager automatically and then go to next step automatically

Picture5-10 Step10:Set up successfully, click ―OK‖ and go to next step

Picture5-11

Step11:Prepare to set up EVC, and then go to next step automatically

- 30 -

Page 31: -professional solution provider of embedded touch control ...

Picture5-12

Step12:Click ―continue‖

Picture5-13 Step13:Confirm ID number, click ―OK‖ and then go to the next step automatically

Picture5-15 Step14:Select the content to be setted up, default is select all, then click ―Continue‖ and go to the next step automatically

- 31 -

Page 32: -professional solution provider of embedded touch control ...

Picture5-16 Step15:Installation

would be completed automatically, confirm dialog will display, and then click ―OK‖

Picture5-18

5.2Installing sdk

SDK lies in CD\development software\sdk 1、 Double-click and run ce50_2440a_SDK. A dialog displays as following:

- 32 -

Page 33: -professional solution provider of embedded touch control ...

Picture5-19

Picture5-20

2、 Click ―accept‖ and ―Next‖

- 33 -

Page 34: -professional solution provider of embedded touch control ...

Picture5-21

3、 Enter your customer information and click ―Next‖

Picture5-22

4、 Click ―Complete‖ from dialog ―Choose Setup type‖

- 34 -

Page 35: -professional solution provider of embedded touch control ...

Picture5-

23 5、 Select catalog to be installed and click ―Next‖

Picture5-24 6、 Click ―Install‖

- 35 -

Page 36: -professional solution provider of embedded touch control ...

Picture5-

25 7、 Installing ce50_2440a_SDK,as shown below:

Picture5-

26 8、 Click ―finish‖ and complete the installation

- 36 -

Page 37: -professional solution provider of embedded touch control ...

Picture5-27

5.3Creating and compiling application

5.3.1Creating a new project 1、Run Embedded Visual C++4.0 and create a new project. Click ―New‖ from ―File‖, as shown

below:

Picture5-28

2、Click ―Project‖ from ―New‖ and select ―WCE MFC AppWizard(exe)‖,then fill in project name

- 37 -

Page 38: -professional solution provider of embedded touch control ...

and location. Select ―Win32(WCE ARMV4I)‖ and click ―OK‖

Picture5-29

3、 Select ―English‖ in language setting, default other settings. Click ―Next‖.

Picture5-30

4、 Maintain the default value and click ―Next‖

- 38 -

Page 39: -professional solution provider of embedded touch control ...

Picture5-

31 5、 Maintain the default value and click ―Next‖

Picture5-

32 6、 Maintain the default value and click ―Finish‖

- 39 -

Page 40: -professional solution provider of embedded touch control ...

Picture5-33 The result is shown below:

- 40 -

Page 41: -professional solution provider of embedded touch control ...

Picture5-34

Picture5-35

5.3.2Associated with SDK

Select ce50_2440a_test as platform

Picture5-36

- 41 -

Page 42: -professional solution provider of embedded touch control ...

5.3.3Connection setup:

Picture5-37

Single-click

Picture5-38

- 42 -

Page 43: -professional solution provider of embedded touch control ...

Picture5-39 Click ―Test‖ and test the connection

Picture5-40 A successful connection will produce a dialog as below. Click ―OK‖

- 43 -

Page 44: -professional solution provider of embedded touch control ...

Picture5-41

5.3.4 Compile and download

1、Select ―Rebuild All‖ from ―Build‖, as shown below:

Picture5-42

Now the system will compile your project. 2、If compiling is successfully made, it will have a automatically process to download. USB line

should be connected and the connection to PC is

successfully made through Microsoft ActiveSyne before downloading. If

the process is successful, a dialog will display as below:

- 44 -

Page 45: -professional solution provider of embedded touch control ...

Picture5-43

3 、 ―Finished downloading‖ illustrates that now application has been downloaded to STeWin7000.Open ―My device‖ from WinCE. The application named ―test‖ has been in it.

- 45 -

Page 46: -professional solution provider of embedded touch control ...

Chapter 6 Development with VS2005 Developing application with VS2005, users can download and run application on STeWin7000.

6.1Setting up VS2005

The full name of ―VS2005‖ is Microsoft Visual Studio 2005, users can read details on Microsoft

website.

6.2 Example of “Hello World”(VB)

1、Run ―Microsoft Visual Studio 2005‖

Picture6-1

2、Choose ―New Project‖ from the file menu.

Picture6-2

3 、 Select ―Windows CE5.0‖ and ―Windows Application‖. Type the name of

project(―TestProgram1‖ in this example) and click ―OK‖.

- 46 -

Page 47: -professional solution provider of embedded touch control ...

4、A new blank project is created as shown below.

Picture6-3

5、Drag a button control from the toolbox to the middle of Form1.

Picture6-4 6、Select the new button. Change the text attribution from ―Button1‖ to ―Hello‖.

- 47 -

Page 48: -professional solution provider of embedded touch control ...

Picture6-5 7、 Double-click the ―Hello‖ button. Visual Studio will open a window to edit the

code that handles ―Hello‖ button click events. Type ―MsgBox(―Hello!!!‖)‖

Picture6-6 8、Set the target device

In the Solution Explorer, select the top-level item. Select ―Target Device‖ and a list of

possible devices will be displayed. Choose WindowsCE5.0.

- 48 -

Page 49: -professional solution provider of embedded touch control ...

Picture6-7 9、 Click the Start Debugging icon as indicated below. This will build and publish the program in debugging mode.

Picture6-8 10、 After a short delay, the program is transferred to STeWin7000 and executed(assuming a working ActiveSync connection).

- 49 -

Page 50: -professional solution provider of embedded touch control ...

If the program has not error, dialog will display at the bottom. After a short delay,

application interface will display on the screen of STeWin7000.

Picture6-9

6.3 Example of “Hello World”(VC)

1、Click File-New Project on the menu bar. 2、Choose ―Smart Device‖ in the ―Project types‖ box. Then choose ―MFC Smart Device

Application‖ from the ―Templates‖ box. Type the desired name in the ―Name‖ box.

Picture6-10

- 50 -

Page 51: -professional solution provider of embedded touch control ...

3、Click ―OK‖. The Application Wizard will be displayed as below.

Picture6-11

After the Application Wizard completes, a framework application will be created for MFC application development. Note: When you use VC + +, you must select the sdk we provide--smdk2440a_SDK.msi.

- 51 -

Page 52: -professional solution provider of embedded touch control ...

Chapter 7 Update logo

The boot time STeWin7000s is 12s.During this time users can set up a boot logo. A progress

bar shows the booting process.

Ⅰ)Design demand of boot logo

The bit resolution of boot logo is 24.The extension name of the renewal picture should be

modified to BMP. The resolution of the picture is 800X480.The position of progress bar is

fixed(we can offer individual customization in special condition. For the aesthetic the boot logo

must reserve the position of progress bar. Ⅱ)Position of progress bar

Centered point(X=216 Y=363) as origin ,the position of progress bar is from (216,363) to

(600,381).The length is 384 and the height is 18.As shown below:

Picture7-1

- 52 -

Page 53: -professional solution provider of embedded touch control ...

Picture7-2 Ⅲ)Steps of modifying boot logo 1、 Saving the picture as boot logo to root directory of SD card( not more than 2G )and renaming

picture to ―logo.bmp‖.

2、 Connecting 19 and 20pin of the interface marked with ―JTAG‖ with jumper cap. 3、 Insert the card to STeWin7000, then power on and start. After the new root logo display and

then power off. Remove the SD card after prompt.

4、 Remove the jumper cap. 5、 Power on again and then the new boot logo will display. The renewal has been completed.

- 53 -

Page 54: -professional solution provider of embedded touch control ...

Chapter 8 Update system 1、 Put xip.bin in the root directory of SD card(not more than 2G). 2、 Connecting 19 and 20pin of the interface marked with ―JTAG‖ with jumper cap. 3、 Insert the card to STeWin7000 and then power on. A reminder ―Read xip.bin from sd

card…‖ , ―Format nand flashand…‖ ―Write xip.bin to nand flash…‖ will display at the upper-left

of LCD. After one minute WinCE system will start and the renewal has been completed. 4、 Remove the jumper cap and SD card. Power on again and enter WinCE desktop or user’s

application.

Note: After renew the WinCE system, resident Flash of previous system has been formatted.

Starting system for the first time needs two minutes. After that, the time of starting system only

needs less than 12 seconds.

- 54 -

Page 55: -professional solution provider of embedded touch control ...

Chapter 9 How to run compiled application automatically Ⅰ) How to run compiled application

automatically Method 1:

1、 Copy users’ application to GUI file in resident Flash root directory.Rename users’

application to ―GUIsample.exe‖.( Resident Flash/ GUI/ GUIsample.exe)

2、 The system will enter users’ application interface instead of WinCE desktop when power

on.

Note: Make sure the two pins JTAG19,20 be not

connected. Method2: 1、 Copy users’ application to GUI file in SD card root directory and rename application to

GUIsample.exe.

2、 Run program ―Install.exe‖. The function of ―Install.exe‖ is copying GUI file(all the files) in

SD card root directory to Resident Flash.

3、 The system will enter users’ application interface instead of WinCE desktop when power on. Ⅱ) Exit to system in application

After setting auto start the application ,it will enter users’ application interface instead of

WinCE desktop when power on. If you want to exit to system ,you have to add ―Exit‖ in your

application with the function

―Create Process‖(L‖explorer.exe‖,NULL,NULL,NULL,NULL,NULL,0,0,0,NULL);‖

If you want to enter system desktop without adding the ―Exit‖ button, there are two situations: a) Entering system desktop when the application is running;

b) Entering WinCE desktop instead of users’ application interface when power on.

Solution:

Situation 1:After application is running when power on, Connect the two pins

JTAG19,20 Situation 2: Firstly connect the two pins JTAG19,20 and then power on.

- 55 -

Page 56: -professional solution provider of embedded touch control ...

Appendix API

type Device PIN name Function name Description

I/O JTAG-3 Digital output1 bool set_level:

contr set_digital_output(int set_level,int PORT_NO=0) 0—low,1---high

ol JTAG-5 Digital output 2 bool set_level:

set_digital_output(int set_level,int PORT_NO=1) 0—low,1---high

JTAG-7 Digital output 3 bool set_level:

set_digital_output(int set_level,int PORT_NO=2) 0—low,1---high

JTAG-9 Digital output 4 bool set_level:

set_digital_output(int set_level,int PORT_NO=3) 0—low,1---high

JTAG-11 Digital output 5 bool set_level:

set_digital_output(int set_level,int PORT_NO=4) 0—low,1---high

JTAG-13 Digital input 1 bool *port_level:

read_digital_input(int*port_level,int port_NO=0) 0—low,1---high

JTAG-15 Digital input 2 bool *port_level:

read_digital_input(int*port_level,int port_NO=1) 0—low,1---high

JTAG-17 Digital input 3 bool *port_level:

read_digital_input(int*port_level,int port_NO=2) 0—low,1---high

JTAG-19 Digital input 4 bool *port_level:

read_digital_input(int*port_level,int port_NO=3) 0—low,1---high

setup no rotate bool mode:

rotate_screen(int mode) 0-normal,1-90°

2-180°,3-270°

UART2 bool mode:

Output mode UART_mode_select(int mode) 1-UART2:485output

0-UART2:232output

485switc hm ode bool mode:

mode_485_select(int mode) 0-send,1-receive

no Backlight bool percent_value:~100

brightnes s set_brightness (int percent_value) Note:effective value is

0,10,20,30… 100,

0 is turn off backlight

FRA no FRAM BOOL SalAddr –Slave address

M

Read

Addr -- FRAM address

ReadFRAM(UINT8 SalAddr,UINT16

Addr,UINT8 *pBuf)

pBuf -- buffer

no FRAM BOOL SalAddr –Slave address

Write

Addr -- FRAM address

WriteFRAM(UINT8 SalAddr,UINT16

pBuf -- buffer

Addr,UINT8 *pBuf)

- 56 -

STeWin7000

Page 57: -professional solution provider of embedded touch control ...

WDT Enable watchdog EnableWdt(void)

Software Disable watchdog DisableWdt(void)

Watchdog

Set the Watchdog SetWdtTimeOut(UINT8 Sec) Sec -- seconds, Maximum of

40 seconds

Timer timeout

Feed the watchdog FeedWdt(void)

IMEI Encryption Read IMEI ReadIMEI(UINT8 *pBuf) pBuf – the length is 16 bytes

Software

Reserved Buzzer alarm Beep(DWORD dwDelay) dwDelay -- millisecond

PWM Reserved Set PWM divide SetPWMDiv(UINT8 Div) Div -- the number is 2,4,8,16

Note: You can only choose

one, the system defaults to 2

Start PWM StartPWM(UINT32 Cntb,UINT32 Cmpb) The PWMFrequency=

PWM_CLK/Div/Cntb (Hz)

Duty cycle = (Cmpb / Cntb) *

100%

Note: to the PWM's

PWM_CLK = 200000Hz, Div

for the SetPWMDiv (UINT8

Div) values in the Div

Stop PWM BOOL StopPWM(void)

Get the current PWM DWORD GetPWMFrequency(void)

operating frequency

ADC Reserved Read the ADC UINT16 ReadADC(UINT8 ch) Ch -- Channel number

conversion value of ,the number is 0,1,2,3

the specified channel

Get the current ADC DWORD GetADCFrequency(void)

operating frequency

*Note: The orange writing to preserve function, not yet provide the hardware interface

and instructions

Header file: api_head.h

Library file: HDI_API.lib

If dynamic library would be used, users need to build GUI sub-directory in resident Flash and

copy your files to residentflash\GUI

- 57 -

Page 58: -professional solution provider of embedded touch control ...

Contact Us

Beijing Shuangying Ocean Technology Co.,Ltd

Address: 2807 Floor 28, Building B, Shiao International Center, Shaoyaoju North Road

101#,Chaoyang District,Beijing, China.

Post Code:100029

Tel:86-010-84351669

Fax:86-010-84361668

E-mail:[email protected]