Programming the Spectrograph Mechanical Controller
Development:
- Setup the Gateway 2000 Liberty laptop.
- Connect the RS-232 <-> RS-485 converter to the laptop.
Find the black cable with a DB-25 on one end and a short
and long DB-9 cable extending from it. The long DB-9 cable,
marked "PC" connects to the RS-232 port on the back of the laptop.
- Turn off and open the spectrograph mechanical controller. Remove
the specMech EPROM and install the "LD DYNAMIC C 2.60" EPROM in
its place. Be sure that pin 1 is correctly oriented and the two
rows of pins next to pin 1 are empty.
- Connect the multi-colored ribbon cable to the RS-232 <-> RS-485
DB-9 jack. Connect the other end of the cable to the DB-9 on
the front panel of the spectrograph mechanical controller.
- Plug in the power supply for the RS-232 <-> RS-485 convertor.
- Double click on the "DCW" icon on the desktop of the PC. If
all is functioning properly, the target microprocessor should
initialize, leaving you with a blank work space.
- Open the specMech.c source file. Choose the toolbar option and
the menu item "Open". The working directory for
specMech is located in D:\work\specMech. There is a shortcut
to the directory on the desktop. You should place all specMech
files there, whether they are copied sdsshost <-> laptop via ftp
or floppy disk.
- To create a programmer file, choose the toolbar option "Compile"
and the menu item "Compile to file".
- To test the code, choose the toolbar option "Run" and the menu
item "Run".
- To exit the program, choose the toolbar option "File" and the
menu item "Exit".
Programming:
- If the floppy drive is connected, disconnect it and connect the Pocket
Programmer to the parallel port on the back of the laptop.
- Plug in the power supply to the programmer and then into the AC outlet.
- Place a 27C512 EPROM in the programmer as shown on the top of the programmer.
- Copy the file "specMech.bin" created above in the working directory to
"C:\".
- Either double click on the "Pocket Programmer" icon on the desktop of
the PC or open a DOS window and run "C:\PocketProgrammer\eprom". If
all is functioning properly, you will get a menu of possible EPROMs to use.
- Select item (12 - 27C512 (12.5V) 64K X 8).
- Make sure the EPROM is blank by selecting (1 - (B)lank Eprom Check) from
the menu.
- Load the "specMech.bin" file by selecting (14 - (L)oad Buffer from Disk)
from the menu. The "Path name" is "\".
- Program the EPROM by selecting (2 - (P)rogram Eprom from Buffer) from the
menu. Depress the "Shift" key while programming.
- Verify that the EPROM was correctly written by selecting
(3 - (V)erify Eprom to Buffer) from the menu.
- Remove the EPROM and repeat steps 7 through 10 as needed.
- Exit the program by selecting ( 0 - Quit) from the menu.
- Label the written EPROM(s) with "specMech", the date and the tagged version.
Version 1.1 July 17, 2002, Jon Brinkmann