0% found this document useful (0 votes)
52 views

(RF Communication Release) 2010: WWW - Robosoftsystems.co - in

This document describes an RF communication module released in 2010 by Robosoft Systems. It has the following key features: - Operates at 2.4GHz with 255 possible channels and configurable device addresses - Can operate in either single byte transfer or packet mode, with packet sizes from 0 to 40 bytes - Includes configuration mode for setting parameters like device/channel IDs and baud rate using a GUI - Compact size and plug-and-play operation with on-board EEPROM for saving settings

Uploaded by

abcx397
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

(RF Communication Release) 2010: WWW - Robosoftsystems.co - in

This document describes an RF communication module released in 2010 by Robosoft Systems. It has the following key features: - Operates at 2.4GHz with 255 possible channels and configurable device addresses - Can operate in either single byte transfer or packet mode, with packet sizes from 0 to 40 bytes - Includes configuration mode for setting parameters like device/channel IDs and baud rate using a GUI - Compact size and plug-and-play operation with on-board EEPROM for saving settings

Uploaded by

abcx397
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

[RF Communication Release] 2010

-By Robosoft Systems

Features

2.4 GHz Carrier Frequency RS232 UART interface with variable baud rate Input supply voltage: 5V to 12V 255 possible Channels frequencies (0 to 255) Programmable Device Address (255 per channel) 2 run mode: Single Byte Transfer Mode and Packet Mode Variable Packet length (0 to 40 bytes) Standard configuration baud rate of 9600 User friendly GUI for setting up RF Module (through configuration mode) Compact Size, Out of Box: Plug and Play On Board EEPROM for saving settings

Jumper Setting
CONFIG MODE Closed : Configuration mode Open : Run mode PACKET MODE Closed : Variable Packet Length (with device address selection)* Open : Single Byte Transfer (Broadcast) (80msec delay between 2 char)

*Note: To switch between modes, you have to power on reset module

Page 1 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Jumper Setting Priority Jumper J1 Configuration Mode Jumper Higher Priority Jumper J2 Packet Mode/Single Character Mode Jumper Lower Priority
When both the jumpers are connected, by default, the J1 Jumper (Configuration Mode) Will have higher priority. The Module will still be running in packet mode, but as J1 jumper is connected, configuration mode will be active & the module is ready to receive configuration settings.

Page 2 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Configuring the RF Module


For entering Configuration, Power down the RF Module. Place the jumper J1, on the RF module Re-plug/ power-up the RF module Note:- These steps are to be followed while switching between Run Mode & Configuration Mode.

Test settings are as below: RF Module No. 1: 1) Device id 1 , 2) Channel id 0 , 3) baud rate 9600

Page 3 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems RF Module No. 2: 1) Device id 2 , 2) Channel id 0 , 3) baud rate 9600

Initial Checking for successful switch into configuration mode & confirming the settings for DiD, CiD & baud rate:
After having placed the Jumper J1, one can check whether the module has entered Configuration Mode by Issuing Shift + $ on any Terminal Software . Following are the screenshots for the same check for both the above configured modules.

Page 4 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

DiD CiD

Baud Rate

DiD CiD

Baud Rate

RF Module No. 1

RF Module No. 2

Following response is observed every time when the Module is in Configuration mode and is reset i.e. Power is replugged. Screenshot for the same is as below.

Remove the Jumper J1 and reset the module, The module has entered Run Mode correctly or not can be verified by following response on Hyper terminal. This response is observed every time when the Module is Run mode and is reset i.e. Power is replugged. Screenshot for the same is as below.

*Note:- While serial connection properly setup, and power to the module is resetted,
1st Character indicates whether the module is in Configuration mode or Run mode. 2nd Character indicates whether the module is in Single byte or Packet data transfer mode.

Page 5 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Single Character Mode Activation


Before entering the single character mode, jumper J1 needs to be removed while using the modules in packet Mode. Both, Jumper J1 and J2 are not needed while using Single Character mode. *Note:- In single character mode, all modules with the same Channel id will receive the data sent by any of the modules on that channel irrespective of device id. This is not true for Packet mode. After Single Character Mode is activation, open terminal. Create a connection with following settings: 1) Port Com1, 5) Parity None, 2) Baud rate 9600, 6) Stop Bit 1bit 3) Flow Control None, 4) Data 8bit,

