- Published: Tuesday, 16 February 2010
- Written by Graham Mitchell
- Hits: 14295
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
- Running frequency: 915M，2.5K Frequency Step.
- 64 channels setting, non-volatile on power off, Transmitting power: 7dBm
- Receiving sensitivity: －109dBm
- Modulation method: FSK
- Receiving method: Zero IF digital receiving
- Airborne speed rate: 300－19200bps
- Serial port speed rate:19200bps
- Transmitting current: 20－30mA（including MCU）
- Receiving current: 15－20mA（including MCU）
- Standby current: <1uA
- Running voltage: 2.8-3.3V
- Communication distance: 250－350m（Notes: the maximum communication distance correlates with environment, antenna form and communication speed rate).
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:
|1||Vcc||Positive voltage supply (3.3V)|
|3||RXD||Outgoing UART data (transmit)|
|4||TXD||Received UART data|
|5||Enable||Standby mode control|
|6||Busy||Busy indicator (TX/RX in progress)|
|8||Set F||Used for changing frequency|
Now to initialise the module with the PIC program. Here's a guide;
- Transceiver (known as TXR herewith) Enable pin should be pulled low (can be permanently pulled low for constant operation).
- TXR Set Frequency pin should be pulled high (can be permanently pulled high for constant operation).
- Busy pin made an input.
- Configure PIC UART to operate at 19200 baud (True, 8 data bits, 1 start bit, 1 stop bit.... All default settings for the Hardware USART module in Swordfish, excluding baud speed).
- 3.3V operation. Do not connect or interface with direct 5V. Use any 18LFxxx PIC (low voltage type), or level shifting circuitry.
- The TXR Enable pin controls the modules power state. When pulled low the TXR is ON. When pulled high the TXR will enter STANDBY mode (extremely low current consumption).
- The TXR Set Frequency pin should ONLY be pulled low during a special sequence. You could inadvertently hop frequencies with this pin not pulled high during normal operation.
- The TXR Busy pin is required for polling the TXR to ensure its ready to transmit. This connection is not required for RECEIVE ONLY configurations.
Once initialised, transmitting data is quite simple;
- Ensure TXR Busy pin is HIGH (indicates the module is free to transmit - no incoming/outgoing packets).
- Send UART data to TXR RXD pin (that's right, data is sent to the RXD pin on the TXR).
- Wait for 15mS (module will send data automatically after a 10mS delay - 15mS is the recommended wait time).
- Be sure to connect the UART TX pin of the PIC to the RXD pin on the TXR module.
- The TXR module has a 63 byte transmit buffer. You can send 1 byte or 63 bytes - anything after this will be ignored.
- Once data is sent to the TXR, the 15mS delay will initiate the transmit.
- The TXR Busy pin will go high for the duration of the transmit.
- The TXR Busy pin can drive loads upto 20mA. This allows an LED with series resistor to be connected to it. The LED will flash when TX/RX wireless data.
Even easier then transmitting, receiving goes like this;
- Received wireless data will be transmitted from the TXR TXD pin.
- Use the hardware UART module/library to ensure no lost/corrupt data.
- That's about it.
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.
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;
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;
Latest Development Board Revision
Download ISIS, ARES and Swordfish Programs here.
Please share thoughts, comments and feedback!