PDA

View Full Version : W5200 four more sockets



DynamoBen
10-21-2011, 04:48 PM
Looks like wiznet has a new IC, it's exactly like the W5100 but has 4 more sockets which makes a total of 8. I'm going to contact them and see if they are planning on releasing a module that is pin compatible with the one used on the PropController. If that ends up being the case then we can move to the W5200 allowing us to not only have 4 concurrent data streams (like we have now) but also a webpage that's available all the time for configuration.

If they don't release a module with the same footprint we may need to design a breakout board.

http://www.wiznet.co.kr/Sub_Modules/en/product/Product_Detail.asp?cate1=5&cate2=7&cate3=56&pid=1144

jstjohnz
10-24-2011, 02:03 AM
The module with the W5200 is the WIZ812io. Data sheet attached. I have a couple of samples on hand. It's not the same footprint as the WIZ812, much smaller, with 2 6-pin connectors. There will have to be some driver changes made as the register assignments, while similar, vary slightly. I can see this being able to run at least 5 universes of E1.31, possibly 6, with a separate socket for web server as you mention. There is a burst transfer mode so it's certainly possible that thruput could be improved if that can be utilized.

I haven't gotten any pricing info yet but I assume it'll be no more expensive than the WIZ812, possibly a bit cheaper. Supposed to be available within the next couple of weeks.

These are some notes I put together when comparing the 5100 and 5200:

WIZ5100 WIZ5200
Sockets 4 8
Tx/RxBuffer Mem 16K 32K
TX/RX LEDs yes no
interface SPI/Parallel SPI only

addressing:
common regs 0000-002f 0000-0036
socket regs 0400-07ff 4000-47ff
tx mem 4000-5fff 8000-bfff
rx mem 6000-7fff c000-ffff

common register differences:
0016 int mask reg socket int mask reg
001A rx memory size reserved '5200 uses diff scheme
001B tx memory size reserved
001E reserved PPPoE auth algorithm
001F reserved chip version

2A-2D unrch IP adrs
2E-2F unrch port#
30,31 not exist interrupt low level timer register
34 not exist socket interrupt register (replaces bits in IR used on 5100)
35 not exist phy status
36 not exist interrupt mask reg


socket register differences:
xx1E-1F reserved rx/tx mem sz
xx2A,2B reserved rx wrt pntr
xx2C reserved int mask reg
xx2D,2E reserved frag offset




MR register: same exc bits 0,1 not used in 5200 (ind bus mode and auto-inc)

IR interrupt reg: on 5200 individual socket interrupt bits aren't used
IMR intrpt mask reg same as above

PHY status (new on 5200)
5 link status 0=dn, 1=up
3 pwr dn status 1= in pwr down mode


Socket Register differences:

Mode Register:
6 reserved MAC Filter enable
command reg: no change
status reg: no change

DynamoBen
10-24-2011, 11:15 AM
Thanks for the info. I saw the module you speak of and was hoping to convince them to create a new module that matches the existing footprint. If they decide not to then I'm going to need to create a breakout board.

ags0000
10-24-2011, 12:05 PM
I was looking at this new chip also. I don't need more sockets, but I do need more memory. The W5200 delivers there, but as noted above the W5200 supports only SPI. It is described as "high speed SPI", and runs at a clock speed of 80MHz. Intuition tells me that while the Propeller counters can keep up with this, the limiting factor will still be reading/writing the data bits, which will require at least 4 Propeller clocks or 50nS per bit read/write (20MHz, or 2.5MB/s - without any processing of the data).

There is also a W5300, but it is much "bigger" (100 LQFP, 128kB Rx/Tx memory, 8/16 bit data bus, parallel/indirect interface only (no SPI mode), 8 sockets) than the W5100 or W5200. The evaluation module with this chip has a form factor incompatible with the WIZ812MJ.

DynamoBen
10-24-2011, 12:11 PM
I was looking at this new chip also. I don't need more sockets, but I do need more memory. The W5200 delivers there, but as noted above the W5200 supports only SPI.

Which works out perfectly for me, since I'm already using SPI.


It is described as "high speed SPI", and runs at a clock speed of 80MHz. Intuition tells me that while the Propeller counters can keep up with this, the limiting factor will still be reading/writing the data bits, which will require at least 4 Propeller clocks or 50nS per bit read/write (20MHz, or 2.5MB/s - without any processing of the data).

The SPI code on the Propeller is currently slowed down to work with the W5100, there is room to make it a lot faster. The Spin code and data processing will be the bottle neck, both of which are solvable if the need arises.


