1.20M

Develop VB in WinCE

1.

Develop VB in WinCE
Maker : Axel Chou

2.

Introduction to WinCE 3.0
One of the Microsoft Embedded System
– WinCE 3.0
– Embedded NT 4.0
Customize : Minimize the system cost
Flexibility : 200 modules for use
Language : Unicode
API : Only for 32-bit

3.

WinCE 3.0 Hardware Support
CPU
– ARM / Strong ARM
– x86
– MIPS
– PPC
– SH3/4
Others : ISA, PCI, CF, PCMCIA, USB….

4.

WinCE Develop Tools
Platform Builder 3.0
– Build a platform for a device
– Can export SDK
eMbedded Visual Tools
– Develop AP for a built platform
– Need a certain SDK
– Free

5.

Microsoft eMbedded Visual Tools
Microsoft eMbedded Visual C++ 3.0
– Executable file ( .exe)
Microsoft eMbedded Visual Basic 3.0
– .vb file , need pvbload.exe to execute

6.

Create a VB Program in TPC-642
Host PC :




PIII 600
128M RAM
NT4.0 SP6
EVB, EVC
Target Device :
– TPC-642 ( Strong ARM CPU )
– WinCE 3.0
Connection :
– Null modem cable

7.

Step 1 : Install the ActiveSync 3.1
Can free download
form Microsoft web site
(http://www.microsoft.com/mobil
e/downloads/activesync.asp )
Use to transfer data
between host PC and
target device

8.

Step 2 : Install SDK for TPC-642
# Suggest to install before connection

9.

Step 3 : Configure the COM port
of TPC-642S
Then do the
following setting :
Baud Rate : 19200
(can be any value
available, but should
be the same as the
host PC)
Data Bits : 8
Parity : None
Stop Bits : 1
Flow Control : None

10.

Step 4 : Set the Communication
Mode of TPC-642S
Hint:
This is a unmovable
window, so that you
can not reach the OK
on the up-right side,
however you can use
the keyboard and
click the return key.
Give a unique name

11.

Step 5 : Set the COM port in the
Host PC
In NT you can set in the
start\setting\control Panel\Ports
The Parameter must be the same as the
settings in the Setp 3

12.

Step 6-1 : Start the ActiveSync
Tip : DO NOT
click “Next>”
immediately.

13.

Step 6-2 : Start the ActiveSync
DO NOT
First
Then
Click Next > Now
Use Partnership

14.

Step 7 : Start the EVB
This Icon will appear only after you install the SDK for VB

15.

Step 8 : Check the connection status
You can
click test to
check if the
connection
is OK

16.

Step 8 : Specify the Download Path
Note : Download the
program to the CFDisk
or it will disappear after
reboot

17.

Step 10 : Design the Form of AP
If OK, click here to Run the AP
The RAD ( Rapid Application
Develop ) environment is almost
the same as VB

18.

Step 11 : Run and Remote Debug
Click
or
to return to the Design Mode
In the Process, EVB will copy some files to the
TPC-642, Click OK for the fist time

19.

Create CE Comm Program
Use the following scheme to demo the
communication.
Host PC (ActiveSync, EVB)
Address : 01
Baud rate :
19.2k
Null modem cable
slot1
5056D
COM1(232)
COM2(485)
( With Auto flow control )
TPC-642
485
Pin to pin cable
ADAM-5000/485

20.

Step1: Add the CE Comm Component
If add OK this Icon will
appear

21.

Step2: Design the Form
The Program will Demo
the DO control to the
ADAM-5056D
Click up-side button
will turn ON the LED
on the channel 2
Drag
Click down-side button
will turn OFF the LED
on the channel 2

22.

Step3: Write the Code
Output string command
while click
( Read the manual for the detail command
description )
Following the
sequence to open
the COM port
Close the COM port

23.

Step4: Run and Remote Debug
Click the buttons you
will see the LED on the
Adam-5056D ON and
OFF
Note: In The Progress, the file MSCEComm.dll will
be transferred and active at the first time

24.

How to Auto-run When Reboot
Create a startup.ini file in the \CFDisk\
Specify the path and filename and parameter
To execute the .VB file, call the \Windows\pvbload.exe ***.vb
Some OCX component should register first, Regsvrce.exe ***.dll
For example, if you want to run the AP at previous Demo, just add
the following line in the startup.ini
You can create the file on the PC and transfer by ActiveSync.

25.

Remote Tools
Windows CE Toolkit provides several invaluable tools
you can use to test and debug your Windows CE-based
applications:
You will find them in the \Windows CE Tools\BIN\
– Remote File Viewer (Cefilevw.exe)
– Remote Zoomin (Cezoom.exe)
– Remote Process Viewer (Cepview.exe)
– Remote Registry Editor (Ceregedt.exe)
– Remote Spy++ (CeSpy.exe)
– Remote Heap Walker (Ceheapwk.exe)

26.

Remote file viewer
Use this command to
transfer files

27.

Remote ZoomIn
Refresh
Can use to monitor
the screen output

28.

Remote process viewer

29.

Remote register editor

30.

Remote spy

31.

Remote Heap Walker
English     Русский Правила