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

W5100 Driver


  • Please log in to reply
6 replies to this topic

#1 Krisw

Krisw

    New Member

  • Members
  • Pip
  • 2 posts

Posted 08 September 2010 - 07:05 AM

Hi all, I received my netduino last week, and I have one thing to say. Awesome! :D Haven't been involved with embedded programming for over 10 years now (mostly 68k stuff) , but can't believe how easy it is to get started with the board. great kudos to the secret labs guys. I have finally got my dfrobot W5100 ethernet shield working last night after a day of playing around with code, and wondered if anyone else had their ethernet shield working? I am now curious to know how to build a .net micro driver for the shield as opposed to a custom bolt-on with its own structure. Kris

#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 September 2010 - 09:02 AM

Krisw, Thanks for the post, and welcome to the Netduino community! Speaking of which...would you be willing to share your code for the W5100 shield with the community? :) We're working on a few Ethernet options as well... As far as integrating W5100 into the .NET MF, that can be done either in managed code (by creating a replacement for the System.Net classes) or in native code (by writing a "native driver" for the shield). Chris

#3 Krisw

Krisw

    New Member

  • Members
  • Pip
  • 2 posts

Posted 08 September 2010 - 03:24 PM

Krisw,

Thanks for the post, and welcome to the Netduino community!

Speaking of which...would you be willing to share your code for the W5100 shield with the community? :)

We're working on a few Ethernet options as well... As far as integrating W5100 into the .NET MF, that can be done either in managed code (by creating a replacement for the System.Net classes) or in native code (by writing a "native driver" for the shield).

Chris


Sure, although I will admit the code is fudged out of various bits of other peoples efforts on the net. I need to tidy it up and check it all works without blowing up! :)

Is there a default place that all drivers get deposited?

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 08 September 2010 - 05:04 PM

Sure, although I will admit the code is fudged out of various bits of other peoples efforts on the net. I need to tidy it up and check it all works without blowing up! :)

Is there a default place that all drivers get deposited?


Right now, we're sharing projects and code in the "Project Showcase" forum:
http://forums.netdui...oject-showcase/

We're also working on a Sandbox wiki which should be launching later this year--and should provide an even nicer repository.

If you post something online, please make sure that attribute the original authors as appropriate and that you're not using any legally-restricted 3rd-party source code.

Chris

#5 Dave

Dave

    New Member

  • Members
  • Pip
  • 8 posts
  • LocationRock Hill, SC

Posted 08 September 2010 - 09:18 PM

I have a W5100 module, not shield, hooked up on a proto-board to see how it works. I'm in the process of writing a set of managed classes to work with it, I'll post it when it's done and tested.

Unlike the Fez stuff, it will use the interrupt, and implement all the async stuff.

I wasn't going to say anything till it was done, but since someone else is looking at using the chip, I figured I would let you know that it was in progress.

The chip doesn't seem to work according to spec, and I'm trying to figure out why. The SPI timing diagrams that they have in their app note, seem to be wrong.

For example to read a register on the chip the following works as it should:
snip...
var outbuf = new byte[3];
var inbuf = new byte[1]l

oputbuf[0] = 0x0f;
outbuf[1] = //high byte of address;
outbuf[2] = //low byte of address;

spi.WriteRead(outbuf, inbuf, 3);
snip...
The correct value is read from the register.

However doing a 4 byte write, to write a value to the register does not work. You have to do four one byte writes. This should not work, since raising SS should clear the input sequence.

In about a week or so, since I have to work on what I get paid for, as well, I should have something to upload to the board.

--Dave

#6 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 September 2010 - 12:47 AM

We have some early W5100 code we've been working on as well. Perhaps we should all pool together our projects and make one really awesome driver? Chris

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 September 2010 - 07:25 AM

I just posted our experimental, partial W5100 Ethernet Shield support code. http://forums.netdui...hernet-shields/ Krisw, Dave--would you like to contribute, test, or borrow anything in regards to this code? Chris




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.