There is also a W5300, but it is much "bigger" (100 LQFP, 128kB Rx/Tx memory, 8/16 bit data bus, parallel/indirect interface only (no SPI mode), 8 sockets) than the W5100 or W5200.

For me no SPI is a deal breaker.

ags0000
10-24-2011, 12:51 PM
Sounds like the W5200 is a good fit for you. And it's a lower pin count, you may be able to save money and board real estate by incorporating it directly onto your PropController board and save the module-middle-man.

Even with indirect interface mode I had to slow down the Properller for reads. Specs say the data is valid for read at 48nS. The Propeller clocked at 80MHz requires 50nS per (most) PASM instructions. Notwithstanding, I had to insert an extra 50 nS to meet timing. Fortunately, I was able to find something to do instead of a nop in most cases. That was on my protoboard, so maybe it will work without the extra 50nS on my "real" board.

I'll be very interested to hear what speed you can get out of SPI mode if you try the W5200. It's always nice to regain 8 pins.

DynamoBen
10-24-2011, 01:51 PM
Sounds like the W5200 is a good fit for you. And it's a lower pin count, you may be able to save money and board real estate by incorporating it directly onto your PropController board and save the module-middle-man.

I'm affraid the QFN package it uses isn't going to be doable for most folks. I suspect I will incorporate the new module and call it done.


Even with indirect interface mode I had to slow down the Properller for reads.

Yeah I had the same issue and ended up slowing things down. I have to look at the new specs to see if things can be sped up.


I'll be very interested to hear what speed you can get out of SPI mode if you try the W5200. It's always nice to regain 8 pins.

I have to get a hold of a module and get some free time, both are a challenge at the moment.

DynamoBen
10-24-2011, 02:04 PM
I have to get a hold of a module and get some free time, both are a challenge at the moment.

So there are no Register/Memory READ Timing specs, and the SPI specs look like they are about 4 times faster. Assuming Memory reads can keep up with the SPI timing I should be able to crank things up a bit.

jstjohnz
10-24-2011, 05:29 PM
I was looking at this new chip also. I don't need more sockets, but I do need more memory. The W5200 delivers there, but as noted above the W5200 supports only SPI. It is described as "high speed SPI", and runs at a clock speed of 80MHz. Intuition tells me that while the Propeller counters can keep up with this, the limiting factor will still be reading/writing the data bits, which will require at least 4 Propeller clocks or 50nS per bit read/write (20MHz, or 2.5MB/s - without any processing of the data).

There is also a W5300, but it is much "bigger" (100 LQFP, 128kB Rx/Tx memory, 8/16 bit data bus, parallel/indirect interface only (no SPI mode), 8 sockets) than the W5100 or W5200. There is also no evaluation module with this chip that I can find.

WIZ830MJ is the module that uses the W5300.

DynamoBen
10-24-2011, 08:28 PM
Just got a response from Wiznet, looks like I'm going to have to respin my design and build some breakout boards. I'm working on obtaining some modules for testing.

DynamoBen
10-24-2011, 08:41 PM
Samples are on the way and they said the new module will be "available in the end of November at global/local
distributors." I have no idea what the cost will be but if its close I will make the switch (or accommodate both) in future versions.

DynamoBen
11-02-2011, 08:31 PM
Wiznet came through and the samples arrived today. When I can a little time I will start playing around with the W5200.

DynamoBen
12-19-2011, 04:29 PM
I just looked up the retail price on this module and its $19.99, so I think I'm going to move to this for all future designs.

jstjohnz
12-19-2011, 07:58 PM
I checked Saelig about a week ago or so and it wasn't listed, but I see it there now. Have you played with this at all yet? I'd be interested in working with you on a driver if nobody has done it yet.

DynamoBen
12-20-2011, 01:46 PM
I checked Saelig about a week ago or so and it wasn't listed, but I see it there now. Have you played with this at all yet? I'd be interested in working with you on a driver if nobody has done it yet.

Haven't started using it yet. My plan is to mock up a PropController Relay board, get DMX working, and then swap out DMX for the new Wiznet module. If we can get a good driver I plan to post it to not only the PropController site but also the Parallax OBEX.

DynamoBen
12-21-2011, 12:48 PM
I started the driver last night. I decided to go through the W5100 driver and make the changes to it to make it compatible with the W5200. No promises on timeline yet but at least I have a start.

chilloutdocdoc
12-23-2011, 04:37 PM
Can't wait to see the updates Ben. E1360 anybody?

DynamoBen
12-23-2011, 05:11 PM
E1360 anybody?

How about we make an open source version. ;)

chilloutdocdoc
12-23-2011, 07:09 PM
Sounds like a great idea too :)

