#qcx #cat T1.03y beta for CAT control #qcx #cat


Hans Summers
 

Hi all

I have uploaded a beta for 1.03y, with revised CAT control functionality. There is now a 44-character circular buffer on the serial data output, data is fed out to the serial in a low priority asynchronous non-blocking task so it should not interfere with the keyer responsiveness. Baud rate is still 9600bps.

AX: Get/set Aux bits (LCD D6/7) and FREQ, DVM (get only)
IF: Get transceiver information (TS-480/Elecraft K2 format)
FA: Get/set VFO A
FB: Get/set VFO B
FR: Get/set Transmit VFO Mode: 0 = VFO A; 1 = VFO B; (2 = Split only for Set)
FT: Get/set Receive VFO Mode: 0 = VFO A; 1 = VFO B; (2 = Split only for Set)
FW: Get filter bandwidth; always returns 0200
ID: Get radio ID: 020 (Kenwood TS-480)
MD: Get operating mode; always returns 3 (CW)
RD: Set negative RIT offset amount
RT: Get RIT status: 0 = RIT off, 1 = RIT on
RU: Set positive RIT offset amount
SM: Get S-meter value
TQ: Get/set transmit state: 0 = RX, 1 = TX

Note that there are now several additional commands based on some suggestions received. The command set is still based on FT-480 (which is similar to Elecraft K2) but with a few minor differences. See reference https://www.kenwood.com/i/products/info/amateur/ts_480/pdf/ts_480_pc.pdf and https://ftp.elecraft.com/K2/Manuals%20Downloads/KIO2%20Pgmrs%20Ref%20rev%20E.pdf Some comments on additional CAT command functionality in T1.03y since the previous beta (T1.03z):
  • you can now cause transmission by using the TQ1; command, to key-down. Note that the actual paddle key plugged in is then ignored until a TQ0; command releases the key or until someone at the radio goes into the menu and exits it. 
  • You can now SET the VFO mode in FR and FT commands, to A (0), B (1) or Split (2). This is not exactly consistent with FT-480 set because in the FR is the Receive VFO and FT is the Transmit VFO; so for the "SET" versions of these commands I have made them consistent with the QCX interpretation; that is, either of these commands in SET mode will set the VFO mode to A, B or Split (0, 1, 2 resp). 
  • RD command now sets a negative RIT amount (down) e.g. RD100; will set RIT to -100. RIT would be cleared completely by RD0; (set RIT to zero). 
  • RU command now sets a positive RIT amount (up) e.g. RU200; will set RIT to +200. RIT would be cleared completely by RU0;
  • New AX command (not part of TS-480 commandset). This is similar to the Ulimate3S "Aux" function, it allows you to set the LCD_D6 and LCD_D7 pins for use controlling external equipment e.g. relays etc. You cannot set the D4 and D5 LCD pins because these are used for the serial port communication. The AX value may be set to 0, 1, 2 or 3; the two bits D0 and D1 map to LCD_D6 and LCD_D7 respectively. E.g. the command AX2; will set LCD_D6 low (0V) and LCD_D7 high (+5V). The "GET" version of the AX command reads back the AX value you wrote, and additionally adds values read from the FREQ and DVM pins; The value of "FREQ" is 32 (if FREQ is high) and the value of DVM is 4 (of DVM is high); therefore for example if the Get command AX; is executed and returns value 34; what this would mean is that the AX value 2 (you set before) is added to 32 (because 32 + 2 = 34) and this means that the FREQ pin is high and the DVM pin is low. So the new "AX" commands provides you effectively with two general purpose INPUTS and two general purpose OUTPUTS. Note however that microsecond glitches exist on the LCD_D6 and LCD_D7 signals when the LCD is written; furthermore the DVM, RF Power and Frequency Counter facilities would naturally not be used in conjunction with the CAT AX function. 
  • SM command (S-meter) returns a number from 0 to 16383 inclusive, which represents the magnitude of the S-meter reading. 
Note that the CAT control commands do not perform a huge amount of error checking for nonsensical values, there simply is not enough program space available! Nevertheless it should not be possible to get in any serious trouble. Also note that the serial port is not available when the LCD is written. If the PC happens to write to send CAT commands to QCX at the same time as the LCD is being written, data is liable to be corrupted. Switching off S-meter and CW decoder off would minimize the probability of this happening. 

A further enhancement in this version is a realtime clock display, you can enable this in menu "7.9 Clock". This shows a 24-hour UT clock with format HH:MM in the bottom right corner of the display. If you use CW decoder, the number of characters available for display of decoded CW is reduced by 6 if you have enabled the clock. 

This clock does not retain its value when the QCX is powered down of course. But I have made this easier too. Now you can connect the GPS at any time; after a short spurious key-down the QCX will automatically detect the serial data stream (as introduced in version 1.02) and will switch automatically to "Practice Mode" and a 'P' appears in the display, to the right of the VFO frequency. 

But now there is additional functionality - as well as detecting the serial data stream, the QCX now also parses it, as it would do in the beacon function. So if there is valid GPS satellite lock, the QCX will parse the time from the GPS serial data stream and will set the realtime clock accurately. You can then unplug the GPS and after a short time the QCX will auto-detect the absence of 9600-baud keying and will automatically switch off practice mode so that you can use the radio. 

I intend to put a GPS socket on the back of my 40m QCX project here, and another switch on the front panel. If the GPS is powered from another source (mine is, in the shack) then you need only connect the Ground and Serial data signal. Then a simple switch can be used to connect the GPS serial data to the corresponding QCX pin. So my use case will be, I switch on my QCX to do some operating. Then I push the GPS switch for a second or two, to get the time parsed and displayed in the bottom right of the QCX display. Since protective Practice mode is automatically engaged and then disengaged later when serial data is removed - no other actions are required. 

A final enhancement in this version is that now you can turn the keyer speed to zero, and the QCX will then operate in Straight key mode. If you want to operate Iambic normally, and want to temporarily key the transmitter for an antenna tuner etc., it is very quick to click the left button and turn the rotary encoder to zero speed, then operate the key for tune-up, then turn it back to your desired speed. It's less cumbersome than going into the Keyer menu and selecting Keyer Mode "Straight", doing the tune-up, then going in and setting it back to "Iambic". 

And... I did so many compression algorithms and other optimizations, that I have WSPR operational again in this beta, as well as having space for CAT and the other enhancements, and there is still 100 bytes free ;-)    The Flash memory only 99.7% utilized :-D

So please, interested parties, give it a try! Download here:


73 Hans G0UPL

Join QRPLabs@groups.io to automatically receive all group messages.