[Date Prev][Date Next][Thread Prev][Thread Next] - [Date Index][Thread Index][Author Index]

Re: FT-847 frequency readback CAT command?



On Monday 14 January 2002 14:19, Fernando Mederos wrote:

>     Anybody knows what are the CAT commands to read the VFOs from the
> FT847?

Yes...here's code fragments from some work of mine. 

     /* getFreq-- get current frequency and mode
     *
     *  CAT command word: xx xx xx 0x03 get main VFO freq/mode
     *  CAT command word: xx xx xx 0x13 get sat RX VFO freq/mode
     *  CAT command word: xx xx xx 0x23 get sat TX VFO freq/mode
     *           reply is: Q1 Q2 Q3 Q4 MM
     *                    Q1-Q4:freq 
     *    Q1-Q4  are frequency in a goofy nybble-oriented BCD
     *     e.g.  to set 432.2705 MHz send "43 22 70 50"
     *                       MM:mode  
     */
    byte     LSB      = 0x00;
    byte     USB      = 0x01;
    byte     CW       = 0x02;
    byte     CWlsb    = 0x03; 
    byte     AM       = 0x04;
    byte     FM       = 0x08;  
    byte     CWnar    = (byte) 0x82; 
    byte     CWnarlsb = (byte) 0x83;
    byte     AMnar    = (byte) 0x84;
    byte     FMnar    = (byte) 0x88;


   I used something like the following Java hack to decode the 
frequency:

	/**
	 * unpack FT-847 freq into int: 10's of Hz
	 **/
   int unpackFreq( byte input[])
		{
		int freq;
		freq =        (int)((input[0] & 0xf0) >> 4) * (int)1e7;
		freq = freq + (int)(input[0] & 0x0f)        * (int)1e6;
		freq = freq + (int)((input[1] & 0xf0) >> 4) * (int)1e5;
		freq = freq + (int)(input[1] & 0x0f)        * (int)1e4;
		freq = freq + (int)((input[2] & 0xf0) >> 4) * (int)1e3;
		freq = freq + (int)(input[2] & 0x0f)        * (int)1e2;
		freq = freq + (int)((input[3] & 0xf0) >> 4) * (int)10;
		freq = freq + (int)(input[3] & 0x0f); 
		return freq; 
        	}

 73 de Maggie K3XS
    
-- 
-----/___.   _)   Margaret Stephanie Leber    / "The art of progress  /
----/(, /|  /| http://voicenet.com/~maggie   / consists of preserving/
---/   / | / |  _   _   _    `  _AOPA 925383/ order amid change and /
--/ ) /  |/  |_(_(_(_/_(_/__(__(/_  FN20hd / change amid order."   /
-/ (_/   '  K3XS  .-/ .-/    ARRL 39280   /___ --A.N.Whitehead ___/
/____ICQ 7161096_(_/_(_/__AMSAT 32844____/ <maggie@voicenet.com>

----
Via the amsat-bb mailing list at AMSAT.ORG courtesy of AMSAT-NA.
To unsubscribe, send "unsubscribe amsat-bb" to Majordomo@amsat.org



AMSAT Top AMSAT Home