Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

need help in zigbee communication...

Status
Not open for further replies.

n_vikranth

New Member
can any one solve my problem?

I planned to work with ZIGBEE, so i started with basic steps... Iam using Atmega16A microcontroller and mikroc pro compiler, I started with basic serial communication between two Atmega16A controller,bcos in ZIGBEE datasheet they mentioned that we can use module directly by neglecting wire medium… as per the datasheet I used only vcc,gnd,Din,Dout.
When I used wire it transmit data clearly,but when I used zigbee module it shows some black box in my lcd module…
Wat is the solution for my problem… kindly reply me.
I have doubt in Zigbee connections, I used 3v DC supply…
 
Hey ...
i am not quiet sure but maybe you should check the serial communication speed ... would you post more details about your code.


best regards, Fermat
____________________________________________________________________________________________________________________________
 
Unless you are developing a product to work with the other zigbee devices on the market you would be much much better off not using the zigbee protocol. There are often other simpler protocols that run on the same radio modules. For example microchip supports MiWi on the same modules it sells for use with ZigBee.

Can you provide a link to the ZigBee module.
 
Last edited:
Code:
SERIAL TX:
void main()
{
  UART1_Init(9600);               // Initialize UART module at 9600 bps
  DELAY_ms(100);
  DDRB= 0X00;                     // Set PORTB as input
  DDRC= 0XFF;                     // Set PORTC as output
  do {
    if (Button(&PINB, 0, 1, 1)) {   // Detect logical one
      UART1_Write_TEXT("V");
   }
    else if (Button(&PINB, 1, 1, 1)) {   // Detect logical one
      UART1_Write_Text("I");
    }
    else if (Button(&PINB, 2, 1, 1)) {   // Detect logical one
      UART1_Write_Text("S");
    }
    else if (Button(&PINB, 3, 1, 1)) {   // Detect logical one
      UART1_Write_Text("I");
    }
    else if (Button(&PINB, 4, 1, 1)) {   // Detect logical one
      UART1_Write_Text("O");
    }
    else if (Button(&PINB, 5, 1, 1)) {   // Detect logical one
      UART1_Write_Text("N");
    }
    PORTC = ~PORTC;
  } while(1);                       // Endless loop
}




SERIAL RX:
  // LCD module connections
sbit LCD_RS at PORTD2_bit;
sbit LCD_EN at PORTD3_bit;
sbit LCD_D4 at PORTD4_bit;
sbit LCD_D5 at PORTD5_bit;
sbit LCD_D6 at PORTD6_bit;
sbit LCD_D7 at PORTD7_bit;
sbit LCD_RS_Direction at DDD2_bit;
sbit LCD_EN_Direction at DDD3_bit;
sbit LCD_D4_Direction at DDD4_bit;
sbit LCD_D5_Direction at DDD5_bit;
sbit LCD_D6_Direction at DDD6_bit;
sbit LCD_D7_Direction at DDD7_bit;
// End LCD module connections
unsigned long int uart_rd;
void main() {
  Lcd_Init();                        // Initialize LCD
  Lcd_Cmd(_LCD_CLEAR);               // Clear display
  Lcd_Cmd(_LCD_CURSOR_OFF);          // Cursor off
  UART1_Init(9600);               // Initialize UART module at 9600 bps
  Delay_ms(100);                  // Wait for UART module to stabilize
  while (1) {                     // Endless loop
   if (UART1_Data_Ready()==1) {      // If data is received,
     uart_rd = UART1_Read();     // read the received data,
       Lcd_chr(1,1,uart_rd);        // and send data via UART
       Lcd_chr(2,1,uart_rd);        // and send data via UART

    }}}
 
try to help me, i hav one doubt that weather we need to send AT command to start transmitting and start receiving... reply me
 
I was trying to help you but you seem intent on pulling out into traffic without looking.

you said

bcos in ZIGBEE datasheet they mentioned that we can use module directly by neglecting wire medium…

that sounds more like XBee! We can not read your mind. Where is the link to the module I asked for in the last post.
 
sorry,I thought u asking about program itseems, thats y i send u the program...

Iam using xbee s2 module from Digi International...
 
XBee is not ZigBee! You are trying to do a point to point radio connection. Zigbee is a complex mesh network with many modes and one of a few predefined applications profiles for things like building management or home control.

OK. Search of XBee here. I expect the same question has been answered at least once.
 
i have searched for details,but i can't find,try to explain me... i need to know that when interfacing atmega16a to atmega16a via xbee module,we need to add any other instruction to start xbee transmission or not... i hav included simple UART communication program above, is there to add anything else to do UART communication via xbee...if we need to activate xbee by using commands ,kindly provide it...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top