Hot!WINC1500 and PIC32MZ, without Harmony

Page: < 123 > Showing page 2 of 3
Author
NKurzman
A Guy on the Net
  • Total Posts : 17130
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: WINC1500 and PIC32MZ, without Harmony 2018/10/16 18:41:47 (permalink)
0
DougD
That's what I'm worried about.  What options do I have if I don't want to host the TCP/IP stack or RTOS on the PIC32MZ? 


I gave You a Path, I assume you do not want to take it.


#21
qhb
Superb Member
  • Total Posts : 9621
  • Reward points : 0
  • Joined: 2016/06/05 14:55:32
  • Location: One step ahead...
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2018/10/16 18:52:06 (permalink)
0
Deleted. I can see the missing post now...
#22
malaugh
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2011/03/31 14:04:42
  • Location: San Diego
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2018/10/17 10:27:41 (permalink)
5 (1)
We use the WINC1500 with the PIC32MZ without Harmony on many of our projects.  Its relatively easy to implement.  
 
First you need to get the Atmel ASF libraries by downloading Atmel Studio7, and extracting the WINC libraries.  Then all you need to do is include the library in your code, it compiles fine on XC32, and create a SPI driver for the MZ.  Atmel have a porting guide at https://www.avrfreaks.net/sites/default/files/forum_attachments/WINC1500_SPI_Porting_Guide.pdf
 
After you have these them you can follow along with the examples in http://ww1.microchip.com/downloads/en/devicedoc/atmel-42418-software-programming-guide-for-atwinc1500-wifi-using-samd21-xplained-pro_userguide.pdf
 
Note that all these examples use a callback function and a superloop, so no RTOS is needed.
 
#23
DougD
Junior Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2012/12/24 10:12:06
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2018/10/23 18:44:14 (permalink)
5 (1)
No kidding!
 
For those thinking of using the Explorer 16/32 board to develop a WINC1500 wifi application for a PIC32MZ EF, don't.  I learned the hard way that the PIC32MZ EF plug-in module (PIM) is not pin-compatible with the WINC1500 daughter-board.

The WINC1500 wifi MLA demos work fine with the Explorer 16 board, and with the Explorer 16/32 board (with the PICtail Plus extender), using the PIC24FJ128GA310 PIM and the WINC1500 daughter-board plugged into the "middle" PICtail Plus slot position.  The problem is that the PIC32MZ EF PIM has pin-outs that can't support the WINC1500 daughter-board.

First, I tried the top position of the Explorer 16/32 PIctail Plus extender slot.  In this position, you can assign PIC32MZ pins for everything needed to interface with the WINC1500, except for PIC32MZ SPI pin #69.  This pin needs to be SDI2, but unfortunately the Harmony pin configurator says SDI2 isn't an option for this pin.  (You have to use SPI #2 because SCK2 is the only SPI clock option for a PIC32MZ2048EFH100's pin #10.  So, the top PICtail Plus slot position won't work.

Next, I tried the middle position of the Explorer 16/32 PICtail Plus extender slot.  I didn't even get around to trying to assign pins before I found that pin #66 (WINC1500 IRQ), and pin #90 (WINC1500 RESET) in the PIC32MZ PIM are combined (i.e. apparently shorted together) before they connect to the PIC32MZ2048EFH100's pin #88.  Obviously, you can't tie the WINC1500's interrupt pin to its RESET pin.

The PIC24FJ128GA310 PIM has different pin-outs than the PIC32MZ EF PIM, so it doesn't have this problem.  But you can't develop a WINC1500 daughter-board application with the PIC32MZ EF PIM on an Explorer 16/32 board.  I'm going to have to lay out my custom PIC32MZ board and hope it works.  I hope this saves someone else some grief.


P.S. - I also found four errors in the PICtail Plus Expansion Board schematics (DS50002469C).  Comparing the pin-outs of J62-J65 with the Explorer 16/32 board schematics, it appears that pin 62 of these jacks should actually be "P89_USBDN_E1", rather than "P90_USBDN_E1".  If Microchip Tech Support monitors these forums, they should correct that document.



