Welcome, Guest

Author Topic: MOD WIFI with MRF24WB0MA won't work natively with PICWEB RevC[solved]  (Read 2382 times)

codenamemessiah

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
I was trying to connect MOD WIFI(MRF24WB0MA) with PIC WEB (Rev C.) via the UEXT.
I am using Microchip TCPIP Stack 5.42 modified by OLIMEX for PIC WEB.


 Sadly I found board's uext connections doesn't support "MOD WIFI" natively as the 5 pin of UEXT on board is connected to pin RE0 of PORT E but to support MOD WIFI this shall be connected to any of the external interrupt pins (which are PORTB[3:0]). I request you guys to mention this in userguide!

 So connected MOD WIFI with female to female headers at following pins

MOD WIFI      -       PIC WEB
1 (VCC)       -          1 of UEXT(VCC)
2 (GND)       -          2 of UEXT(GND)
3 (UART RXD)  -          left unconnected
4 (UART TXD)  -          left unconnected
5 (INT)       -          pin 12 of EXT (INT1/RB1) // external interrupt
6 (RST)       -          pin 13 of EXT (RB2)
7 (MISO)      -          7 of UEXT
8 (MOSI)      -          8 of UEXT
9 (SCK)       -          9 of UEXT
10 (CS)       -          10 of UEXT

I also disabled the EEPROM (U4) as my webpages were very small.

allover I made following changes to file "HWP OLIMEX_PIC-WEB.h"

at line No. 204 added -
Code: [Select]
// MRF24W Wi-Fi
        #define WF_CS_TRIS (TRISEbits.TRISE2)
        #define WF_SDI_TRIS (TRISCbits.TRISC4)
        #define WF_SCK_TRIS (TRISCbits.TRISC3)
        #define WF_SDO_TRIS (TRISCbits.TRISC5)
        #define WF_RESET_TRIS         (TRISBbits.TRISB2)
        #define WF_RESET_IO (LATBbits.LATB2)
        #define WF_INT_TRIS (TRISBbits.TRISB1)
        #define WF_INT_IO (PORTBbits.RB1)
        #define WF_CS_IO (LATEbits.LATE2)
        #define WF_HIBERNATE_TRIS         (PRODL)
        #define WF_HIBERNATE_IO         (PRODL)
        #define WF_INT_EDGE (INTCON2bits.INTEDG0)
        #define WF_INT_IE (INTCONbits.INT0IE)
        #define WF_INT_IF (INTCONbits.INT0IF)
        #define WF_SPI_IF (PIR1bits.SSPIF)
        #define WF_SSPBUF (SSP1BUF)
        #define WF_SPISTAT (SSP1STAT)
        #define WF_SPISTATbits         (SSP1STATbits)
        #define WF_SPICON1 (SSP1CON1)
        #define WF_SPICON1bits         (SSP1CON1bits)
        #define WF_SPICON2 (SSP1CON2)
        #define WF_SPI_IE (PIE1bits.SSPIE)
        #define WF_SPI_IP (IPR1bits.SSPIP)
at line no. 246 (commented out EEPROM)
[code[
   //#define EEPROM_CS_TRIS      (TRISFbits.TRISF7)[/code]

I also disabled modules as according to my need in TCPIP configuration file.

My problem I cannot connect to my WIFI access point. As I haven't done any changes to TCPIPStack code, can any body guide me in figuring out where can the problem be. Am I making some connection error?
How to I debug/check if there is any configuration error?

Please help.
« Last Edit: April 22, 2014, 09:01:27 AM by codenamemessiah »

LubOlimex

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1984
  • Karma: +50/-3
Re: MOD WIFI with MRF24WB0MA won't work natively with PICWEB RevC
« Reply #1 on: March 20, 2014, 09:27:19 AM »
Hey codenamemessiah,

There is now a demo for PIC-WEB and MOD-WIFI available at the PIC-WEB revision C web-page.

Direct link to the example: https://www.olimex.com/Products/PIC/Development/PIC-WEB/resources/PIC_WEB_MOD_WIFI_5_42.zip

Best regards,
Lub/OLIMEX
Technical support and documentation manager at Olimex

codenamemessiah

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
Re: MOD WIFI with MRF24WB0MA won't work natively with PICWEB RevC
« Reply #2 on: March 20, 2014, 09:31:05 AM »
Thanks a lot!

But does it example require connecting the interrupt pin on MOD Wifi to the port B pins,or will the UEXT connection suffice. I assume it is I have to make the connections explicitly from INT pin to any pin on PORT B [3:0] .

Please correct if I am wrong!

Regards

Stanimir5F

  • Jr. Member
  • **
  • Posts: 80
  • Karma: +2/-0
Re: MOD WIFI with MRF24WB0MA won't work natively with PICWEB RevC
« Reply #3 on: March 20, 2014, 10:48:14 AM »
Yes, you have to make this connection. It is described inside the README.txt in the demo zip.
May the Source be with You!