310 likes | 342 Views
Learn to develop in WinCE 3.0, customize system cost, utilize Unicode, and execute programs with VB. Set up ActiveSync, install SDK, configure COM ports, design AP forms, communicate between devices, and auto-run programs on WinCE. Explore Remote Tools for testing and debugging applications. Enhance your WinCE programming skills effectively.
E N D
Develop VB in WinCE Maker : Axel Chou
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
WinCE 3.0 Hardware Support • CPU • ARM / Strong ARM • x86 • MIPS • PPC • SH3/4 • Others : ISA, PCI, CF, PCMCIA, USB….
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
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
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
Step 1 : Install the ActiveSync 3.1 • Can free download form Microsoft web site (http://www.microsoft.com/mobile/downloads/activesync.asp ) • Use to transfer data between host PC and target device
Step 2 : Install SDK for TPC-642 # Suggest to install before connection
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
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
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
Step 6-1 : Start the ActiveSync Tip :DO NOTclick “Next>” immediately.
Step 6-2 : Start the ActiveSync DO NOT Use Partnership First Then Click Next > Now
Step 7 : Start the EVB This Icon will appear only after you install the SDK for VB
Step 8 : Check the connection status You can click test to check if the connection is OK
Step 8 : Specify the Download Path Note : Download the program to the CFDisk or it will disappear after reboot
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
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
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) 485 COM2(485) Pin to pin cable ( With Auto flow control ) ADAM-5000/485 TPC-642
Step1: Add the CE Comm Component If add OK this Icon will appear
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 Click down-side button will turn OFF the LED on the channel 2 Drag
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
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
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.
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)
Remote file viewer Use this command to transfer files
Remote ZoomIn Refresh Can use to monitor the screen output