Feature

EDN hands-on project: building pocket power

Astonishing portable computing and growing popularity and power has lured legions of system developers to the Pocket PC platform. This hands-on project examines the software tools that you can use to build your own pocket applications.

By Warren Webb, Technical Editor -- EDN, 10/25/2001

AT A GLANCE
  • Hampered by poor early performance, the Pocket PC is growing in popularity and has a wider range of applications; hence, it now challenges the Palm platform.
  • A typical Pocket PC—with a 200-MHz processor, 32 Mbytes of RAM, a sound system, and a color touchscreen display—rivals some desktop PCs.
  • Pocket PC software is a subset of the Windows CE OS with APIs familiar to desktop-PC developers.
  • Free tools from Microsoft give Pocket PC programmers a familiar graphical environment for Visual Basic or Visual C++ development.
  • Lack of a common memory-and peripheral-expansion standard makes it difficult for Pocket PC developers to create universal applications.
Sidebars:
What's new in Pocket PC 2002?

After languishing in the shadow of the Palm Pilot, the Windows CE-based Pocket PC platform is showing new vigor and deserves careful consideration for your next embedded project. With a growing market share, significant operating-system upgrades, and a series of new hardware offerings, Pocket PCs have erased most of their earlier shortcomings and user concerns. But the key ingredients of widespread acceptance of a complex system such as the Pocket PC are the tools available to translate your design ideas into a viable product. So, during this project, I investigated off-the-shelf and mostly free development software for creating, debugging, and testing Pocket PC applications.

To cope with dominance of the Palm handheld PDA, Microsoft has steadily improved its competing WinCE (Windows-consumer-electronics)-based platform. Initial operating-system offerings were too complex for the meager portable processors and resulted in sluggish performance and poor market acceptance. After hardware manufacturers Everex, Uniden, and Philips pulled out of the market for handheld computers, Microsoft and the remaining manufacturers decided to upgrade their products to more effectively challenge Palm. Microsoft coined the term "Pocket PC" little more than a year ago. The name refers to both the specially designed handheld-computer hardware and the customized Windows CE operating system. Unlike Palm's simplified operating system, Microsoft's strategy is to offer features and performance enhancements that more closely resemble those of a desktop computer.

Although Palm and Handspring lead in the sheer number of units sold, Pocket PC hardware manufacturers are gaining market share. In fact, with their products selling at a much higher price, Pocket PC manufacturers claim more than 50% of the worldwide PDA-market revenue. Nonetheless, the debate continues between Palm advocates citing the extensive software available and the army of developers and Pocket PC users pointing to the expanded functions and Windows-compatible applications. Palm operating-system software has changed little since splitting from 3Com last year, yet in the same period Microsoft has made two major updates to the Pocket PC.

Currently, the major Pocket PC hardware producers are Casio, Compaq, and Hewlett-Packard, and there is a handful of new entrants or specialized manufacturers. All Pocket PC devices contain a 240×320-pixel, quarter-VGA display with an integral touchscreen for user I/O, a built-in speaker, a microphone, a stylus, several application buttons, an infrared port, and a USB connection for desktop synchronization. Beyond these required similarities, each manufacturer offers custom features or distinctive computing resources to differentiate their products. For example, some units feature built-in or add-on expansion slots to increase memory or attach peripherals.

In synch

During the preparation of this report, I worked daily with the Casio Cassiopeia E-125 and the Compaq iPAQ H3600 series Pocket PCs. Each device comes with a USB cradle to provide a wired connection to my desktop and a convenient battery-recharging stand. With ActiveSync software from Microsoft, every day I synchronized my desktop calendar, contacts, to-do tasks, unread e-mail, selected Web sites, and active word-processing files. I also downloaded a few games and MP3 files to keep my daughter, Kimberly, happy on long trips. She helped test the battery capacity by completely draining the iPAQ during a five-hour cross-country flight.

