Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

ICSP confusion can only see MiniJTAG. Please help


Best Answer Chris Walker, 13 September 2013 - 09:36 PM

Hi Jason, Yes, those drivers should take care of things for you :) You'll want to use the SPI bus from pins D11/12/13. We auto-map the hardware peripheral # to "SPI bus instance #1" in software so you'll just use it as the main SPI bus. Chris Go to the full post


  • Please log in to reply
13 replies to this topic

#1 Jason.Net

Jason.Net

    Advanced Member

  • Members
  • PipPipPip
  • 41 posts

Posted 11 September 2013 - 06:07 PM

Hello everyone. I have done a lot of searching but not had any luck so please forgive me if this has come up before.

 

After reading through the forums I was fairly confident that an Arduino ethernet shield would work with my Netduino 2. Right up until I realised that the ICSP header had been improved. The extract below suggests that the ICSP header is still available but looking around the board schematic I can't see where the Shield would pick up the pins RESET, MOSI, SCK,MISO etc which made up the old ICSP header.

 

I'm pretty sure I am going to need them as the ethernet board I have ordered shows a header on the base.

http://www.amazon.co...0?ie=UTF8&psc=1

 

This was from the Netduino plus 2. I have the Netduino 2.

 

You might notice that we swapped out the 6-pin ICSP header for a 10-pin MiniJTAG header. The goal is to enable developers to compile their own firmware using GCC--and debug both native and managed code at the same time. If you need the ICSP header for a shield, simply sandwich a MakerShield in the middle: it'll route the ICSP pins for you.

 

Does anyone know how to get these signals so that I can add ethernet to my Netduino 2?

 

Thanks

Jason



#2 Jason.Net

Jason.Net

    Advanced Member

  • Members
  • PipPipPip
  • 41 posts

Posted 12 September 2013 - 04:38 PM

Okay a bit of an update. It seems like I can create an SPI interface and wire that to the Arduino Ethernet shield thanks to the information on here and on the wiki.

 

http://wiki.netduino.com/SPI.ashx

 

However the .Net firmware will expect the Ethernet to be on a specific interface and I don't know which one that is.

 

 

If it is not possible to get a Wiznet Arduino Shield working on the Netduino 2 could someone please put me out of my misery?

 

Thanks



#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 12 September 2013 - 09:58 PM

Hi Jason.Net, I recommend that you either insert a MakerShield between the Arduino Ethernet Shield and the Netduino 2...or that you route the SPI pins using jumper wires. Once you do that, you'll want to grab the experimental Wiznet drivers for Netduino. You can't get the performance and flexibility of a Netduino Plus 2 with the Netduino + Arduino Ethernet combo, but you'll be able to talk to the Internet. Does that make sense? Chris

#4 Jason.Net

Jason.Net

    Advanced Member

  • Members
  • PipPipPip
  • 41 posts

Posted 13 September 2013 - 04:10 PM

Hi Jason.Net, I recommend that you either insert a MakerShield between the Arduino Ethernet Shield and the Netduino 2...or that you route the SPI pins using jumper wires. Once you do that, you'll want to grab the experimental Wiznet drivers for Netduino. You can't get the performance and flexibility of a Netduino Plus 2 with the Netduino + Arduino Ethernet combo, but you'll be able to talk to the Internet. Does that make sense? Chris

 

Hi Chris

Thanks for the response. I assume you mean these drivers? I am using VS2012 and 4.3 firmware etc.

http://forums.netdui...hernet-shields/

 

 No problem in routing the signals but as SPI1 doesn't seem to be connected on the Netduino 2 are you refering to SPI2 ? These are brought out on D11,12,13. I can then create an SPI port using PB12 as SS with something like

 

SPI.Configuration(Pins.GPIO_PIN_D12, LOW, 0, 0, HIGH, HIGH, 10000, SPI.SPI_module.SPI2);

 

 

Thanks for all of the help. Much appreciated

Jason



#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 September 2013 - 09:36 PM   Best Answer

Hi Jason, Yes, those drivers should take care of things for you :) You'll want to use the SPI bus from pins D11/12/13. We auto-map the hardware peripheral # to "SPI bus instance #1" in software so you'll just use it as the main SPI bus. Chris

#6 Jason.Net

Jason.Net

    Advanced Member

  • Members
  • PipPipPip
  • 41 posts