#24
Jim Nickerson
User 452
  • Total Posts : 5842
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2018/10/24 07:08:31 (permalink)
0
Maybe you could open a support case and help out future users https://support.microchip.com
#25
DougD
Junior Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2012/12/24 10:12:06
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2018/10/24 14:12:11 (permalink)
0
I re-read the WINC1500 PICtail/PICtail Plus Daughter Board User's Guide, and saw that it doesn't actually say you can use it with a 32-bit microcontroller PIM on their Explorer 16/32 development board.  I just assumed that you could.

The User's Guide says "This chapter demonstrates how the WINC1500 PICtail/PICtail Plus Daughter Board can be plugged into the PIC18 Explorer, Explorer 16, and Explorer 16/32 Development Boards."  But it also says "For example, the daughter board is appropriate for 8-bit microcontroller development using the PIC18 Explorer Board or for 16-bit microcontroller development using Explorer 16 Development Board."

I think people will need to read these forum posts to learn about things like this.

Regarding the incorrect label on pin #62 of the PICtail Plus Expansion Board schematic (DS50002469C), Microchip's technical support web page wouldn't let me enter "PICtail Plus Expansion Board" for the name of the "Target Device", so I guess people will need to read about that here as well.


#26
Jim Nickerson
User 452
  • Total Posts : 5842
  • Reward points : 0
  • Joined: 2003/11/07 12:35:10
  • Location: San Diego, CA
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2018/10/25 06:22:26 (permalink)
4 (1)
DougD
Microchip's technical support web page wouldn't let me enter "PICtail Plus Expansion Board" for the name of the "Target Device", so I guess people will need to read about that here as well.

Choose "one " of the available options, one of the humans that looks at the support request will straighten it out.
#27
boatbodger
Starting Member
  • Total Posts : 33
  • Reward points : 0
  • Joined: 2011/03/27 15:39:07
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2018/12/20 10:56:32 (permalink)
0
But for PICs with very small memory (e.g. PIC18F with 3.2kbytes), there is a design issue with the MLA implementation - see my other post 'uncontrollable receive'.  This is a problem 'inherited' with the Atmel code - but it needs fixing.
#28
NKurzman
A Guy on the Net
  • Total Posts : 17130
  • Reward points : 0
  • Joined: 2008/01/16 19:33:48
  • Location: 0
  • Status: online
Re: WINC1500 and PIC32MZ, without Harmony 2018/12/20 11:09:22 (permalink)
0
boatbodger
But for PICs with very small memory (e.g. PIC18F with 3.2kbytes), there is a design issue with the MLA implementation - see my other post 'uncontrollable receive'.  This is a problem 'inherited' with the Atmel code - but it needs fixing.


This Thread is is about a PIC32MZ, No PIC18's
#29
DougD
Junior Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2012/12/24 10:12:06
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/21 15:34:38 (permalink)
0
Hello John,
 
I finished my board and worked out the bugs, and now I'm trying to implement the WINC1500 connectivity.
 
I installed Atmel Studio7 (for SAM devices only) and followed the steps in Appendix A of the "WINC1500_SPI_Porting_Guide.pdf", am unable to find the WINC1500 examples.
 
I selected the Atmel Studio7's "Tools/Extensions and Updates.." menu item, and searched the "Installed" and "Online" extensions for WINC1500, but it's not finding anything.
 
I'm new to Atmel--do I need to install their ASF separately (Atmel's version of Harmony?) to be able to find the WINC1500 driver and examples?
 
Doug
#30
friesen
Super Member
  • Total Posts : 2036
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/22 05:42:20 (permalink)
0
You don't need to install Studio7, just unzip ASF.  The code is in
 
? xdk-asf-3.45.0\common\components\wifi

Erik Friesen
#31
DougD
Junior Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2012/12/24 10:12:06
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/22 08:33:21 (permalink)
0
Thanks Erik, I wish I knew that yesterday.
 
I'd like to try John's suggestion of copying the ASF WINC1500 driver and example to MPLAB IDE, and compiling it there with XC32.
 
In writing the SPI driver for it, the WINC1500_SPI_Porting_Guide.pdf says that the WINC1500's SPI slave interface supports the four standard SPI modes (as determined by the Clock Polarity and Clock Phase), but it doesn't say which one it uses.  Don't I need to know which SPI mode is implemented in the WINC1500 before I can talk to it?
 