The Casio E-125 has 32 Mbytes of RAM, a 150-MHz MIPS processor, and an integral Type II CompactFlash slot that supports memory expansion including the 1-Gbyte IBM microdrive (Figure 1). With 65,536 16-bit colors, the Casio Pocket PC has the best-looking display, although the backlit screen is difficult to read in full sunlight. By comparison, the iPAQ H3670 has a reflective display that is easy to read in full sun but shows only 4096 colors. The iPAQ has the performance edge with a faster 206-MHz StrongARM processor and as much as 64 Mbytes of RAM (Figure 2). Compaq supplies expansion packs to slip over the iPAQ to give either CompactFlash or PC-card compatibility. HP offers a competing Pocket PC, the Jornada 540 series, with a 133-MHz Hitachi SH3 processor. All of these Pocket PCs cost $400 to $600.

Having multiple processors is a headache for application developers, because developers must provide separate executable code for each machine. The StrongARM processor has recently gained popularity because of its snappy performance. It will probably become the default standard for Pocket PC devices. UR There, HP, and Toshiba have each announced next-generation Pocket PC devices using the StrongARM processor. Microsoft is also dropping support for non-StrongARM processors with the next version of the Pocket PC operating system (see sidebar "What's new in Pocket PC 2002?").

Sporting more processing power than the systems we had on our desks just a few years ago, Pocket PCs have numerous applications other than as basic portable organizers. For example, Pocket PCs have periodic synchronizations to company networks, so you can use them to collect and display sales, inventory, financial, or schedule information from an enterprisewide database. The handheld form factor also gives designers an off-the-shelf and programmable user interface for fixed embedded systems or factory controllers. The built-in infrared interface is ideal for short-range, line-of-sight communications to custom systems. When outfitted with longer range communications transceivers, such as 802.11 or CDPD (cellular-digital-packet-data), Pocket PCs easily function as a real-time information appliances with Internet access for countless applications.

Pocket PC software is derived from Windows CE, Microsoft's configurable operating system for embedded applications. The current CE version is 3.0; however, the next iteration, code-named Talisker, is in beta testing and is scheduled for release late this year. Windows CE is a multithreaded, multitasking, pre-emptive-operating software environment for limited-resource hardware. Although the WinCE API is almost identical to Windows 98, it was written from scratch to optimize real-time performance. The familiar API helps to reduce the learning process for experienced desktop programmers.

Free tools

Last year, Microsoft won the hearts of developers of low-budget systems by releasing Windows CE eMbedded Visual Tools 3.0 as a free download (Reference 1). Before the release, you could easily spend more than $1000 buying a language compiler and associated Windows CE-development tools. The tool kit includes an integrated development environment and gives you everything that you need to develop software for the Handheld PC, the Palm-sized PC, and the Pocket PC platforms. The stand-alone tool kit does not require Microsoft's Visual Studio. You can develop programs in either Visual C++ or Visual Basic. You can download and execute your creations on the actual target hardware or on a built-in emulator that runs right on your desktop system (Figure 3).

One of your first decisions is to choose either Visual C++ (Figure 4) or Visual Basic as your primary programming language (Figure 5). Visual Basic has familiar syntax and is easier to use with simple drag-and-drop graphical-form construction. However, Visual Basic does not provide access to the full Windows CE API. Visual Basic also requires a several runtime programs that must be in the target device. Because it interprets instructions one at a time, Visual Basic runs significantly slower than C++. Experienced programmers find that if an application is mostly user-interface-oriented, then Visual Basic is the better language to use. Conversely, if an application is code-intensive or requires real-time interaction with the hardware, then Visual C++ is preferable.

When I downloaded the free tools, I immediately ran into a problem. The tools are zipped into a 312-Mbyte file, which exceeded my satellite-service provider's fair-use policy. I'd download about 200 Mbytes, and my transfer rate would drop from 100 kbps to about 5 kbps. I had to restart several times and finally completed the process using a shareware program, Download Wonder (www.forty.com), which allowed me to pause and restart the download to stretch my bandwidth usage over several days. In the meantime, I paid Microsoft an $8.95 shipping-and-handling charge for the tools on CD-ROM, and it arrived on the same day that my download was finally complete. Go figure.

