Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
747 Views

Need some help using ZigBee with Cyclone II

Hello, 

 

I'm currently working on a project in VHDL and have come across a problem. The project is a game, Battleship, that is played by a robot (which of course gets orders from the player). 

I wanted to implement the communication between the robot and the Cyclone II kit via ZigBee, but unfortunately I have never worked with this protocol ,nor do I have any idea how to implement the aforementioned in VHDL. 

Any advice,tip,hint or any other kind of help will be much appreciated. 

 

Thank you.
0 Kudos
3 Replies
Highlighted
Valued Contributor III
6 Views

Re: Need some help using ZigBee with Cyclone II

 

--- Quote Start ---  

 

I wanted to implement the communication between the robot and the Cyclone II kit via ZigBee, but unfortunately I have never worked with this protocol ,nor do I have any idea how to implement the aforementioned in VHDL. 

Any advice,tip,hint or any other kind of help will be much appreciated. 

 

--- Quote End ---  

Zigbee is a wireless protocol, so you will have to use some form of external PHY that translates from logic to RF. Most likely this PHY will have a parallel interface. Zigbee will have some form of protocol stack much like ethernet. Hence your system should look something like: 

 

1) NIOS II processor running an OS, eg., Linux (NIOS with an MMU), uCLinux (NIOS without an MMU), or uCOS/II RTOS 

 

2) A Zigbee protocol stack (Linux most likely has one) 

 

3) An Avalon-MM slave component that maps the Zigbee PHY into the address map of the NIOS processor (which is an Avalon-MM master component). Probably DMA controllers to move packets to and from the Zigbee PHY (much like a network PHY would need). 

 

4) Your board design; an FPGA, SRAM or SDRAM for the NIOS processor, Flash for the FPGA configuration and NIOS bootloader, kernel image, filesystem, etc., and the Zigbee PHY. 

 

Sounds like a piece of cake, eh! 

 

This is not really an FPGA application, its more like a microcontroller application. For example, Freescale has Zigbee micros: 

 

http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=mc13212&fsrch=1&sr=1 

 

Unless of course you are looking to create a Zigbee PHY in FPGA code along with ADC and DAC interfaces to convert to RF. 

 

Cheers, 

Dave
0 Kudos
Highlighted
Valued Contributor III
6 Views

Re: Need some help using ZigBee with Cyclone II

Thank you for your response.  

 

I now know for certain what I am going to use, therefore answer your questions better : 

XBee 2mW Wire Antenna - Series 2 ( ZB )  

 

Unfortunately, I have no experience whatsoever with Linux, nor with NIOS.  

The only tools I have are the robot, Quartus, Cyclone II kit , and the Xbee aforementioned. The operating system I'm using is Windows 7. 

 

Since Battleship is a game played by two players, I'll probably be using two Cyclone II kits,connected to two monitors(each one will show two boards/grids: the player's and the opponent's). 

Now, the part where zigbee comes in, is after announcing a target square in the opponent's grid which is to be shot at , the robot goes to the specified coordinate and then the ZigBee "tells" whether or not the shot has hit one of the opponent's ships. In Quartus, I want to create a certain controller, which will be handling the ZigBee . It will get 4 inputs (Left,Right,Up,Down - which will tell the robot how and where to move) and an output (zigbee) which will go to a certain RAM I made in Quartus. 

 

Is it doable ? How am I implementing ZigBee in Quartus? 

 

Thank you.
0 Kudos
Highlighted
Valued Contributor III
6 Views

Re: Need some help using ZigBee with Cyclone II

 

--- Quote Start ---  

 

I now know for certain what I am going to use, therefore answer your questions better : 

XBee 2mW Wire Antenna - Series 2 ( ZB )  

 

--- Quote End ---  

From the manals: 

 

http://www.sparkfun.com/products/10414 

ftp://ftp1.digi.com/support/documentation/90000976_g.pdf 

 

Easy-to-Use 

* No configuration necessary for out-of box 

* AT and API Command Modes for configuring module parameters 

 

So the device looks like a modem. 

 

I didn't read the data sheet completely, but you should. I suspect all you need is a UART in your FPGA. 

 

 

--- Quote Start ---  

 

Unfortunately, I have no experience whatsoever with Linux, nor with NIOS.  

 

--- Quote End ---  

The Zigbee protocol is taken care of in the module, so I don't think you need to understand the Zigbee stack. 

 

 

--- Quote Start ---  

 

How am I implementing ZigBee in Quartus? 

 

--- Quote End ---  

You don't. You implement a NIOS II processor and a UART. You read the data sheet for the Zigbee module and determine what serial commands you need to send to the UART. On your robot, you will have another Zigbee module and another device with a UART, eg., a microcontroller. The fact that the communications is Zigbee is hidden from your devices by the Zigbee modules. 

 

Cheers, 

Dave
0 Kudos