|
Using the APP2 With Linux and JavaIf your computer supports Java and the Java Comm API (JCA) you can use a Java program to download hex files to the APP-II. You can use the Java program from any supported operating system, but the directions below are for Linux. Here are the steps I took for RedHat Linux (you may have to adjust them a bit for other flavors):
export CLASSPATH=/home/XYZ/app2.jar That's it. You are ready to go. Of course, you need a HEX file generated by some Microchip programming tool (see http://www.gnupic.org/ for software). Assuming you have the APP2 connected to /dev/ttyS0 you can execute: java com.al_williams.app2.APP2 myprog.hex /dev/ttyS0 If Java can't find the comm.jar file, you can add it to your classpath. If you do have the comm library installed properly, then you could simply execute: java -jar app2.jar Then you don't need to add app2.jar to your classpath at all. Although these instructions are geared at Linux, any Java supported operating system will work as long as you install the JCA. For example, the program will work under Windows and should work on the Mac if you install the JCA (see http://homepage.mac.com/pcbeard/javax.comm.MRJ/). Note: the RXTX libraries requires you to have access to /var/lock. If you run as root, you won't have any problems. In theory, if your user ID is in the lock group (RedHat) or uucp group (some other Linux distributions) you should be able to create files in /var/lock. You can do this by editing the /etc/group file or using the -G option of usermod. Be sure to log out and log back in for the change to take effect. If all else fails, try running (as root): chmod 777 /var/lock. This could be a mild security hole, of sorts, since anyone could then delete a lock file, so be sure you understand how this will affect your system.
|
![]()
[Kits] |
[Math] | [PS/2] |
[Pulse In] | [Pulse Out] |
[I/O] | [A/D] |
[PWM] | [Position Sensing] [PIC Programming] | [RS232]
| [PLD/FPGA] | [NetPorter]
[MicroTasks/Consulting] |
[Components] |
[Products] |
[News] | [Search] |
[Documents] | [Projects] |
[Resources] | [Updates] |
[FAQ] |
[Support]
[PDF Catalog]
Jump to PAKs: I, II,
III, IV, V,
VI, VII, VIII,
IX, X, XI,
XII PicoPAK:
VIII
Site contents © 1997-2008 by AWC, 310 Ivy Glen, League City, TX 77573 (281) 334-4341