The second problem was the operating system on my desktop computer. I still use Windows 98 second edition; therefore, I could load the development environment and compilers but the not the emulator that Windows 2000 requires. To avoid disaster with my system, I borrowed my daughter's computer and installed a beta version of Windows XP to check out the emulator. The emulator is handy; it speeds development by eliminating the time required to download each iteration of your program over the USB connection.

The tool installation was a breeze on either desktop system, and my only concern was the 720 Mbytes of disk space that the full environment required. I eliminated the software-development kits for the Handheld and Palm-sized PCs to save some disk space. I could have saved an additional 225 Mbytes by eliminating the Visual C++ capability, but I wanted to at least experiment with a simple C++ program. The traditional first exercise with a new development system is to create a simple "hello-world" application to display some text and verify the compilation process.

The Visual Basic exercise was easier for me, because I have worked with the language for both desktop and embedded systems. I simply added a label to the default form, changed the caption, and clicked "Start Debug"—literally a one-minute process—and the application appeared on my iPAQ. The process was even faster on my daughter's XP system, because the default-debug device is the built-in emulator. The emulator runs the standard Pocket PC operating system, so it is easy to iterate a design to get just the right look. I was also able to surf the Internet from the emulator to check out sites formatted for mobile devices.

Hello, wizard

I was dreading the C++ hello-world example, because I have little C++ background. After I selected a Pocket PC application and target processor, I was pleasantly surprised to find a wizard with a choice of an empty project, a simple Windows CE application, or a typical hello-world application. Of course, I selected the hello-world application, and, within a few seconds, the completed program appeared on my Pocket PC. Simple. The wizard short cut had created the source code for a full project complete with routines to create a window, add text, and remove the window on exit. This example is an excellent learning tool for beginning Visual C++ programmers to add code and immediately see the results. The compiler simultaneously creates a debug version of your object code and a clean version for final release.

Although the custom version of Windows CE is the primary operating system for Pocket PC hardware, resourceful programmers have also ported Linux to some compatible devices. Linux will not replace Windows CE on general Pocket PCs; however, it could be a cost-saving operating system on fixed-purpose handheld products. The Compaq iPAQ is the most popular Linux hardware platform because of its fast processor and flash ROM. You can find details for downloading and installing Linux on Pocket PCs at www.handhelds.org. The site links to about a half-dozen Linux distributions for the iPAQ Pocket PC and open-source tools for new application development.

Several other excellent Web sites can help new and experienced Pocket PC developers. For example, www.devbuzz.com is devoted to embedded Visual Basic development for Windows CE devices. The site includes news, tutorials, how to's, sample code, related links, and user forums. Microsoft's www.pocketpc.com also includes plenty of developer tutorials and downloads. General Web sites www.pocketpcpassion.com and www.pocketpcthoughts.com keep users and developers up to date on new products, rumors, reviews, and opinions. The Singapore Pocket PC user's group site (www.ppcsg.org) lists more than 250 general-purpose and utility applications in its freeware archive that you can download.

The Pocket PC's biggest flaw is the lack of a standard method of expanding the basic device. For example, the HP Jornada 540 has a Type I CompactFlash slot, the Casio E-125 has a Type II CompactFlash slot, and the iPAQ has expansion sleeves with built-in batteries to power the add-on device. The @migo from UR There, one of the newer generation Pocket PCs, even has an integral PC-card slot. This lack of standardization makes it difficult for third-party developers to create applications that take advantage of expanded Pocket PC features without favoring one manufacturer's product over other devices.

