PDA

View Full Version : Need info on PIC+Internet



financecatalyst
- 8th September 2012, 22:49
I have never done this before so I need some help with hooking my PIC onto internet. I have bought this from eBay:

http://www.ebay.com/itm/Mini-ENC28J60-Ethernet-LAN-Network-Module-For-51-AVR-STM32-LPC-/140843724204?pt=LH_DefaultDomain_0&hash=item20caf0adac#ht_1428wt_1037

I have some questions regarding this module:
1) Is there anything else needed in terms of hardware apart from my PIC to connect my PIC to internet
2) Has anyone attempted sending an e-mail using this module or received data from a server etc

HenrikOlsson
- 8th September 2012, 23:15
Hi,
1) No, as far as hardware goes you should be set.
2) No, with that chip you'll have to implement the TCP and UDP protocol stacks in your PIC firmware. This is not an easy task but it can certainly be done. Fred Eady of EDTP has posted code here on the forum. I believe his code was targeting a PIC with built in ethernet but it shows the stack implementation and the details around that.

An alternativ solution is to use a module with the Wiznet W5100 or W5200 chips, they implement the TCP and UDP protocol stacks in the chip which makes it a whole lot easier on the PIC side. Yet other alternative are one of the modules available from manufacturers like Tibbo, Lantronix, Netmedia and others.

/Henrik.

financecatalyst
- 9th September 2012, 00:15
Would this be a good module to start with: http://www.hobbytronics.co.uk/wiznet-wiz820io
This one has Wiznet5200

I am trying to find some code for it currently and also trying to find some TCP/IP stack building code in the PIC itself as the module mentioned in my original post is much more cost effective than this one.

mackrackit
- 9th September 2012, 04:21
Maybe..
http://www.picbasic.co.uk/forum/showthread.php?t=7321

HenrikOlsson
- 9th September 2012, 08:04
Yes, mackrackit provided the link to the EDTP code I was thinking of.

You can get the W820IO directly from Wiznet (http://shop.wiznettechnology.com/Sub_Modules/en/product/detail_page.asp?cateid=48&pid=1161) for $19.90 which is about half of what it costs at HobbyTronics. I haven't seen any PBP code specifically for the W5200 but I've written and published (http://www.picbasic.co.uk/forum/showthread.php?t=14876) quite a bit of code for the W5100 which is simmilar so it shouldn't be too hard to get going on the W5200 (I intend to do that at some point). If you want to use the W5100 you could get the WIZ812MJ (http://shop.wiznettechnology.com/Sub_Modules/en/product/detail_page.asp?cateid=48&pid=1026)

Yes, these are more expensive than a ENC28J60 module but it makes up for that by being easier to use if you're not a networking protocol expert. The other modules from Lantronix and Tibbo that I mentioned is likely even easier to use but costs even more. It's really up to you to decide where your sweetspot is.

/Henrik.