PmodWifi on Uno

Solution:

Connect the PmodWifi straight to the Arduino as follows:
PmodWifi pin - Arduino pin
SS_N(SS) 1 - 10
SDI(MOSI) 2 - 11
SDO(MISO) 3 - 12
SCK 4 - 13
GND 5 - Power GND
VCC 6 - Power +3.3V
INTX(INT) 7 - 2 OR 8__*__
RST 8 - Power RESET
GND 11 - Power GND
VCC 12 - Power +3.3V

__*__Pin 2 is the better pin to use, however if you HAVE to use pin 2 for something else you can use pin 8. If you decide to use pin 8, open up spi.h in the WiShield library and comment out USE_DIG0_INTR and uncomment USE_DIG8_INTR.

Also connect an LED to Arduino pin 9, this will be your "wifi is ready" indicator. Don't forget the resistor (see Arduino's blink example)! Next, load up the WebServer example sketch from the WiShield library, set your wifi variables and you are good to go! If you are not sure what those variables should be, check the settings on a device that is already connected to the wifi. Make sure that the IP address you set for your Pmod is not already in use.

Original Post:
I bought a PmodWifi from Digilent and I am trying to use it with my Arduino Uno, however I have not be able to find any resources to get me started. I tried to follow this tutorial but the Pmod abstracts the interface to the MRF24WB0MA chip and I am not sure what adjustments need to be made to the design.

Can anyone point me in the right direction? Thanks,

  • Mike

Edit: Here is the reference manual.

I am unable to get the "ready" LED to come on as described in the tutorial. I also put a print statement right after Wifi.init(); but it never reaches it. Is there a way for me to see if it is throwing any errors?

Here is how I have it connected, I am assuming the pin numbers as follows, please tell me if I am wrong (looking at the pin header straight on):
1, 2, 3, 4, 5, 6
7, 8, 9, 10, 11, 12

... (see above for the correct way) ...

Also, is there an LED on the Pmod that should be on? (no there, are no LEDs on the pmod)

In which way does the PmodWifi abstract the interface to the MRF24WB0MA module? They provide the schematics for the board and it's just the base module with a few LEDs and resistors added (forgot the decoupling caps).

Your wiring seems to be correct (I don't own the same hardware so I'm judging from the pictures and your description.

You didn't provide the sketch you're trying with. Have you set all the variables according to your network? The LED should light up if the module is able to connect to your WLAN.

Is there a way for me to see if it is throwing any errors?

Unfortunately not, I had to make changes to the WiShield code to debug my WiFi Bee (almost the same as your combination but in XBee format).

Oh, perhaps it does not abstract it. I am still a novice and it looked like there was a lot happening on that board.

The sketch I am using is the WebServer example that came with the WiShield library. I didn't spend too much time messing with the sketch itself because I assumed that the problem was with the wiring because I was getting no visible activity from the Pmod. I did put print statements before and after Wifi.init() and it never gets passed it. It seems ridiculous that there is no way to debug... I found Visual Micro, will this help me? What about the DEBUG_TX and DEBUG_RX pins on the chip, can I use those?

I also noticed that it had 2 ground and 2 VCC pins, do they both need to connect to Power GND and Power +3.3V?

Are any of those LEDs on the Pmod supposed to light up? The schematics make it look like there is one LED for each pin and that they should light up if there is a current (or input/output?).

VisualMicro seems to be just the Arduino IDE within VisualStudio. It does not provide (according to the web site) any additional feature for debugging.

The two pins for power and ground should be connected on the board, at lieast the schematics say so.

On the Pmod there is no LED, at least the schematics show only diodes to save the input lines. On the MRF24WB0MA I cannot find any LED either.

The DEBUG_TX and DEBUG_RX lines are only on the MRF24WB0MA submodule so they are not easy to solder. They provide a serial interface for debugging but I cannot find any information about it except that the line characteristic is 19200 baud with 8N1.

Unfortunately there is also no Application Programmers Manual or anything the like for the MRF24WB0MA, at least I haven't found anything.

What a pain! With something as finicky as wireless networks it seems like a major oversight to not provide a any means of debugging :~.

It seems I have confused the squiggly line on top of the diode to mean light emitting. What does it mean that the line is not straight?

Now that I can continue under the assumption that my wiring is correct I will start trying to figure out what is going wrong on the software side.

The sign is for a Zener diode. Usually this kind of device is used to protect chips from over-voltages on the input pins. It's almost the same as a standard diode but opens the reverse current direction if the voltage is higher than the breakdown voltage.

I debugged my device by inserting serial prints but it's quite tricky because this changes the timing. So you've been warned :slight_smile:

The documentation for the MRF24WB0MA is almost non-existing, so all we have is the source code of the WiShield, unfortunately.

So the router I had at home was already unreliable so I went out and bought a new one to remove that variable. After connecting BOTH ground and power pins I have it up and working! It was much simpler than I thought it would be. Just straight connection between the Pmod and Ardunio! Cool!

For some reason when I tried to use Arduino pin 2 to control an LED it caused me to be unable to connect to the Pmod. I assume this pin is reserved for the WiShield library?

By default: yes. Usually pin 2 (INT0) is connected to the INT pin of the MRF24WB0MA. The WiShield code is going to handle this by default. You can disable it by commenting out the

#define USE_DIG0_INTR

line in spi.h in the WiShield folder.

I thought the Pmod INT pin (7) was connected to Arduino pin 8? Or atleast that's what the schematics from the tutorial I followed said. Looking at the WiShield 2.0 wiki page, it says:

  1. Interrupt (Uses only one of the following, depending on jumper setting)
    INT0 : Arduino pin 2 (port D, pin 2)
    DIG8 : Arduino pin 8 (port B, pin 0)

  2. Interrupt selection jumper
    Allows switching the WiFi interrupt line between INT0 or DIG8

So it sounds like there is a jumper on the WiShield that allows you to switch between using INT0 and DIG8. I am assuming I should use DIG8 because that's what the tutorial instructed, but what is the difference?

The define for USE_DIG8_INTR is just one line below. Comment that in and you get what you want. I don't have a WiShield, "just" a WiFi Bee. The difference is in how it's handled. Pin 2 is using INT0, with pin 8 the pin change interrupt is used (which generates much more interrupts). So if you're free, I would choose pin 2.

OK, so just to confirm I am going to ensure that USE_DIG0_INTR is defined and USE_DIG8_INTR is NOT in spi.h, then I am going to move Pmod's INT pin (7) to Arduino's INT0 (2) pin.

Correct, that's what the source code says.