Posted 14 September 2013 - 10:09 AM

Thanks again Chris.

I'll report back when I've got it all connected and then all the details will be on this page if anyone else wants to do it.



#7 jacobgladish

jacobgladish

    New Member

  • Members
  • Pip
  • 6 posts

Posted 31 December 2013 - 11:26 PM

I think I have a very similar problem. I'm trying to get the cc3000 shield to work with netduino 2.

 

http://www.adafruit.com/products/1491

 

I assumed that I wouldn't need to deal with the ICSP pins on the wifi shield since I have the board stacked. Am I missing something?



#8 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 January 2014 - 06:43 AM

Hi jacobgladish, What do you have the Adafruit shield stacked on top of? I didn't see a datasheet on Adafruit's website so I'm not sure if they connect D11-D13 to the ICSP pins internally. If it isn't routing its ICSP pins and the shield you're stacking it on top of also isn't doing so, I'd recommend soldering the ICSP header ontp the Adafruit shield and connect jumper wires from there to D11-D13. Chris

#9 jacobgladish

jacobgladish

    New Member

  • Members
  • Pip
  • 6 posts

Posted 01 January 2014 - 07:17 PM

Chris,

 

This is the closest I can find to any detailed wiring. 

 

http://learn.adafrui...i/cc3000-shield



#10 jacobgladish

jacobgladish

    New Member

  • Members
  • Pip
  • 6 posts

Posted 01 January 2014 - 07:27 PM

I have board stacked on netduino 2. I do not have the 2x3 ICSP header installed as it doesn't match the 2x5 on the netduino 2. There's also a schematic here:

 

http://learn.adafrui....png?1379351866

[color=rgb(82,82,82);font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;] [/color]



#11 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 01 January 2014 - 08:23 PM

Hi jacobgladish, Can you ping Adafruit and ask them if the shield is designed to work with 3.3V boards such as Netduino and Arduino Due? There's a 5V->3.3V logic level converter on board (since the WiFi chip is not 5V) and I assume that it should work okay with 3.3V logic. But it would be good to double-check. You shouldn't need to solder on the ICSP header or worry about the jumper pads. It looks like the SPI is corrected properly for Netduino. Chris

#12 jacobgladish

jacobgladish

    New Member

  • Members
  • Pip
  • 6 posts

Posted 02 January 2014 - 04:01 AM

"[color=rgb(0,0,0);font-family:verdana, arial, helvetica, sans-serif;font-size:11px;]It has an onboard 3.3V regulator that can handle the 350mA peak current, and a level shifter to allow 3 or 5V logic level." [/color]

 

[color=rgb(82,82,82);font-family:'Helvetica Neue';]On the CC3000 shield, we use the following pin connections[/color]

  • SCK - #13
  • MISO #12
  • MOSI #11
  • CS for CC3000 #10
  • VBAT_EN #5
  • CS for SD Card #4
  • IRQ #3

 

In WifiAdapter.cs I noticed these comments:

 

                // On NetduinoPlus2:
                // D4 is 28
                // D5 is 24
                // D6 is 25
 
[color=rgb(82,82,82);font-family:'Helvetica Neue';]Can you tell me how you get those pin numbers? [/color]


#13 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 02 January 2014 - 08:52 AM

Hi jacobgladish, To get pins, just use Pins.GPIO_PIN_D4, etc. If you want their integer values, you can do:
int pinNumber = (int)Pins.GPIO_PIN_D4
Chris

#14 jacobgladish

jacobgladish

    New Member

  • Members
  • Pip
  • 6 posts

Posted 03 January 2014 - 12:53 AM

Chris,

 

I haven't done extensive testing, but that seems to work. I can scan and connect to wifi and establish connections. Thanks.

 Cpu.Pin interruptPin = (Cpu.Pin)SecretLabs.NETMF.Hardware.Netduino.Pins.GPIO_PIN_D3; Cpu.Pin chipSelectPin = (Cpu.Pin)SecretLabs.NETMF.Hardware.Netduino.Pins.GPIO_PIN_D10; Cpu.Pin enablePin = (Cpu.Pin)SecretLabs.NETMF.Hardware.Netduino.Pins.GPIO_PIN_D5; using (var wifi = new WifiAdapter("Adafruit CC3000 Shield",     SPI.SPI_module.SPI1, interruptPin, chipSelectPin, enablePin)) {   }





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.