Site Provided by VE5KC & Kteck Webs

EXTFSK


EXTFSK is a user-customizable PTT/FSK API of MMTTY. It gives a means of interfacing to a Windows DLL, which works just like a plug-in module.

JE3HHT Mori-san offered a very good example of code for EXTFSK that was called COMFSK. (The name has been changed to ExtFsk106) With the COMFSK plug-in, you can do PTT/FSK through legacy serial port, USB-serial adapter, or legacy parallel port (USB-parallel adapter not supported). See below for the file download.

If you are using Windows 2000 or XP, you need the DLPORTIO driver. If you are using Windows 98 or ME, you do not need the driver. Read the document included in the COMFSK package for more information.

Mori-san has declared that all the files including source codes in the COMFSK package can be copied, modified, used for commercial and non-commercial use. What a bonus!

Parallel port interface

This is a sample circuit diagram of the parallel port FSK interface.

FSK Interface


Serial port or USB?

Many recent laptop PCs do not have a serial port. That is bad news for radio amateurs, because many ham software use the serial port for PTT, FSK, and rig control. Instead of the serial port, modern PCs invariably have USB ports. OK, how about a USB serial adapter? Yes, you can use one for PTT and rig control. However, most USB serial adapters do not work for FSK,. It's because they do not support 45 baud rate, which is too slow. It's also because they do not support the 5-bit data mode.

If you want to use a USB serial adapter, go with COMFSK plug-in. I use COMFSK to do PTT and FSK through the parallel port. It is working pretty good.

73 de JA7UDE Oba

See below for additional information and Download

* Note: with the new release the file name was changes from Comfsk to ExtFsk.

Latest Version is ExtFsk106.


=====
What's New Version 106
=====

(With this release the file name was changes from Comfsk to ExtFsk.)

ExtFSK106 - supports up to COM16.

=====
Introduction
=====

EXTFSK.DLL is an MMTTY extension that interfaces MMTTY to a user-made hardware device.
With EXTFSK.DLL included in this sample package, you can do the FSK keying and PTT control by using:
(1) The legacy parallel port (USB-Parallel converter is not supported).
(2) The legacy serial port
and
(3) USB serial adapter.

This package includes EXTFSK.DLL and its source code files, so that you could make your own EXTFSK.DLL by referring to the source codes.

For FSK keying, MMTTY has been using the UART (baud rate generator in the serial port hardware). This sample DLL, on the other hand, uses the multimedia timer of Windows, and the FSK keying is fully controlled by software. The FSK signal can be output not only from TXD but also from RTS or DTR of the serial port, and data or strobe of the parallel port. The signal polarity can even be reversed.

The timing accuracy depends on the multimedia timer and the CPU performance, but I think the recent high-performance CPU would offer feasible results. According to my experiences, the jitter was about 1 msec for 165 msec code duration using Celeron 1.06GHz on Windows XP. Several JA HAMs on the Japanese MMHAMSOFT reflector reported that they successfully made the USB-serial adaptor and the legacy parallel port work for the FSK keying and PTT control.

=====
Installation
=====
If you use the parallel port for FSK keying and/or PTT on Windows NT, 2000, or XP operating system, you have to install
TDLPortIO. See the next section for more information.

The installation procedure is:
1) Place EXTFSK.DLL in the same directory where MMTTY.EXE is installed.
2) Open the TX page of MMTTY Setup window. Select EXTFSK from the drop-down list of PTT port.
3) Open the Misc page and select Sound+Com TxD (FSK) or Com Txd (FSK) at the TX port pane.
4) Push USB button and select A: Normal.
You will have a small EXTFSK window popped up.
5) Select a COM or LPT port from the Port drop-down list. EXTFSK shows the status of the port that you have selected. If the status is NG, you should select another port.
6) Select the signals for FSK and PTT outputs.
7) To reverse the signal polarity, check Inv. FSK or Inv. PTT check boxes.
8) After setting the signal and polarity, you can push [...] button at the top right corner of the window to make it minimized.

=====
FSK and PTT through parallel port
=====
The sample EXTFSK uses TDLPortIO to access the I/O registers of the parallel port.

TDLPortIO is freeware. Download it here:Â TDLPortIO - (TDLPortIO.zip 868KB)

Unzip the downloaded file. Copy three files, Dlportio\dll\TDLPortIO.dll, Dlportio\DriverLINX\drivers\DLPORTIO.dll, and Dlportio\DriverLINX\drivers\DLPORTIO.sys to the directory in which MMTTY is installed.

=====
Usage notes
=====
1) This program uses a function call (EscapeCommFunction from TimeProc), which is not guaranteed in Windows API. This sample is working good on my PCs with Windows 2000 and Windows XP, but I am not sure if it works on every PC.
2) The timing of the generated FSK keying is dependent on the accuracy of the multimedia timer call-back function and the CPU performance.
3) This program generates only 45.45 Baud and 1.5 Stop bit protocol.
4) The source code is written by using C++Builder Version 3.0. You can modify or redistribute it without notifying me.

=====
Interface to MMTTY
=====
EXTFSK.DLL must export the following five functions:

extern "C" LONG __declspec(dllexport) __stdcall extfskOpen(LONG para)
extern "C" void __declspec(dllexport) __stdcall extfskClose(void)
extern "C" LONG __declspec(dllexport) __stdcall extfskIsTxBusy(void)
extern "C" void __declspec(dllexport) __stdcall extfskPutChar(BYTE c)
extern "C" void __declspec(dllexport) __stdcall extfskSetPTT(LONG tx)

Each function must comply with __stdcall call function (stack is adjusted on the called function side). The function name could be preceded by one underscore (_). For example, if MMTTY fails to find extfskOpen(), it then looks for _extfskOpen().

-----------------------------
LONG extfskOpen( LONG para )
-----------------------------
Parameters
   Upper 16 bits of para:   Speed (45 for example)
   Lower 16 bits of para:   b1-b0   Stop (0-1, 1-1.5, 2-2)
               b5-b2   Length (5, 6, 7 or 8)
Returned value
   TRUE = succeeded
   FALSE = failed
Note
   This function opens the port. Even if Stop 2 is specified, open with Stop 1.5. The sample code ignores the parameters and always opens with Baud = 45.45 and Stop = 1.5.

-------------------------
void extfskClose( void )
-------------------------
Note
   This function closes the port.

----------------------------
LONG extfskIsTxBusy( void )
----------------------------
Returned value
   TRUE = Buffer is full
   FALSE = Buffer is not full
Note
   This function returns the buffer status, that is, full or not full. For clean diddling, keep the buffer length as small as possible. For making continuous transmission, however, the buffer should have at least one slot capacity. The sample code has one slot for the buffer.

------------------------------
void extfskPutChar( BYTE c )
------------------------------
Parameter
   c: TX data
Note
   This function writes a byte data to the buffer. Before writing the data, MMTTY always calls extfskIsTxBusy() to see if the buffer can accept the new data.

-----------------------------
void extfskSetPTT( LONG tx )
-----------------------------
Parameter
   tx b0: 0 ? Switch to RX, 1 ? Switch to TX
   tx b1: 0 ? Not scanning RX image, 1 ? Scanning RX image (MMSSTV only)
Note
   This function makes and breaks PTT. MMTTY uses bit 0 only. MMSSTV set bit 1 while it is scanning a RX image if RTS while scan option is enabled.

73, Mako


Download: ExtFSK106.zip