DSWTUN95 release 4.02 A Windows-based application for tuning a DSW-X0 transceiver via a PC printer port or non-printer parallel port by William K. Mabry, N4QA, updated 11 May 2003 This simple application runs under Microsoft Windows 95 through XP. About the downloadable files for DSWTUN95: dswtun95.exe : This is the file produced by the Microsoft Visual Basic 5.0 Integrated Development Environment when compiling my source code. inpout32.dll : This is a freeware dynamic link library (dll) file, courtesy LOGIX4U. This file allows direct programming of a PC's I/O ports (in this case, a printer port or a non-printer parallel port). Visual Basic 5.0 does not have such capability without this (or similar) file. Winhrt32.dll: This is a file for which I purchased a license to use and to distribute freely. A component of ExacTicks, this and other files are also available from Ryle Design. Use of this file allows precise timing of the pulses for the simulated two-phase encoder outputs. Delay routines in the low-microsecond range are possible with this file. Download the required files into a folder of your choosing. You may wish to drag a shortcut for dswtun95.exe to your desktop. Note: All programs written from within the VB5 IDE also require the file MSVBVM50.DLL . This file should be included with your licensed copy of Microsoft Windows. Interfacing the DSW-X0 to the PC: Leave the DSW-X0 powered down for now. NOTE: The following interface information applies only to the original DSW-series transceivers, produced from years 1999 to 2001. A) Interfacing to a standard, uni-directional ( 25-pin IBM PC/AT style ) printer port: Printer port, Pin 1 to DSW-X0, J1, pin 1 Printer port, pin 4 to DSW-X0, J1, pin 2 Printer port, pin 5 to DSW-X0, J1, pin 3 Printer port, pin 24 to DSW-X0, J1, pin 4 (circuit common) Printer port, pin 14 to DSW-X0, J2, pin 1 B) Interfacing to a non-printer parallel port: DSWTUN95 currently supports the use of three consecutively addressed output ports having no inverted bits, beginning either at address 264 or address 4264, base ten, and connected strictly in the following manner: Port 265 or port 4265, bit 0 to DSW-X0, J1, pin 1 Port 264 or port 4264, bit 2 to DSW-X0, J1, pin 2 Port 264 or port 4264, bit 3 to DSW-X0, J1, pin 3 Circuit commmon to DSW-X0, J1, pin 4 Port 266 or port 4266, bit 0 to DSW-X0, J2, pin 1 To effect a small measure of protection for the port output drivers, I have inserted separate 1k ohm resistors in series with each of the interface wires listed in A) and B), above, EXCEPT circuit common. Using the program: Once all files are in place and you've started DSWTUN95, you should be presented with a screen similar to that shown on my webpage with some minor differences. The very next thing you should do is to select either the correct printer port base address or one of the only currently available non-printer parallel port base addresses, 264 or 4264, from the combo box at the far bottom-right. Many PC clones use printer port base address 888. Many genuine IBM PCs use printer port base address 956. All port base addresses listed herein are expressed in base ten. Next, the correct selection for the encoder firmware in the PIC inside your DSW must be made in the combo box just left of the address combo box. For DSWs delivered before October, 2000, select 1. For those delivered post-October, 2000, select 2. The requirement for making this selection was brought about by the use of differing encoder designs by Small Wonder Labs over the lifetime of the DSW-series because of availability / cost issues. Click on the selection that represents your model of DSW, for example DSW-40. Disconnect the 'normal' rotary encoder cable's plug from DSW-X0, J1. Ensure that the DSW's RIT switch remains in the 'off' position. Power-up your DSW...then, connect the PC-to-DSW interface wires: The above sequence ensures frequency synchronization between DSW-X0 and program and may easily be accomplished by employing a 4-pole on/off switch and another four-position plug, similar to the one used by the encoder's cable. NOTE: Three of the wires being switched are the ones which connect to DSW-X0, J1, pins 1,2 and 3. The fourth wire being switched connects to DSW-X0, J2, pin 1 or, more easily, to the terminal of the RIT switch which is wired to DSW-X0 J2, pin 1. The remaining wire, (circuit common, DSW-X0, J1, pin 4) is not switched and may be connected in permanent fashion. I am now using Digi-Key p/n CKN1137-ND , a C&K 4PDT on-off-on mini-toggle switch, on the DSW-X0's front panel for switching between 'normal encoder tuning' and 'PC tuning'. I have also mounted a Digi-Key p/n 275-1102-ND 5-pin Mini-Din receptacle, which includes six-inch leads, on the DSW-X0's rear panel. One choice of mating plug for this receptacle is Digi-Key p/n CP-2050-ND. These modifications facilitate easy transfer between 'stand-alone' and 'PC' operating modes. WARNING: Be careful not to zap your printer port / non-printer parallel port or your DSW with static charges, other over-voltage hazards or short-circuits or other over-current conditions. Some persons may prefer to use electronic buffering between PC and DSW... opto-isolation etc. Your DSW should now respond to mouse-clicks on the various command buttons etc. The text box which is located immediately to the left of the encoder firmware selection combo box, contains a representation of the static Gray code which is present at the simulated encoder outputs at the end of each tuning instance. For type 1 encoder firmware, this code should always be either 00 or 11. For type 2 encoder firmware, the code should always be 11. When powering-down your DSW and/or PC, it's best to disconnect interface wiring first, leaving circuit common connected. This may be done by setting the interface wires' switch to 'off'. Be careful to never transmit outside your authorized amateur frequency allocations. Note: The 'High' Step speed option for DSWTUN95 will not work unless changes are made to the firmware inside the DSW's PIC. The original PIC firmware limits the rate at which a DSW may be tuned to approximately 2 MHz per minute for type 1 encoders...1 MHz per minute for type 2 encoders. I have no connection with any above-mentioned vendor.