• AVR Freaks

Hot!ATWINC1500 (Part #2 of Likely So Many)

Author
IBrokeIt
Starting Member
  • Total Posts : 64
  • Reward points : 0
  • Joined: 2019/08/13 12:07:00
  • Location: 0
  • Status: offline
2020/07/14 17:17:38 (permalink)
0

ATWINC1500 (Part #2 of Likely So Many)

Hi,
Question about connecting to PIC24FJ128GB202.  Can someone review the following for me and comment on whether this looks correct in aggregate and suggest what the linkage with note "Help!" should be?  I think I may know the answer to this but want to be sure before I connect stuff and blow up my precious.  Understand I can get prototype boards readily available vs. do this from the ground up, but reinventing bicycles and hand crafting Dupont connectors is fashionable in my book.  And THEN, when I connect it all and inevitably can't figure out why it won't work for me...the real fun begins.  (Fortunately for you, you have come to love answering my silly questions)!

Attached Image(s)

#1

8 Replies Related Threads

    ric
    Super Member
    • Total Posts : 27977
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: ATWINC1500 (Part #2 of Likely So Many) 2020/07/14 17:55:51 (permalink)
    0
    Your comments seem confused about MOSI and MISO.
    MOSI (Master Out, Slave In) will be the same at both ends of the wire if you use that terminology
    whereas, SDO/SDI are relevant to the device they are on, so for the Master "SDO" is "MOSI", but for the Slave it connects to "SDI".
     
    nb.  A column for the pin name (rather than number) would be useful. e.g. pin 16 is "RB7 | nCS"
     
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    IBrokeIt
    Starting Member
    • Total Posts : 64
    • Reward points : 0
    • Joined: 2019/08/13 12:07:00
    • Location: 0
    • Status: offline
    Re: ATWINC1500 (Part #2 of Likely So Many) 2020/07/14 18:29:51 (permalink)
    0
    Ok.  I see confusion with SPI nomenclature.  I had assumptions in previous diagram swapped with actual pin mapping so removed that.  I think this should all be correct now?  The part I am mostly concerned about is highlighted.  First time I have seen this "nCS" convention.  Assuming it means "chip select n."  There is pretty much one left over pin on the WINC1500 as pertains to this circuitry which is "SPI_SSN" which is low level triggered so I am assuming I just need to map this as such.  And the one other question I have is I created this with MCC and by default it on its own checked the SCK1OUT and SDO1 as "output" as well as "analog" in the auto configuration.  First time with SPI but assuming no ADCs sitting on the other end of this?  Glitch likely?  If so, easy enough to fix and hopefully no popping noises to follow.

    Attached Image(s)

    #3
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11930
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: ATWINC1500 (Part #2 of Likely So Many) 2020/07/14 20:51:04 (permalink)
    0
    "nCS" convention.  Assuming it means "chip select n."

     
    No, it means "not chip select", with "not" referring to logic, i.e., CS is active low.
     
    The part I am mostly concerned about is highlighted

     
    Are you really implementing an SPI slave?
    #4
    IBrokeIt
    Starting Member
    • Total Posts : 64
    • Reward points : 0
    • Joined: 2019/08/13 12:07:00
    • Location: 0
    • Status: offline
    Re: ATWINC1500 (Part #2 of Likely So Many) 2020/07/15 18:33:13 (permalink)
    0
    Well, where I THINK I am at right now with that IO layout you guys helped me resolve is implementing an SPI master from PIC.  It looks like the WINC is responding sampling MOSI and MISO.  Part I am trying to figure out now is I set this up for a 125kHz rate from MCC and you can see here that the SCL is ripping away at 8MHz (that's my core speed so looks like the correct division is not taking place).  The crazy part is the WINC appears to be responding to the controller at that rate.  (I know Fmax is a product of trace length and capacitance but 8MHz response is still nuts on a breadboard...trying to dial that back to the correct 125kHz I had specified but struggling to find relevant register at the moment).  Brand new to SPI...first for me.  But from what I can see, this looks like an SPI-esque clock form coming from PIC.  Reading through convention.  Some docs show a normally high clock level.  Some a normally low.  Not sure what should be what but I get that characteristic 8 bit clock form at least so I'm hoping that's SOME progress.  Ticked that MCC let me overlay a WINC signal pin on USB Vbus which I didn't initially catch but I'll get over it.  My tinkering continues.

    Attached Image(s)

    #5
    IBrokeIt
    Starting Member
    • Total Posts : 64
    • Reward points : 0
    • Joined: 2019/08/13 12:07:00
    • Location: 0
    • Status: offline
    Re: ATWINC1500 (Part #2 of Likely So Many) 2020/07/16 18:22:12 (permalink)
    0
    Following up on this I believe dialing the SPI settings down in the case of WINC is not necessary.  I am reading the SPI can handle clock rates substantially higher than most common devices (I guess that handles the how @ 8MHz part of my question).  I guess this makes sense if we are to obtain transmit rates close to what the wireless portion is capable of handling.  I do believe that to be functioning correctly.  I think the nCS is to be used in place of SSx in ordinary SPI convention (base SPI include has SSx functionality whereas it is not included in WINC library).  Only conclusion I can draw is that nCS assumes this functionality.  Idk.  Still confused about all this.  If someone can verify that for me I think that is the end of this line of questioning on hardware setup.
     
    I guess specifically to rephrase should the nCS function of WINC PIC library be tied to SPI_SSN on WINC header?
    #6
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11930
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: ATWINC1500 (Part #2 of Likely So Many) 2020/07/16 21:26:09 (permalink)
    0
    All of this is documented in the data sheet, like the max SPI speed (48 MHz), and how to connect to SPI.  Where are you seeing "nCS" and "SSx"?  The slave select pin on the device is named SPI_SSN.
    #7
    dan1138
    Super Member
    • Total Posts : 3717
    • Reward points : 0
    • Joined: 2007/02/21 23:04:16
    • Location: 0
    • Status: offline
    Re: ATWINC1500 (Part #2 of Likely So Many) 2020/07/16 23:12:30 (permalink)
    0
    @IBrokeIt,
     
    I have been responding to your questions here:
     
    https://www.microchip.com/forums/FindPost/1147781
     
    It seems that this thread is related.
     
    The questions you have been asking in both topics converge in a development board that Microchip already makes, the AC164164. MikroElektronika makes the WiFi7click that can be added to many Microchip starter kit boards.
     
    You do not seem to have a clear idea of how to connect the hardware together.
     
    Until you get a better notion of what your hardware need to do get yourself an AC164164 to get started on the firmware.
    #8
    IBrokeIt
    Starting Member
    • Total Posts : 64
    • Reward points : 0
    • Joined: 2019/08/13 12:07:00
    • Location: 0
    • Status: offline
    Re: ATWINC1500 (Part #2 of Likely So Many) 2020/07/17 20:16:26 (permalink)
    0
    Hi Dan.  Thank you for that suggestion.  It appears to have the same transmitter that I am playing around with.  Main difference is it looks like it has an embedded controller and can function more standalone than the WINC1500 XPRO that I picked up.  It helps to look at the circuitry, for verification, and I think I am probably at the same point.  The built in MCC code generated as pertains to the nCS question (the version I am tinkering with) appears to come from the MCC WINC function block and pin configuration and I think the answer is that nCS in this context connects to SPI_SSN abstracting hardware.  I am able to call some functions from the controller and it appears that the WINC is overwriting test variables with return values so at face value it appears to be functioning from a hardware perspective.  Example code from MCC generation is minimal at best.  Basically try to connect to SSID and handle background tasks, nothing else.  I am not able to connect to SSID with this so I am trying to see if there are stock functions that return test values I can use to verify SPI is working properly rather than perceived return value updates being a fluke.  I haven't worked with this software before so I have no idea what I am doing and can hopefully piece this together via MLA and your suggestion above.
     
    In my mind, being totally new to this the odds are slim I am going to be able to do much with it on my own so I may have to turn to the dev board for a polished example and kind of break that down once I have a better understanding and apply to more piecewise stuff I am tinkering with.
    #9
    Jump to:
    © 2020 APG vNext Commercial Version 4.5