Test Case 1: PC to PC Wireless communication in Single Character Mode using CC2500 based RF modules. Initial Settings for Test Case 1: Enter configuration mode using jumper J1 only. Configuration mode : Follow the steps over page 3, 4 & 5 to configure the module.
RF Module No. 1: RF Module No. 2: 1) Device id 1 , 2) Channel id 0 , 3) baud rate 9600 1) Device id 2 , 2) Channel id 0 , 3) baud rate 9600

Testing Communication between Modules: Once the 2 modules have been connected to 2 different PCs and are powered on with the terminal initialized on both of them, the connection may be tested. Any data transmitted from one PC will appear on the other PC, character by character. Check figure below for input and output on two different PCs.

Page 6 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Receive window of RF Module No. 1


RF Module No. 1

Transmit window of RF Module No. 1

Receive window of RF Module No. 2


RF Module No. 2

Transmit window of RF Module No. 2

Page 7 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Test Case 2: BOT to BOT Wireless communication in Single Character Mode using CC2500 based RF modules
The example shows the implementation of data transfer using the modules. The following code will allow LED1 of BOT1 to be synchronized with LED1 of BOT2.

Initial Settings for Test Case 2: Enter configuration mode using jumper J1 only. Configuration mode : Follow the steps over page 3, 4 & 5 to configure the module.
RF Module No. 1: RF Module No. 2: 1) Device id 1 , 2) Channel id 0 , 3) baud rate 9600 1) Device id 2 , 2) Channel id 0 , 3) baud rate 9600

Single Character Mode Activation: The jumper J2 needs to be removed while using the modules
in packet Mode. Jumper J1 and J2 are not needed while using Single Character mode.

Below is the code required to be programmed in both the bots:


The code part labeled as bot1 will be the master. For the master the bot2 code must be commented. The code part labeled as bot2 is for slave. For the slave the bot1 code must be commented. In the below code, the Bot2 section (slave bot) is shown as commented. Make sure to use proper commenting for each case, in order for the code to work correctly.

Page 8 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

#include <avr/io.h> #define F_CPU 8000000

// //

header file defining I/o operation CPU @ 8MHZ // SERIAL Communication @ 9600 baud // baud rate formula

#define USART_BAUDRATE 9600

#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) - 1) #include <util/delay.h> int main (void) { DDRB = 0xff; // DDRD = 0xfc; //
PORT B as output PORT D PIN 3-7 as output. PIN 2 is input for switch // // // main code begins header file defining delay

UCSRB |= (1 << RXEN) | (1 << TXEN);

Enable Rx & Tx of USART // 8bit, 1 Stop bit, no parity

UCSRC |= (1 << URSEL) | (1 << UCSZ0) | (1 << UCSZ1); UBRRL = BAUD_PRESCALE; // UBRRH = (BAUD_PRESCALE >> 8); unsigned char a=1; unsigned char b; while(1)
// Character Variable for Rx packet.

setting baud rate @ 9600 baud

// loop forever

Page 9 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

{
/* //BOT1 code //Tx Code

if (a == '0') a='1'; else a='0'; UDR = a;


// Add next byte to be transmitted to the UDR buffer

while ((UCSRA & (1 << UDRE)) == 0); // Loop until UDR buffer is ready to receive
// next byte to be transmitted.

while ((UCSRA & (1 << RXC)) == 0); // Loop until UDR buffer is receiving RECEIVE data. b = UDR;
// Read byte by byte from the Received Data Packet into the variable

if (b == '1') //check for Actual data from received Packet to be = (ASCII - '1') { PORTB = 0x01; } else PORTB = 0x00;
// led1 on led2 off if true if a[2] == 0x52

Page 10 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

_delay_ms(1000); */ /*
//BOT2 code. //Rx Code

while ((UCSRA & (1 << RXC)) == 0); // Loop until UDR buffer is receiving RECEIVE data. b = UDR;
// Read byte by byte from the Received Data Packet into the variable

if (b == '1') //check for Actual data from received Packet to be = 0x52 (ASCII - R) { PORTB = 0x01; } else PORTB = 0x00; if (a == '0') a='1'; else a='0'; UDR = a;
// Add next byte to be transmitted to the UDR buffer // led1 on led2 off if true if a[2] == 0x52

Page 11 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

while((UCSRA & (1 << UDRE)) == 0); // Loop until UDR buffer is ready to receive
// next byte to be transmitted.

_delay_ms(1000);
*/

} return(0); }

