Programming the PIC Microcontroller with MBasic

Few things are more ubiquitous than bar codes. Indeed, they've become background noise and our eyes glide over a bar codes without actually seeing it. After you build a bar code reader, you'll seldom ignore one again.
My bar code reader is based around an inexpensive new-old-stock Hewlett Packard (now Agilent Technologies) wand, but similar wands manufactured by HP and other suppliers are widely available for a few dollars from electronics surplus dealers or on eBay. We'll learn a bit about bar codes in general and develop programs to read two bar codes, the "3 of 9" code and the "Universal Product Code, revision A," or UPC-A, the code used to identify retail merchandise.
The modern era of bar codes started with the grocery industry's desire to standardize product numbers in the late 1960s. After considering proposals from the leading computer manufacturers, IBM won a contract to design a coding system to implement the grocery industry's numbering system, proposing what we now know as UPC-A, or Universal Product Code, version A. Although the first UPC-A scanning system went into service in 1974, it was certainly not the first bar code. Indeed, the first United States bar code patent was granted in 1952, and the first practical use of bar codes was in the late 1960's to identify railroad boxcars. UPC-A, and its derivatives, however, are far and away the most common bar code today and have worldwide usage.
Let's start with a simple...