FINAL TUE DEC 21 8a OS407
WED NOV 15
MON NOV 8
FRI OCT 22 MIDTERM
MON SEP 20
FRI SEP 10
WED SEP 8
Installing & Configuring Java for HC11 Code Download
This document explains how to:
These instructions are based on the use of JDK version 1.1.8, which is old, but (a) works just fine, and (b) is way smaller and simpler than the latest stuff.
You are also free to use the machines in the Engaging Computing Lab (OS306). These machines already have JDK 1.1.8 installed per these instructions.
At the end of this document, there are notes for running on non-Windows computers (e.g., Mac OS X or Linux).
Your Own PC
The following instructions are for those of you who wish to set up your own PC for development.
Installing JDK 1.1.8
You will need to download and install Sun's Java Development Kit.
I recommend the old 1.1.8 version because it's smaller and faster than the latest versions and it runs perfectly well. So the instructions that follow will assume you're taking my suggestion and using this obsolete, but eminently functional, version of Java. You are of course free to download and install the latest-and-greatest, but then you'll have to adapt the instructions accordingly on your own.
First download the 1.1.8 JDK from Sun. You may use their URL http://java.sun.com/products/archive/jdk/1.1.8_010/index.html or you may retrieve a local copy.
Run the installer, and the whole system will get installed under C:\JDK1.1.8\.
javax.comm is the name of the standard libraries created by Sun for interacting with a serial port from the Java language. I have created a tiny zip download that has precisely the three necessary files and an installer batch file for putting them in the right place.
Download the javax.comm for JDK118 zip file and extract it into a temporary directory. There will be three files and an installer batch file named install-JDK118.bat. Run the batch file (double-click on it), and the following files will be copied to the following directories:
After the installer runs, check that the three files are indeed in their specified locations.
Now you need to tell your PC where the Java binaries are located (they're in C:\JDK1.1.8\BIN\). Also, you need to create an environment variable named CLASSPATH that tells the Java software about the new comm.jar communications library.
The way to do this is to modify the Environment Variables setting. Go to the Control Panels, then open the System icon. From the System Properties window that then opens, click on the Advanced tab. Then, click on the Environment Variables button.
The Environment Variables window will show. In the bottom half are the System Variables. There will already be an entry for the PATH. You want to add on to the end of the existing value, so select PATH, click the Edit button, right-arrow to the end, and then add:
Note the initial semicolon.
Then you'll want to create a CLASSPATH environment variable. Click the New button, type CLASSPATH into the name field, and set its value to be:
Note the initial period, then a semicolon, followed by the location of the communications .jar file.
Now boot up a DOS shell (Start Menu:Run and type cmd or, if, on an older Windows machine, type command). At the shell, type java . If you see a bunch of text starting with usage: java [-options] class etc. then you're all set.
Running BeepTest to Discover Serial Ports
Let's run the HC11Boot.java program. At the command shell, type:
Please note that you must follow the capitalization BeepTest exactly.
When run without arguments, the BeepTest program displays a list of available serial ports. You should see a result like:
Usage: BeepTest [serial-port] Searching for serial ports... Available ports are: COM1 COM2
If you get at least one serial port showing up as available, congratulations! You're now ready to talk to your 68HC11; skip to the next step.
If you instead got the message no ports found, there are a couple of possibilities:
To see if you should have available serial ports, please run the standard communications package HyperTerminal (it may already be on your machine; check Start Menu->Accessories->Communications). See if it presents you with any serial ports to connect to. If yes, then it's likely a javax.comm setup problemskip to the next paragraph. If HyperTerminal did not give you any COM port choices, then you likely have a lower-level serial driver problem. This would be beyond the scope of this document, but resolution generally involves a trip to the Device Manager in Windows' System Control Panel, and in extreme cases, change to your CMOS machine configuration.
If you suspect a javax.comm configuration problem, make sure that the win32comm.dll file is properly in the JDK bin directory and that the javax.comm.properties file is in the JDK lib directory.
Check which version of Java you are calling up by typing just java -version at the prompt. If you don't get 1.1.8, then you're running some other version of Java, which won't have the javax.comm extensions installed properly. Try giving the full path to the 1.1.8 java binary; type \jdk1.1.8\bin\java BeepTest.
Notes for Non-Windows OSes
The only special trick for running on non-Windows OS'es is finding a replacement for the javax.comm libraries.
There is an open-source initiative located at http://www.rxtx.org for making replacement javax.comm-compatible drivers for lots of different OS'es. From this site, download, configure, and install the rxtx drivers appropriate for the OS you are running.
There are version of the rxtx software with the comms routines located either in the javax.comm package or a gnu.io package. Use the version that has the stuff in javax.comm.
Last modified: Thursday, 09-Sep-2004 20:15:13 EDT by firstname.lastname@example.org