// While loop closed. // syntax never reached

Mount the RF modules, one each on the mounting space provided on the two bots. Switch on the two bots. To trace the communication simultaneously on Terminal, open terminal on separate Computers one for each bot. Create a connection with following settings: 1) Port Com1, 5) Parity None, 2) Baud rate 9600, 6) Stop Bit 1bit 3) Flow Control None, 4) Data 8bit,

Note 1:-

Note 2:-

Make use of the 3 wire serial interface provided on the board besides the MCU to watch the signals. You should get a stream of toggling 0s and 1s in terminal.

Page 12 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Packet Mode Activation: The jumper J2 needs to be placed while using the modules in packet
Mode. Jumper J1 is not needed while using in packet mode. Make sure that you note down the device id. After the packet mode is activated, open Hyper terminal. Create a connection with following settings: 1) Port Com1, 5) Parity None, 2) Baud rate 9600, 6) Stop Bit 1bit 3) Flow Control None, 4) Data 8bit,

Test Case 3: PC to PC Wireless communication in Packet Mode using CC2500 based RF modules Packet Structure for Transmit Data in Packet Mode
Start Character Packet Length Device ID Actual Data

The format of the transmitted packet is as shown above. Its typical value are given in the below column. FRAME DEFINATION Start Character Packet Length Device ID Actual Data VALUES # 0x02 0x40 0x00 0xff Actual Data Size = packet length - 1 TYPE char char char Array of char

*Note:- In case of packet mode transmission, the packet send by a device will be
received by all the devices on the same channel id, but only the one with the same Device id (matching to packet) will accept the packet. The other devices will discard the received packet.

Page 13 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Note:-

The device id is at the receiver end is matched, and if found matching to its own, the packet is accepted. As a result, the user will find the following packet at the 3-wire serial interface end.

Packet Structure for Receive Data in Packet Mode Start Character Packet Length Actual Data

The format of the received packet is as shown above. Its typical value are given in the below column. FRAME DEFINATION Start Character Packet Length Actual Data VALUES # 0x02 0x40 Actual Data Size = packet length - 1 TYPE char char Array of char

Below is the screen shot of a example packet transmission

Tx packet:

Page 14 dfddfdfddfdf

www.robosoftsystems.co.in

asdfghjk

[RF Communication Release] 2010


FRAME DEFINATION Start Character Packet Length Device ID Actual Data ASCII VALUES to be send on hyper Terminal -By Robosoft Systems Hex Equivalent 23 9 30 asdfghjk

# Tab 0 asdfghjk

Below is the screen shot of a example packet reception

Rx packet:

Page 15 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Tab

asdfghjk

FRAME DEFINATION Start Character Packet Length Actual Data

ASCII VALUES received on hyper Terminal

Hex Equivalent # Tab asdfghjk

# Tab asdfghjk

Test Case 2: BOT to BOT Wireless communication in Packet Mode using CC2500 based Robosoft RF modules. Initial Settings for Test Case 2: Enter configuration mode using jumper J1 only. Configuration mode :
RF Module No. 1: RF Module No. 2: 1) Device id 1 , 2) Channel id 0 , 3) baudrate 9600 1) Device id 2 , 2) Channel id 0 , 3) baudrate 9600

Packet Mode Activation: The jumper J2 needs to be placed while using the modules in packet Mode.
Jumper J1 is not needed while using in packet mode. Make sure that you note down the device id.

Below is the code required to be programmed in both the bots:


The code part labeled as bot1 will be the master. For the master the bot2 code must be commented. The code part labeled as bot2 is for slave. For the slave the bot1 code must be commented.

Page 16 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems In the below code, the Bot2 section (slave bot) is shown as commented. Make sure to use proper commenting for each case, in order for the code to work correctly. /* code for packet mode communication */

#include <avr/io.h> #define F_CPU 8000000

// //

header file defining I/o operation CPU @ 8MHZ // SERIAL Communication @ 9600 baud // baudrate formula

#define USART_BAUDRATE 9600

#define BAUD_PRESCALE (((F_CPU / (USART_BAUDRATE * 16UL))) - 1) #include <util/delay.h>> int main(void) > { DDRB = 0xff; DDRD = 0xfc; // // PORT D as output PORT D PIN 2-7 as output. // // // header file defining delay

main code begins

UCSRB |= (1 << RXEN) | (1 << TXEN);

Enable Rx & Tx of USART // 8bit, 1 Stop bit, no parity

