After a recent article from Jon Chandler, I thought it best to share my recent work on the Sure Electronics 915Mhz Wireless Transceivers.
Here's what one looks like from the box;

It's very important to note here that they come in a pair. That means 2xTransceivers and 2xOmni Antenna. At the time of purchase/writing this article, the modules cost US$17.72 a pair.
The datasheet can be downloaded here: GP-GC011
That's the product description out of the way, now to physically get it working. The datasheet does cover every aspect of operation, but lets consider the normal modes of operation, Initialise, Transmit, Receive.
The first stage of operation is initialising the module. Here's the pinout configuration for the transceiver:
| Pin # | Name | Description |
| 1 | Vcc | Positive voltage supply (3.3V) |
| 2 | GND | Ground |
| 3 | RXD | Outgoing UART data (transmit) |
| 4 | TXD | Received UART data |
| 5 | Enable | Standby mode control |
| 6 | Busy | Busy indicator (TX/RX in progress) |
| 7 | R/T | Not Used |
| 8 | Set F | Used for changing frequency |
Now to initialise the module with the PIC program. Here's a guide;
Notes:
Once initialised, transmitting data is quite simple;
Notes:
Even easier then transmitting, receiving goes like this;
Notes:
Naturally, a program says a thousands words. Consider the following TRANSMIT program;
Note: Program designed to operate with a 10Mhz external crystal. Also, there is some initialisation code for the development board I made which configures the MAX3223 interface - disregard if just using the TXR.
Device = 18F2620 Clock = 40 // clock configured to operate in HSPLL Config OSC = HSPLL // (10Mhz external oscillator) Include "USART.bas" // include the hardware UART library // user definable pinout Dim TXR_Enable As PORTB.0, // TXR Enable pin TXR_Busy As PORTB.1, // TXR Busy pin TXR_SETFREQ As PORTB.2, // TXR Set Frequency pin T1IN As PORTB.3, // Development board MAX3223 T1IN pin R1OUT As PORTB.4 // Development board MAX3223 R1OUT pin // some registers to send data with Dim PacketNumber As Word // init usart and TXR interface Sub TXR_Init() // setup the TXR module USART.SetBaudrate(br19200) // setup baud rate for 19200 Low(TXR_Enable) // Set TXR Enable pin low Input(TXR_Busy) // make TXR Busy pin input High(TXR_SETFREQ) // set TXR Set Freq high // set high impedance for MAX3223 interface (not in use) Input(T1IN) // only used if connecting to PC Input(R1OUT) // only used if connected to PC End Sub // main program start... TXR_Init // call init sub for TXR/Development Board DelayMS(200) // allow circuit to stabilise PacketNumber = 0 // reset the variable While True // main program loop If TXR_Busy = 1 Then // ensure TXR is not busy (high = not busy) USART.Write("Online") // send a string USART.Write(PacketNumber) // send a word type variable EndIf Inc(PacketNumber) // increment the word type variable DelayMS(500) // delay for 500mS Wend
You can put the above code on a PIC & connect it to the TXR up to 300 meters away from your PC. If you have, put the following program onto the "Receive" PIC, and connect the PICKit 2 to PORTC.1 to read the incoming packet numbers;
Device = 18F2620 Clock = 40 // clock configured to operate in HSPLL Config OSC = HSPLL // (10Mhz external oscillator) Include "USART.bas" // include the hardware UART library Include "SUART.bas" // inlcude the software UART library (PICKit 2) Include "CONVERT.bas" // include the convert library // user definable pinout Dim TXR_Enable As PORTB.0, // TXR Enable pin TXR_Busy As PORTB.1, // TXR Busy pin TXR_SETFREQ As PORTB.2, // TXR Set Frequency pin T1IN As PORTB.3, // Development board MAX3223 T1IN pin R1OUT As PORTB.4 // Development board MAX3223 R1OUT pin // some registers to send data with Dim PacketNumber As Word // init usart and TXR interface Sub TXR_Init() // setup the TXR module USART.SetBaudrate(br19200) // setup baud rate for 19200 Low(TXR_Enable) // Set TXR Enable pin low Input(TXR_Busy) // make TXR Busy pin input High(TXR_SETFREQ) // set TXR Set Freq high // set high impedance for MAX3223 interface (not in use) Input(T1IN) // only used if connecting to PC Input(R1OUT) // only used if connected to PC UART.SetTX(PORTC.1) // define PORTC.1 as the PICKit 2 UART interface UART.SetMode(umTrue) // change mode to true UART.SetBaudrate(sbr38400) // set baud rate to 38400 End Sub // main program start... TXR_Init // call init sub for TXR/Development Board DelayMS(200) // allow circuit to stabilise While True // main program loop USART.WaitForStr("Online") // wait for the string "Online" USART.Read(PacketNumber) // grab the word type variable that follows // display with SOFTWARE UART (in this case, connected to the PICKit 2) UART.Write("Data RXD: ",DecToStr(PacketNumber),13,10) Wend
Here's the above two programs physically loaded onto development boards;

Note: The development boards are actually slightly different as they have undergone minor updates with each revision.
Both boards are powered up and operating in the above picture, here's what the PICKit 2 output looks like from the "Receive" board;



Download ISIS, ARES and Swordfish Programs here.
Please share thoughts, comments and feedback!