DynamoBen
01-27-2012, 06:59 PM
I've started porting the W5100 driver from Parallax to the W5200. The code seems functional I can read and write to the chip but I can't ping the module, waiting for a reply from Wiznet on this matter.

Once I'm over that hurdle I will crank up the speed on the SPI code. If memory serves the W5100 SPI speed was 4Mhz, the W5200 can do 80Mhz.

jstjohnz
01-28-2012, 01:28 AM
Hey Ben,

I'd be interested in working with you on that project.

DynamoBen
01-30-2012, 02:30 PM
Hey Ben,

I'd be interested in working with you on that project.

Sorry for the delay, I don't always get email notifications from the forum.

In what way would you like to work with me?

At present the code has been updated to support the new SPI packet structure, all of the new registries have been added, I've trimmed a fair amount of code "fat", and now I'm working on SPI speed and timing. The vast majority of the code I've updated is in pASM and is the code I created a few years back that ended up in the "official" W5100 driver. With the exception of the fact that the module isn't responding to pings and doesn't consider a switch a valid link, I'm doing OK.

DynamoBen
01-31-2012, 06:18 PM
Is it me or is Figure 20 and 21 backwards? Look here (javascript:fnc_FileDown('427',%20'ReferenceFiles' ,'iEthernet_W5200_datasheet_v1.21_en[0].pdf');) pages 73 and 75.

jstjohnz
01-31-2012, 07:05 PM
It looks that way, as far as MOSI and MISO, during the data transmisison portion.

DynamoBen
01-31-2012, 07:10 PM
It looks that way, as far as MOSI and MISO, during the data transmisison portion.

Good thing I didn't use the figures as my reference. The text isn't much better, I guess pseudo code is a more universal language. ;)

jstjohnz
01-31-2012, 07:21 PM
Eben the pseudo code appears wrong, it doesn't set the opcode bit for a write. Also the pseudo-code refers to data length >1 triggering burst mode, while the text for both read and write sats data length >2 triggers burst mode.

I'm not sure what the distiction is really, isn't byte mode just a burst of length 1?

DynamoBen
01-31-2012, 07:27 PM
I'm not sure what the distinction is really, isn't byte mode just a burst of length 1?

I'm going to go with data length >1 triggering burst mode, since it makes the most logical sense. I suspect the text was supposed to say "greater than or equal to 2."

jstjohnz
01-31-2012, 07:39 PM
I'm sure that's correct otherwise there would be no way to send a burst of 2 bytes.

DynamoBen
04-23-2012, 02:42 PM
Update: A month or two ago I was running into some problems with the driver so I shelved the project. Two days ago I picked it back up I've been able to get the driver to function, or at least the early tests seem to prove that out. I plan to increase the overall driver speed next, optimize some of the code, and then I'll look into implementing burst mode (a new feature for this device).

jstjohnz
04-24-2012, 12:42 AM
Update: A month or two ago I was running into some problems with the driver so I shelved the project. Two days ago I picked it back up I've been able to get the driver to function, or at least the early tests seem to prove that out. I plan to increase the overall driver speed next, optimize some of the code, and then I'll look into implementing burst mode (a new feature for this device).

What was the issue that you resolved?

DynamoBen
04-24-2012, 12:50 AM
What was the issue that you resolved?

My assumption about how sockets where addressed. In the W5100 socket 0 is $0400 and socket 1 is $0500. With the W5200 socket 0 is $4000 and socket 1 is $4100.

Now I'm trying to increase the read/write speed, which wasn't working for me before and I'm still struggling with it. I need to hook up a scope and ensure the timing is what I think it is and compare that with the spec. Read/write is at 20mhz but it isn't functioning correctly, the crazy part this is supposed to work up to 80mhz.

DynamoBen
04-26-2012, 01:39 PM
I'm back to struggling with the speed. I'm tempted to post the slower functional version to google project site for people to use. Anyone interested in it?

jstjohnz
04-27-2012, 01:08 PM
I'm back to struggling with the speed. I'm tempted to post the slower functional version to google project site for people to use. Anyone interested in it?

I'm definitely interested.

Jeff Millard
04-28-2012, 11:17 AM
Ben and Jim,

Is this module's pin-out the same as the 5100, so that Jim could be able to use the WS5200 to make the Web Server available full time on the E681 without hardware mods? Or are there also limitations to the Prop that prevent this possibility?

Just wondering...

Jeff

budude
04-28-2012, 11:59 AM
Ben and Jim,