UCSRC |= (1 << URSEL) | (1 << UCSZ0) | (1 << UCSZ1); UBRRL = BAUD_PRESCALE; // UBRRH = (BAUD_PRESCALE >> 8);

setting baud rate @ 9600 baud

Page 17 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

while(1) {

// loop forever

//bot1 code unsigned char s=0; // for use as a counter

unsigned char a[] = {0x23, 0x02, 0x30, 0x52, 0x00}; // Tx packet in the forrmat of //char array a[] = {0x23, 0x02, 0x30, 0x52, 0x00}, where 0x00 is not the part of actual //tx packet but is rather used to indicate within this code the end of packet. while (a[s] != '\0') { while ((UCSRA & (1 << UDRE)) == 0); ceive // next byte to be transmitted. UDR = a[s]; s++; // // // Loop until UDR buffer is ready to re// Loop to send tx packet through USART while scanning for \0

Add next byte to be transmitted to the UDR buffer

Increment the counter // delay of .02ms

_delay_ms(50); } _delay_ms(2000); s=0; //

//

delay of 2 sec

reset counter

a[3] = 0x53; //modify char array to a[] = {0x23, 0x02, 0x30, 0x53, 0x00},

Page 18 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

while (a[s] != '\0') {

// Loop to send tx packet through USART while scanning for \0

// While loop opened. // Loop until UDR buffer is ready to re-

while ((UCSRA & (1 << UDRE)) == 0); ceive // next byte to be transmitted. UDR = a[s]; s++; // //

Add next byte to be transmitted to the UDR buffer

Increment the counter // delay of .02ms

_delay_ms(50); } _delay_ms(2000); /* //bot2 code

//

delay of 2 sec

unsigned char a[3]; // Char Array for Rx packet. unsigned char s; // for use as a counter

while ((UCSRA & (1 << RXC)) == 0); // Loop until UDR buffer is receiving RECEIVE data. for (s=0;s<3;s++) { while ((UCSRA & (1 << RXC)) == 0); // Loop until UDR buffer is receiving RECEIVE data. // loop for storing the received Rx packet as char array

Page 19 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

a[s] = UDR; }

//

Read byte by byte from the Received Data Packet into the array

if(a[2] == 0x52) //check for Actual data from received Packet to be = 0x52 (ASCII R) { PORTB = 0x01; } else { PORTB = 0x02; } */ } return(0); } // While loop closed. // syntax never reached // led1 on led2 off if true if a[2] == 0x52 // led1 on led2 off if true if a[2] == 0x52

Page 20 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems Mount the RF modules, one each on the mounting space provided on the two bots. Switch on the two bots. To trace the communication simultaneously on Terminal, open terminal on separate Computers one for each bot. Create a connection with following settings: 1) Port Com1, 5) Parity None, 2) Baud rate 9600, 6) Stop Bit 1bit 3) Flow Control None, 4) Data 8bit,

Note 1:-

Note 2:-

Make use of the 3 wire serial interface provided on the board besides the MCU to watch the signals. You should get a stream of toggling 0s and 1s in terminal.

Below is the screen shot of a example packet transmission

Tx packet :

Page 21 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Packet to transmit data : R


# STX 0 R

FRAME DEFINATION Start Character Packet Length Device ID Actual Data

ASCII VALUES # STX (Start of Text) 0 R

HEX Equivalent values to be send

0x23 0x02 0x30 0x52

Packet to transmit data : S


# STX 0 S

FRAME DEFINATION Start Character Packet Length Device ID Actual Data

ASCII VALUES # STX (Start of Text) 0 R

HEX Equivalent values to be send

0x23 0x02 0x30 0x52

Page 22 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Below is the screen shot of a example packet reception

Rx packet:

Received packet for data : R


# STX 0x52

FRAME DEFINATION Start Character Packet Length Actual Data

ASCII VALUES # STX (Start of Text) R

HEX Equivalent values re-

0x23 0x02 0x52

Page 23 dfddfdfddfdf

www.robosoftsystems.co.in

[RF Communication Release] 2010


-By Robosoft Systems

Received packet for data : S


# STX 0x53

FRAME DEFINATION Start Character Packet Length Actual Data

ASCII VALUES # STX (Start of Text) S

HEX Equivalent values re-

0x23 0x02 0x53

Page 24 dfddfdfddfdf

www.robosoftsystems.co.in

You might also like