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

Re: pcr-1000

You must do all of the control from your program.  The radio
is totaly useless without the control software and once the
control software is terminated the radio will power down.
You need to maintain control by keeping your serial port active.
Once you have control you can then send the set freq command which
also sets the mode

static void xqr(char *s)  // sends a string to the radio at current baudrate
    char buf[299];
    static byte *p;

    p = (byte *)buf;
    while (*p) send_one(*p++);        // transmit the characters in the 

static void set_f_pcr1000(double freq)
    double ft;
    static long lfi;
    static long nfo;
    long fi;
    static int first = 1;
    char buf[99];
    static char afrq[99];
    char ac[99];

    if (first)   // initialise the radio first time thru
        first = 0;
        initialise_sio(ac,"9600");            // start at 9600
        xqr("H101"); Sleep(10);
        xqr("G105");        // set high rate
        initialise_sio(ac,"38400");        // switch to 38400

         //   k0MMMMkkkhhhmmff00  M MHz, k kHz, h Hz, mm mode, ff filter
         //   K00123456789010000
    //   xqr("K00015000000020100");        // set wwv at 15 MHz
         xqr("K00400100000010000");        // set orbcomm at 400.1
        xqr("J4380");   // if shift centered
        xqr("J4090");   // volume
    ft = correct(freq) * 1.0e6;
    ft += (double)rxoffset;     // apply rx offset
    fi = (long)(ft+0.5);
#if 1                            // round to rx resulution in Hz
    fi = fi/resolution;
    fi *= resolution;
    if (fi != lfi)        // the frequency has changed
        sprintf(afrq,"K0%010d010000",fi);        // make control string
        xqr(afrq);        // and send to radio
        lfi = fi;

Bob Bruninga wrote:

>On Sun, 10 Nov 2002, richard allen wrote:
>>only control is via the rs-232.  You need to actually power
>>up the radio at 9600 baud and then switch to 38400.
>Thats perfect, since my APRStk can only talk at 9600 baud... and I only
>need one command, and that is the SET FREQ comand, because, I am going to
>assume the user has already set it up for FM on the 2m or 70cm bands.

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