Users manual of

JISP

Version 0.8

Rob Hamerling
Vianen, The Netherlands

E-mail: r.hamerling@hccnet.nl
homepage: http://www.robh.nl/

Copyright © R. Hamerling, 2002
All Rights Reserved.

Jisp is a pittoresque village in The Netherlands


Table of Contents

Description

Jisp is a platform independent alternative for John Jabour's ISP program, an InCircuit Serial PIC Programming application for LocoBuffer.

System requirements

If you have installed Java 1.3, then you'll have Swing, but in addition you may need to install JavaComm. For windows and Linix this is available with Sun.

Cabling

Programming LocoBuffer via a serial port does not need any special cabling, use a regular modem cable between serial port and LocoBuffer.

Programming LocoIO via a parallel port requires a special (home made) cable between parallel port and the LocoIO board. On one side a 25-pin male D-connector is needed for connection to the parallel port, on the other side 4 wires are connected to JP1 on the LocoIO board.
The following connections need to be made:

  DB25.1  -------------> DB25.10
  DB25.5  -------------------------> LocoIO JP1.1
  DB25.7  -------------------------> LocoIO JP1.3
  DB25.9  -------------------------> LocoIO JP1.33
  DB25.18 -------------------------> LocoIO JP1.34
  DB25.11 -> 270 Ohm  -> DB25.22
  DB25.12 -> 270 Ohm  -> DB25.22
  DB25.13 ->  22 KOhm -> DB25.16
  DB25.15 ->  22 KOhm -> DB25.16
  Schematics:

             DB25 (male)             LocoIO JP1
             ===========             ==========

                  1
                 O------------+
            14 O              |
        .---.    O            |
      +-|22K|--O              |
      | '---'    O            |
      +--------O              |
      |          O            |
      |        O              |
      |          O------------|---------O 1
      |        O              |
      |          O            |
      |        O              |
      |          O------------|---------O 3
      |        O              |
      |          O            |
      |        O--------------|---------O 34
      |          O------------|---------O 33
      |        O-----------+  |
      |          O---------|--+
      |        O    .---.  |
      |          O--|270|--+
      |        O    +----. |
      |          O---|270|-+
      |     25 O     '---'
      |          O---------+
      |           13       |
      | .---.              |
      +-|22K|--------------+
        '---'
Propably the easiest way to make this connection is to sacrifice a 40-lead flat cable, like the ones used for IDE disks in PC's. Cut off a piece of about 15 cm with the 40-pin connector. This connector fits in JP1 of the LocoIO board, but 4 wires (37..40) remain unused. Take by preference the side of which wire 1 (pin 1) of the flat cable fits most easily in pin 1 of JP1 on the LocoIO board with the cable pointing 'outside' of the LocoIO board. Wire number 1 is mostly marked contrasting with the rest of wires of the flat cable. The other wires are numbered in sequence and correspond to the pin numbering of JP1 of LocoIO. Wires 37..40 remain unused.
Solder the 25-pins male D-connector on the other side of the flat cable. A small piece of strip-board may help as enforcement of the wiring.

See this photograph as example of such a connection. This picture shows some extra connections than described above and some LEDs. These are not needed for normal use, I added these for debugging purposes! From top to bottom these are:

   red:    RB7
   green:  RB6
   red:    +5V from LPT port (databit 0)
   yellow: RB3
   red:    +5V from LocoIO board (JP1.35/36)

Between this adapter-cable and the parallel port of your system you need another cable. A universal 25-wire one-to-one (flat) cable, 25-pin female on one side and 25-pin male on the other side, will do. Not all wires are required. If you make your own cable make sure at least pins 1, 5, 7, 9, 10, 11, 12, 13, 15, 16, 21 and 22 are wired.

WARNING: The parallel port of the PC is rather sensitive. Check the wiring before connecting. For lowest risk of damage to your computer connect the cable when both computer and LocoIO are powered off. And disconnect LocoIO from LocoNet.
The author does not accept any responsibility for damage to your equipment!

An alternative is to use a device (adapter) to galvanically separate the parallel port of your computer and LocoIO with opto-couplers. For a possible solution see the S88LPT package on my homepage. Although this adapter was designed for another purpose I have used it successfully to program LocoIO! This adapter could be powered easily by LocoIO.

For more information about parallelport wiring see a notice of Tomi Engdahl
A great source of information with repect to control of PC ports in general is the site of Graig Peacock.

Installation of Software

The Jisp executables come in a single ZIP-archive JispXY.ZIP, in which 'X' and 'Y' are version digits. UnZIP the archive in a separate directory. Check the file Packing.Lst if the archive was complete. For your convenience you may add your hex file(s) to this directory too. The Java sources and makefile are packed in file JispSrc.Zip.

Start and operations

Jisp can be started in a number of ways. Its depends on your system environment and personal taste which method will suite you best.

After startup Jisp will open dialogs for: You will be informed about when to change JP4 and JP5 of LocoBuffer. With LocoIO no manual intervention is required during the programming process.

A file 'Jisp.pro' is used to store the user selection of hex file and port. The stored values will be used as default selections the next time Jisp is started. This simplifies batch-like updating of multiple LocoIO boards, especially when the hex file is not in the current directory.
Note: Although the fully qualified name of the hex file is stored and used, only the simple <filename.ext> is shown in the dialog window as default selection.

Log information

The optional Jisp log may be useful when you are interested in the details of the transfer of the hex file to LocoBuffer or LocoIO. The log shows address, opcode, data (if applicable) and a brief description.

addr
Hexadecimal value of the destination of the data. It is the word location of the PIC, not the byte location as in the hex file.
opc
Hexadecimal value of the command code.
data
Hexadecimal value of the data. With a 'Load Data for Program Memory' command the 14 least significant (rightmost) bits are transmitted, with a 'Load Data for Data Memory' command the 8 least significant bits are transmitted.

Known problems

OS/2 Warp

None.

Windows

None.

Linux

No reports received yet.

Mac

No reports received yet.

Disclaimer

Jisp works for me on a PC with Pentium-III 450 MHz with OS/2 Warp 4 and Java 1.1.8 with the Java extensions Swing and JavaComm.
Jisp is the first Java program I ever published, it is not necessarily a good example!

Acknowledgements

Bob Jacobson for the initial design of the graphical user interface.

Comments and Feedback

Please report (to me privately or in LocoNet_Hackers mailing list) in which environment you used Jisp (un)succesfully. Send bug reports or detailed comments per E-mail to the author of Jisp.

Summary of changes

Version

0.2
0.3
0.4
0.5
0.6
0.7

End of Jisp documentation