Unfortunately, users are demanding Pocket PC applications with wireless connectivity and, therefore, some sort of expansion slot. I tested a Sierra Wireless AirCard 300 transceiver for CDPD. Because the product needs a Type II PC Card slot, it works only with iPAQ Pocket PCs. Although the expansion pack doubles the thickness of the Pocket PC, I had instant access to the Internet and my e-mail using Go America's CDPD service from almost any location that cell-phone providers serve. The 19.2-kbps data rate is adequate for everything except complex Web pages, because you need not waste time negotiating a dial-up connection. In fact, one of the major development areas for Pocket PC designers is creating properly formatted Web pages for the 240×320-pixel display.

Considering all of their incarnations, Pocket PCs have enormous potential in the wireless-information age. In addition, free compilers and emulators allow you to build and prototype ideas with no investment other than design time. The missing link to greater Pocket PC acceptance is a reliable and ubiquitous wide-area communications system; however, the current technology offers plenty of viable applications and profit potential.


For more information...
When you contact any of the following manufacturers directly, please let them know you read about their products in EDN.
Casio
1-973-252-7570
www.casio.com
Compaq Computer Corp
1-281-370-0670
www.compaq.com
Everex
1-510-498-1111
www.everex.com
Go America Communications Corp
1-201-996-1717
www.goamerica.com
Handspring Inc
1-650-230-5000
www.handspring.com
Hewlett-Packard
1-970-635-1000
www.hp.com
Hitachi
1-650-589-8300
www.hitachi.com
IBM
1-914-499-1900
www.ibm.com
Microsoft
1-425-882-8080
www.microsoft.com
Palm Inc
1-408-878-9000
www.palm.com
Philips
1-770-821-2400
www.philips.com
Sierra Wireless
1-604-231-1100
www.sierrawireless.com
Symbol Technologies
1-631-738-2400
www.symbol.com
3Com
1-408-326-5000
www.3com.com
Toshiba America Information Systems
1-949-583-3000
www.toshiba.com
Uniden
1-817-858-3300
www.uniden.com
UR There
1-954-929-5048
www.urthere.com
 


Author Information
You can reach Technical Editor Warren Webb at 1-858-513-3713, fax 1-858-486-3646, e-mail wwwebb@cts.com.


Reference
  1. Microsoft eMbedded Visual Tools 3.0 download site, www.microsoft.com/mobile/downloads/emvt30.asp.
 

What's new in Pocket PC 2002?

Early last month, Microsoft announced Pocket PC 2002, the latest version of the Pocket PC operating system. Codenamed "Merlin" during development, Pocket PC 2002 adds a number of cosmetic changes and software updates along with a few major enhancements (Figure A). Surprisingly, Microsoft has decided to support only ARM-based processors, thereby ending the upgrade path for SH-3 and MIPS devices.

One new 2002 application gaining praise is the built-in Terminal Services client, which allows users to view and control remote PCs from Pocket PCs. Built-in "skins" also allow users to download or create custom looks for the Pocket PCs. (A skin is a collection of bit-map files and a text file you use to customize the user interface and appearance of an operating system or application.)

Pocket PC 2002 is much larger that the previous version and does not fit into current ROM space. Most devices have 16 Mbytes, and the full OS takes about 24 Mbytes. Microsoft will split the new software into an upgrade version that fits into 16 Mbytes and a full version for next-generation hardware devices. The smaller version eliminates such functions as spell checking and handwriting recognition and such applications as Media Player and Microsoft Reader to gain the required space. You can install most of these functions as RAM-based applications. Because of the StrongARM-processor rule, you cannot upgrade older Casio and HP devices.

The software upgrades will not stop with Pocket PC 2002. Microsoft's next version of Windows CE, code-named Talisker, is in beta testing. It is scheduled for release near the end of this year.



ADVERTISEMENT

ADVERTISEMENT

Feedback Loop


Post a CommentPost a Comment

There are no comments posted for this article.

Related Content

 

By This Author


ADVERTISEMENT

Knowledge Center



Technology Quick Links

EDN Marketplace


©1997-2009 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other Reed Business sites