All Forums
 Microsoft Windows CE
 CE Sample Applications and Utilities
 eVB - PortTest.vb (Writing to WinCE Ports)
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  

ctacke

877 Posts

Posted - 02 Apr 2002 :  17:29:17  Show Profile  Email Poster
PortTest.vb
PortTest is an application that allows you to toggle all system IOs reachable by Windows CE Port Name. This provides not only a good test utility, but an example of using UCB1200 and other IOs with eMbedded Visual Basic.


(screen capture does not show addition of Bitsy Plus in rev 3)


Key APIs Used

CreateFile
WriteFile
DeviceIoControl

Lines of Code: 332

Source Download
Rev 3 - April 11, 03 (16k zip).



modified April 11, 03 (ctacke) - Updated to rev 3. Added LOC and APIs

Joelw

30 Posts

Posted - 02 Apr 2002 :  17:46:31  Show Profile  Email Poster
GM Ports:

Your ports for GM are not consistant with
topic.asp?TOPIC_ID=298

GPIO1: ?? J1 Contact Closure Detect ??
GPIO2: ?? What is this tied to ?? // LED2: ??
GPIO3: ?? What is this tied to ?? // LED1: ??
LED1: LEDOUT0 GPIO20
LED2: LEDOUT1 GPIO25
LED3: LEDOUT2 GPIO26
IOA1: UCB_IO0 UCB1200
IOA2: UCB_IO1 UCB1200
IOA3: UCB_IO2 UCB1200
IOA4: UCB_IO3 UCB1200
IOA5: UCB_IO4 UCB1200
IOB1: UCB_IO5 UCB1200
IOB2: UCB_IO6 UCB1200
IOB3: UCB_IO7 UCB1200
IOB4: UCB_IO8 UCB1200
IOB5: UCB_IO9 UCB1200
AIN1: ANIN0 UCB1200
AIN2: ANIN1 UCB1200
AIN3: ANIN2 UCB1200
AIN4: ANIN3 UCB1200

Aren't ports AIN1: - AIN4: read only ??

Edited by - Joelw on 04/02/2002 18:05:23

Edited by - Joelw on 04/02/2002 18:31:56
Go to Top of Page

ctacke

877 Posts

Posted - 02 Apr 2002 :  19:14:14  Show Profile  Email Poster
  • The J1 contact closure is event driven in the newer builds of CE. See the following Topic for more information:

    topic.asp?TOPIC_ID=155


  • For the Graphics Master, GPI2: and GPI3: Drive GPIOs 25 and 26 respectively as shown in the CE Developer's Guide addendum table. LED2: and LED1: also drive these same GPIOs (on the Graphics Master). See the following Topic for more information:

    topic.asp?TOPIC_ID=205


  • The UCB1200 Digital IOs listed in topic.asp?TOPIC_ID=298 are correct. The Graphics Master manual lists UCB_IO5-9 in reverse order (ascending by pin instead of signal name) and that may be causing some confusion.


  • AIN1: through AIN4: are analog inputs and you are correct that they only have meaning when read (though writing to them will not cause an error). The PortTest application has them in the Port list anticipating a future version that will allow both input from and output to the ports.


-----------------
Chris Tacke, eMVP
Applied Data Support
Go to Top of Page

testid

5 Posts

Posted - 05 May 2002 :  20:37:14  Show Profile  Email Poster
Do you have the port test sample in C++?
Go to Top of Page

ctacke

877 Posts

Posted - 29 May 2002 :  18:05:11  Show Profile  Email Poster
We do not have a C++ version of PortTest. For a basic test application, you can modify the Heartbeat sample application by changing the port name from "LED1:" to the port you wish to test.

-----------------
Chris Tacke, eMVP
Applied Data Support
Go to Top of Page

ctacke

877 Posts

Posted - 10 Jul 2002 :  15:14:53  Show Profile  Email Poster
Rev 2 Feature Addition

We've added the ability to change the high/low duration and duty cycle of the port toggle so you can now use PortTest as a rudimentary square-wave function generator.

-----------------
Chris Tacke, eMVP
Applied Data Support
Go to Top of Page

ctacke

877 Posts

Posted - 11 Apr 2003 :  14:36:26  Show Profile  Email Poster
Rev 3 Feature Addition

We've added support for the Bitsy Plus ports, most notably the EIO1: digital ports.
Go to Top of Page
  Topic  
 Forum Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000