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

Re: pcr-1000



Thanks!
Bob

On Sun, 10 Nov 2002, richard allen wrote:

> 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;
>
>     strcpy(buf,s);
>     strcat(buf,"\r\n");
>     p = (byte *)buf;
>     while (*p) send_one(*p++);        // transmit the characters in the
> string
> }
>
> 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;
>         sprintf(ac,"%d",rxcommport);
>         initialise_sio(ac,"9600");            // start at 9600
>         atexit(close_tty);
>         xqr("H101"); Sleep(10);
>         xqr("G300");
>         xqr("G105");        // set high rate
>         Sleep(500);
>         close_tty();
>         initialise_sio(ac,"38400");        // switch to 38400
>         xqr("G300");
>
>          //   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;
> #endif
>     if (fi != lfi)        // the frequency has changed
>     {
>         sprintf(afrq,"K0%010d010000",fi);        // make control string
>         xqr(afrq);        // and send to radio
>         lfi = fi;
>         nfo++;
>     }
> }
>
> 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.
> >
> >Thanks!
> >Bob
> >
> >
> >
>
>

de WB4APR@amsat.org, Bob

PCsat WEB  page     http://www.ew.usna.edu/~bruninga/pcsat.html
ISS-APRS FAQ:       http://www.ew.usna.edu/~bruninga/iss-faq.html
CUBESAT Designs     http://www.ew.usna.edu/~bruninga/cubesat.html
APRS LIVE pages     http://www.ew.usna.edu/~bruninga/aprs.html
APRS SATELLITES     http://www.ew.usna.edu/~bruninga/astars.html
MIM/Mic-E/Mic-Lite  http://www.toad.net/~wclement/bruninga/mic-lite.html

----
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