Is this module's pin-out the same as the 5100, so that Jim could be able to use the WS5200 to make the Web Server available full time on the E681 without hardware mods? Or are there also limitations to the Prop that prevent this possibility?

Just wondering...

Jeff

See post #2 - they are different footprints. Fortunately access to the web server is really not needed once it is set up. Is there some reason you would want it up full time?

DynamoBen
04-28-2012, 12:18 PM
See post #2 - they are different footprints. Fortunately access to the web server is really not needed once it is set up. Is there some reason you would want it up full time?

It is indeed a different footprint. And while you don't need the webserver I still believe it should be available at all times, so I will be moving to the WIZ820io for all new designs.

Jeff Millard
04-28-2012, 12:25 PM
...I still believe it should be available at all times...

I'm with you Ben. I don't look at it from the perspective of an end user... "once it's set up, it's not needed" I find myself constantly switching things around trying different arrangements. Being able to make changes quickly from a live webserver makes testing so much easier. Due to the fact that I'm still using LOR software along with Jim's ELOR, I chose to forgo using the forth Cluster in favor of the webserver. (The LOR network has bandwidth limitations that make using a full 680 pixels a bit of a challenge anyway)

Jeff

budude
04-28-2012, 12:39 PM
I'm with you Ben. I don't look at it from the perspective of an end user... "once it's set up, it's not needed" I find myself constantly switching things around trying different arrangements. Being able to make changes quickly from a live webserver makes testing so much easier. Due to the fact that I'm still using LOR software along with Jim's ELOR, I chose to forgo using the forth Cluster in favor of the webserver. (The LOR network has bandwidth limitations that make using a full 680 pixels a bit of a challenge anyway)

Jeff

If you are doing live setup/testing just do "QUIT" and you'll have normal data access in 10 seconds. Yes - the extra socket would be better but again I don't see it as a big deal I guess... You almost certainly won't be making changes once your show is set up since even minor changes would disconnect pixel location to channels in Vixen/LSP, etc.

DynamoBen
04-28-2012, 12:51 PM
If you are doing live setup/testing just do "QUIT" and you'll have normal data access in 10 seconds. Yes - the extra socket would be better but again I don't see it as a big deal I guess... You almost certainly won't be making changes once your show is set up since even minor changes would disconnect pixel location to channels in Vixen/LSP, etc.

This really boils down to an engineering decision made based on what was available at the time. Since there were 4 sockets and all 4 were used for data there was no option but to have a temporary webpage. Now we get 8 for the same price so moving forward this will be a non-issue.

Jeff Millard
04-28-2012, 03:18 PM
This really boils down to an engineering decision made based on what was available at the time. Since there were 4 sockets and all 4 were used for data there was no option but to have a temporary webpage. Now we get 8 for the same price so moving forward this will be a non-issue.

I'm liking it! ...and I can assure you I'll be rotating the hardware out in favor of the new as it becomes available.

Jeff

Blackbeard
04-30-2012, 07:24 AM
What's a socket?

I'm just getting started with the Propeller stuff, and obviously, the Wiznet stuff is even more vaporish to me. I understand the basics of the Wiznet, that it's an ethernet chip/module with the proper stack to do so, just not following the socket stuff yet.

Sorry for the interruption of this thread and thanks for any help.

DynamoBen
04-30-2012, 10:58 AM
What's a socket?

Think of a socket as a network connection, sockets are used to send and receive data. They are configured with a port number (IE webserver is 80) and a protocol (TCP or UDP). On the 5100 there were 4 available, so if you wanted to receive 4 universes of sACN there were none left over for a webserver (you would need 5). With the 5200 you have 8 so you have "extras" for things like DHCP and what not.

That help a little?

RPM
04-30-2012, 11:51 AM
I'm also interested in it... any chance of getting it from you?


I'm back to struggling with the speed. I'm tempted to post the slower functional version to google project site for people to use. Anyone interested in it?

DynamoBen
04-30-2012, 12:13 PM
I'm also interested in it... any chance of getting it from you?

I was going to do this over the weekend but got distracted. I will make the changes to get it functional today and try to test and post it tonight.

Blackbeard
04-30-2012, 02:47 PM
Think of a socket as a network connection, sockets are used to send and receive data. They are configured with a port number (IE webserver is 80) and a protocol (TCP or UDP). On the 5100 there were 4 available, so if you wanted to receive 4 universes of sACN there were none left over for a webserver (you would need 5). With the 5200 you have 8 so you have "extras" for things like DHCP and what not.

That help a little?

