<!--
	Rig definition file for use with fldigi
	
	See separate rigxml.odt (Open Office Writer document) for instructions on creating or maintaining
	this file
-->

<RIGDEF>

<RIG>Kenwood TS-570</RIG>

<PROGRAMMER>
	Dave Freese		W1HKJ
	Tested by:		Bob Christenson, WU9Q
</PROGRAMMER>

<STATUS>
	Verified
	Version:	1.0
	Date:		2007 Jan 17
</STATUS>

<!--
	This XML file defines the rig/controller interface for
	    FREQ CONTROL
	    MODE CONTROL
	    PTT  CONTROL
	    
    No attempt to control or read filter bw from the 570 at this point in time
    The rig uses a combination of filter # and mode to specify an actual bandwidth
    For example:
        0000 = Narrow for SSB/AM/FM
        0000->0499 = 250 Hz for FSK
        0000->0079 = 50 Hz for CW
    Decoding this would take very specific code written in the C language and would defeat
    the purpose of a generic computer control algorithm.
-->

<TITLE>Rig Control - TS-570</TITLE>

<!-- Instructions for setting up the port
	BAUD     normal baud rate that transceiver operates at for CAT
	DEVICE   full path to the serial device
	ECHO     set to true for CI-V type of interface in which a h/w loop back sends all
	         outgoing data from Tx to Rx, or if the transceiver echos the data stream
	RETRIES  # times that the computer tries to send a command sequence before failure
	TIMEOUT  time in milliseconds between retries
	WAIT     time to wait between successive transmissions
	DTRINIT  inititialized state of the DTR pin, +/- 12 are valid entries.  This is the 
	         voltage level that will be available at the DTR pin.  For some CI-V type of 
	         interfaces this voltage may be used to power the serial converter
	DTRPTT   logic true or false designating whether the DTR pin is used for PTT.
	         PTT ON will toggle the DTRINIT state, ie: if +12 it goes to -12, if -12 it
	         changes to +12.
	RTSINIT  inititialized state of the RTS pin, same as for DTR
	RTSPTT   specifies whether the RTS pin is used for PTT, same logic as with DTR.
	RTSCTS   specifies whether hardware flow control is used with the radio
	         Many of the Kenwood rigs require RTS/CTS flow control.
	         Set to true to enable this type of control
	         NOTE: you cannot use both RTSCTS and RTSPTT.  If you set both to true the RTSCTS
	         flow control will have priority.
-->

<PORT>
	<DEVICE>/dev/ttyS0</DEVICE>
	<BAUD>4800</BAUD>
	<STOPBITS>2</STOPBITS>
	<ECHO>false</ECHO>
	<RETRIES>4</RETRIES>
	<TIMEOUT>200</TIMEOUT>
	<WAIT>0</WAIT>
	<DTRINIT>-12</DTRINIT>
	<DTRPTT>false</DTRPTT>
	<RTSINIT>-12</RTSINIT>
	<RTSPTT>false</RTSPTT>
	<RTSCTS>true</RTSCTS>
</PORT>

<MODES>
	<ELEMENT><SYMBOL>LSB</SYMBOL><BYTE>31</BYTE></ELEMENT>
	<ELEMENT><SYMBOL>USB</SYMBOL><BYTE>32</BYTE></ELEMENT>
	<ELEMENT><SYMBOL>CW</SYMBOL><BYTE>33</BYTE></ELEMENT>
	<ELEMENT><SYMBOL>FM</SYMBOL><BYTE>34</BYTE></ELEMENT>
	<ELEMENT><SYMBOL>AM</SYMBOL><BYTE>35</BYTE></ELEMENT>
	<ELEMENT><SYMBOL>FSK</SYMBOL><BYTE>36</BYTE></ELEMENT>
	<ELEMENT><SYMBOL>CW-R</SYMBOL><BYTE>37</BYTE></ELEMENT>
	<ELEMENT><SYMBOL>FSK-R</SYMBOL><BYTE>39</BYTE></ELEMENT>
</MODES>

<!-- lsb mode strings should match those given in the modes symbol specifier -->

<LSBMODES>
	<STRING>LSB</STRING>
	<STRING>FSK</STRING>
	<STRING>CW-R</STRING>
</LSBMODES>

<REPLY>
	<SYMBOL>MODE</SYMBOL>
	<SIZE>4</SIZE>
	<STRING>MD</STRING>
	<DATA>
		<DTYPE>BYTE</DTYPE>
		<SIZE>1</SIZE>
	</DATA>
	<STRING>;</STRING>
</REPLY>

<REPLY>
	<SYMBOL>FREQ</SYMBOL>
	<SIZE>14</SIZE>
	<STRING>FA</STRING>
	<DATA>
		<DTYPE>DECIMAL</DTYPE>
	    <SIZE>11</SIZE>
	    <MAX>99999999999</MAX>
	    <MIN>00001500000</MIN>
	    <RESOL>1</RESOL>
	</DATA>
	<STRING>;</STRING>
</REPLY>	

<COMMAND>
	<SYMBOL>SETFREQ</SYMBOL>
	<SIZE>14</SIZE>
	<STRING>FA</STRING>
	<DATA>
		<DTYPE>DECIMAL</DTYPE>
	    <SIZE>11</SIZE>
	    <MAX>99999999999</MAX>
	    <MIN>00001500000</MIN>
	    <RESOL>1</RESOL>
	</DATA>
	<STRING>;</STRING>
	<OK>FREQ</OK>
</COMMAND>

<COMMAND>
	<SYMBOL>GETFREQ</SYMBOL>
	<SIZE>3</SIZE>
	<STRING>FA;</STRING>
	<INFO>FREQ</INFO>
</COMMAND>

<COMMAND>
	<SYMBOL>SETMODE</SYMBOL>
	<SIZE>4</SIZE>
	<STRING>MD</STRING>
	<DATA>
		<DTYPE>BYTE</DTYPE>
		<SIZE>1</SIZE>
	</DATA>
	<STRING>;</STRING>
</COMMAND>

<COMMAND>
	<SYMBOL>GETMODE</SYMBOL>
	<SIZE>3</SIZE>
	<STRING>MD;</STRING>
	<INFO>MODE</INFO>
</COMMAND>

<COMMAND>
	<SYMBOL>PTTON</SYMBOL>
	<SIZE>3</SIZE>
	<STRING>TX;</STRING>
</COMMAND>

<COMMAND>
	<SYMBOL>PTTOFF</SYMBOL>
	<SIZE>3</SIZE>
	<STRING>RX;</STRING>
</COMMAND>

</RIGDEF>
