bookssland.com » Other » Make: Electronics by Charles Platt (classic books to read TXT) 📗

Book online «Make: Electronics by Charles Platt (classic books to read TXT) 📗». Author Charles Platt



1 ... 109 110 111 112 113 114 115 116 117 ... 122
Go to page:
a 555 timer but has the power of a tiny computer.

Figure 5-124. A typical PICAXE kit includes a printed circuit board, which you may not really need, and some other not-entirely-essential items. But the 3.5-mm stereo jack socket (top, center) is absolutely necessary.

To download your programming instructions into the chip, first you’ll type the instructions on a computer, and then you’ll feed them through a cable into the PICAXE memory. So you’ll need to buy a cable, and you’ll need software to help you to write the program.

You can use the PICAXE with a serial cable, but I don’t recommend it. The old RS-232 serial communications standard on PCs is pretty much obsolete, and PICAXE has recognized this by offering a USB cable (which contains a serial converter inside its plug). The USB cable is a little more expensive, but is also simpler and compatible with Apple computers. From any of the U.S. distributors, buy USB cable part AXE027, also sold as part PGM-08312 by http://www.sparkfun.com (quantity: 1). The cable is shown in Figure 5-125.

Figure 5-125. The USB download cable made for use with the PICAXE terminates in a 3.5-mm audio plug. This should not be inserted in any audio device. It establishes a serial connection with a computer, allowing program code to be downloaded into the chip.

To write your software and send it down the wire to the chip, the PICAXE Programming Editor is the tool of choice. It comes in only a Windows version. For those who prefer Mac OS or Linux, you can get a free download of another piece of software known as AXEpad, which has fewer features, but will do the job. All the downloadable software is freely available from http://www.rev-ed.co.uk/picaxe/software.htm.

Finally, you need a 3.5-mm stereo audio socket with solder connections. The reason for this is that the manufacturers of the PICAXE have used a stereo audio plug on the free end of their USB cable, and you have to be able to plug it into something. The PICAXE breadboard adapter, SparkFun stock number DEV-08331, contains the necessary stereo socket in addition to a few other little items. Quantity: 1. See Figure 5-126.

Figure 5-126. Closeup of the 3.5-mm stereo socket that is used with the USB download cable.

Oddly enough, the USB cable is the most expensive item on the list, because of the electronics hidden inside it.

Software Installation and Setup

Now you have to go through a setup procedure. There is no way around this. Here is what you will be doing:

1. Install a driver so that your computer will recognize the special USB cable.

2. Install the Programming Editor software (or AXEpad for Mac/Linux) so that your computer will help you to write programs and then download them into the chip.

3. Mount the PICAXE on your breadboard and add the socket to receive downloads.

These steps are explained in the following sections.

The USB driver

Fair warning: If you go to the PICAXE website and try to use its search function, it probably won’t find what you want. Search for “USB Driver,” for instance, and it will pretend it has never heard of such a thing.

The PICAXE home page also has irritating drop-down menus that tend to disappear just when you’re about to click on them, but at the time of writing, you can bypass these issues by going straight to the Software Downloads section at http://www.rev-ed.co.uk/picaxe/software.htm.

Scroll down past all the software until you get to Additional Resources. Look for the AXE027 PICAXE USB Download Cable. At first glance, it looks as if they want to sell you a cable, but in fact this is the list of drivers. Double-click the one appropriate to your computer, and choose a destination on your computer for the download—a place where you will find it easily, such as your desktop.

Be careful not to download the driver for the USB010 USB-Serial adapter by mistake. The USB-Serial adapter is something else entirely.

The download will leave you with a zipped file folder. You will have to unzip it. On Windows XP, right-click the folder and choose “Extract all.” View the extracted files and you will find a PDF installation guide. Linux and Mac users can find instructions currently stashed at http://www.rev-ed.co.uk/docs/AXE027.pdf.

When installing the driver on a Windows platform, here are a few tips to minimize your exasperation level:

1. Remember, the special USB cable contains some electronics. It is not just a cable, but a device designed for interacting with a PICAXE chip. Don’t try to use it for anything else!

2. You have to plug the cable into a USB port before you install the driver, because your computer will need to verify that the driver matches the cable.

3. You must not attach the PICAXE to the other end of the cable until after you have installed the driver.

4. Every USB port on your computer has a separate identity. Whichever one you choose when you first plug in the cable, you should use that port every time in the future. Otherwise, you will have to repeat the process of telling your computer what the cable is.

5. Bearing in mind Tip #4, you should avoid using the cable in a standalone USB hub.

6. The cable is fooling the PICAXE into thinking that it’s talking to a serial port on your computer. Those “communication” ports are known as COM1, COM2, COM3, or COM4. When you install the driver, the installer will choose one of those COM ports for you, and later you will have to know which one it is. The PDF guide should help you through this procedure. Unfortunately, you cannot skip it.

The Programming Editor software

If you have come this far, you’re ready for the next big step, which is much easier. You need the PICAXE Programming Editor, available for free on the Software Downloads web page where you found the USB driver. (If you are using a Mac or Linux, you will need AXEpad, which is on the same web page.)

Downloading and installing the Programming Editor should be simple

1 ... 109 110 111 112 113 114 115 116 117 ... 122
Go to page:

Free e-book «Make: Electronics by Charles Platt (classic books to read TXT) 📗» - read online now

Comments (0)

There are no comments yet. You can be the first!
Add a comment