My WINC1500 modules have firmware version 19.54.  Is the ASF code compatible with this version?
#32
friesen
Super Member
  • Total Posts : 2036
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/22 08:36:55 (permalink)
0
I might be repeating myself here, but if you have enough code space, run your 1500 the 1000 way, it is much superior and then it makes no difference what firmware you are using, because it bootloads the internal code.  You can interchange the 1500 and 1000 with no code or module footprint changes, if you run 1000 firmware.
 
You are welcome to browse the github repo I previously posted the link for.  I wrote a driver that works for me for the MZ DAH.

Erik Friesen
#33
DougD
Junior Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2012/12/24 10:12:06
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/22 08:55:17 (permalink)
0
Erik, I'm okay with hosting the internal code for the 1500 as I have plenty of room for that, but I just don't want to use RTOS.
 
Can the internal code be bootloaded without RTOS?  If so, would it be based on the "host_firmware_upgrade" example?
 
#34
friesen
Super Member
  • Total Posts : 2036
  • Reward points : 0
  • Joined: 2008/05/08 05:23:35
  • Location: Indiana, USA
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/22 09:44:10 (permalink)
0
I suppose the internal code can be loaded without and rtos, I think it is straightline code that loads it.
 
No, it won't be based on host_firmware_upgrade.  I have no idea what that really does on the wilc1000.
 
I used to feel that way about RTOS's too.  Its just that if you want ssl and all, it going to get pretty fun managing all that without.

Erik Friesen
#35
DougD
Junior Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2012/12/24 10:12:06
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/22 09:56:12 (permalink)
0
I understand, but I have a relatively simple TCP server application, and won't be using SSL.
 
I'll start simple, trying to read the Chip ID first, and move up in complexity from there.
 
Thanks for your help.
#36
malaugh
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2011/03/31 14:04:42
  • Location: San Diego
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/22 10:36:18 (permalink)
5 (1)
In our projects we ignored all the Microchip tools except the compiler, no MCC, No Harmony.  We used the Atmel ASF library, and wrote our own SPI driver.  I have attached our SPI driver file.  This translates the driver API calls from the ASF library to work the MZ SPI peripheral.  For testing we used the Atmel test program described in http://ww1.microchip.com/downloads/en/devicedoc/atmel-42420-winc1500-software-design-guide_userguide.pdf
 
These example use a simple loop, no RTOS.
 
 
#37
DougD
Junior Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2012/12/24 10:12:06
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/22 11:42:23 (permalink)
0
John,
 
Thank you very much--this is most helpful.  Have you had any problems with running on various WINC1500 firmware versions, e.g. 19.52 or 19.54?
 
I'm incorporating this WINC1500 wifi capability into a salable product for a future business of mine.  This is only my second foray into marketing a firmware product, and I noticed that the header in your file calls for copyright and redistribution acknowledgement of John Malaugh.
 
I'm not a lawyer and I'm not sure how this is supposed to work or if anything is expected of me, but are you asking that your (company's?) name be attributed in user documentation for my product if I use your driver?  If so, would this in any way impact my ownership or ability to market and distribute my product?
 
#38
malaugh
Super Member
  • Total Posts : 387
  • Reward points : 0
  • Joined: 2011/03/31 14:04:42
  • Location: San Diego
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/25 08:15:34 (permalink)
0
Regarding problems with the older firmware version on the WINC part.  Yes, there are some routers the earlier firmware did not work with, and some questionable disconnects.  We now specify 19.6.1 exclusively.  The new WINC part number include the firmware version.
 
Regarding the copyright.  Not sure why I put it there, do whatever you like with the code.  Just do not strip off my copyright from the source file and substitute your own.  I am just trying to make sure my code does not become copyrighted in someone else's code. 
 
 
#39
DougD
Junior Member
  • Total Posts : 75
  • Reward points : 0
  • Joined: 2012/12/24 10:12:06
  • Location: 0
  • Status: offline
Re: WINC1500 and PIC32MZ, without Harmony 2019/03/25 08:45:27 (permalink)
0
Understood John.  Thanks again for your help.
 
I implemented the WINC1500's UART connectivity on my board, so I can update its firmware if necessary.  It would be nice to be able to download it's firmware directly from the PIC32MZ upon initialization, without needing an RTOS.
 
#40
Page: < 123 > Showing page 2 of 3
Jump to:
© 2019 APG vNext Commercial Version 4.5