Listing1—A simple RS-232-capable microcontroller and some just as simple code is all it takes to put the XTR-903-A4 on the air.

#include <16F84A.h>
#use delay(clock=20000000)
#fuses NOWDT,HS, PUT, NOPROTECT
#use rs232(baud=9600,parity=N,xmit=PIN_A2,rcv=PIN_A3,bits=8,stream=to_
radio)

#byte PORTB = 0x06
// Ping-pongs 0x41 between unit 1 and unit 2, and complements port B on both units with each transmission.
void main()
{
// Common code for both units
   int8 data;
   set_tris_a(0xFB);	
   set_tris_b(0x00);
// Unit 1 code
   while(1)
   {
    putc(0x41);
    while(!kbhit());
    data = getc();
    if(data == 0x41)
     PORTB = ~PORTB;
   } 
// Unit 2 code
   while(1)
   {
    while(!kbhit());
    data = getc();
    if(data == 0x41)
    { 
     PORTB = ~PORTB;
     delay_ms(1000);
     putc(0x41);
    }
   }

}