Ports on a single IP address? (IE 192.168.0.1:80 for HTTP, 192.168.0.1:443 for HTTPS) or can the IP be different? I'm guessing the ports available are not "hard-wired" but available to be assigned. For instance, I could use port 777 if I wanted to for my web server if my code responded to that port.

I guess I should read the Data sheet but I'm already 200 pages behind reading the Propeller manual. I'll sit back and listen and read and hope this doesn't seem out of line in this thread.

Thanks for the info.

DynamoBen
04-30-2012, 02:54 PM
Ports on a single IP address? (IE 192.168.0.1:80 for HTTP, 192.168.0.1:443 for HTTPS) or can the IP be different?

Single IP, can't be different IPs.


I'm guessing the ports available are not "hard-wired" but available to be assigned. For instance, I could use port 777 if I wanted to for my web server if my code responded to that port.

Correct.


I guess I should read the Data sheet but I'm already 200 pages behind reading the Propeller manual. I'll sit back and listen and read and hope this doesn't seem out of line in this thread.

The datasheet talks about how to do this stuff but not why, save yourself the time and study SPIN. Once you know SPIN then you can dig into networking.

RPM
04-30-2012, 05:56 PM
No big rush... got some WIZ820's on order, so it will be a few days till they get here anyway ;)


I was going to do this over the weekend but got distracted. I will make the changes to get it functional today and try to test and post it tonight.

DynamoBen
05-01-2012, 08:20 PM
Posted a working version of the W5200 driver here (http://code.google.com/p/propcontroller/source/browse/trunk/Drivers/W5200_Driver.spin).

There are still two open items one is to increase the speed it is still at 10mhz. The other is to implement the new multibyte read/write. Let me know if you find bugs.

jstjohnz
05-04-2012, 12:47 AM
Edited to delete original issue, problem solved, foulup on my end. Initial testing looks good. Leaving the following info re WIZ820IO pinout as compared to WIZ812 in case it's of use to anyone:


WIZ__WIZ
820__812__Signal
J1-1______GROUND
J1-2______GROUND
J1-3_J1-1__MOSI
J1-4_J2-3__SCLK
J1-5_J2-4__nss = scs/
J1-6______interrupt, not used

J2-1______GROUND
J2-2______+3.3V
J2-3______+3.3V
J2-4______PWDN, not used, pulled down on WIZ820
J2-5_J2-2__RESET = RESET/ = hardware reset
J2-6_J1-2__MISO

jstjohnz
05-04-2012, 12:31 PM
So far the driver seems to be working fine. The only thing I had to change was the name of the start method for compatibility with the old driver (and maybe I should have changed the old driver's start name). I haven't checked the actual time to process an E1.31 packet yet, but I am able to process 6 universes of E1.31 data with no apparent issues.

Faster timing will just be icing on the cake. Great work Ben.

DynamoBen
05-05-2012, 04:09 PM
So far the driver seems to be working fine.
Faster timing will just be icing on the cake. Great work Ben.

Thanks, glad to hear it is working for you.

I went to a Propeller meeting this morning and spoke with a guy who wants to do ethernet stuff for a project he is working on. I gave him a W5200 board and as luck would have it he's an accomplished ASM programmer so he is going to take a look the code to see if it can be sped up.

DynamoBen
06-21-2012, 05:28 PM
I've posted the W5200 driver to the Parallax OBEX. http://obex.parallax.com/objects/869/

After posting I solicited methods for speeding up the SPI speed on the Propeller forums. Long story short I think its as fast as it can/will be. So I will move onto implementing "burst" mode which will indirectly speed up communications. Instead of writing 40 bits for each data byte in a string, it will write 8 bits for each byte after the first byte has been written.

DynamoBen
08-15-2012, 02:14 PM
Big thanks to jstjohnz for finding the error of my ways in regards to getting the driver to communicate faster. The "trick" was keeping the read at 10mhz and making the write 20mhz. I will be updating the PropController site and Parallax OBEX with ver 1.1 once I give it a spin (pun intended).

DynamoBen
08-15-2012, 07:06 PM
New driver has been tested and has been uploaded, enjoy.

DynamoBen
10-08-2012, 10:08 AM
jstjohnz updated the driver to support burst mode, which is unique to the W5200. He is seeing an increase of almost 4 times from the W5100 read/write speed with this change. Once I review the code and test it I will post it to the PropController repository and the Parallax OBEX.

DynamoBen
10-08-2012, 11:34 PM
jstjohnz updated the driver to support burst mode, which is unique to the W5200. He is seeing an increase of almost 4 times from the W5100 read/write speed with this change. Once I review the code and test it I will post it to the PropController repository and the Parallax OBEX.

Posted in both location, current version is 1.2...enjoy