Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Start to work with ENC28J60

Status
Not open for further replies.

hungrymind

Newbie level 5
Newbie level 5
Joined
Jan 6, 2013
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,346
Hi, this is my first post in this edaboard.com

I have to design a very simple a device with the connectivity of Ethernet.
It just want to send an UDP packet to my Server with few bits of data.
I have a PIC18F452 and a ENC28J60.

I gone through the TCP/IP stack and SPI Ethernet ENC28j60 library. Both of these web sites are saying those libraries can be used with all PIC18 family.
But PIC18F452 has just 1536bytes of RAM. Is it possible to build a circuit with this PIC?
 

If its just a few bytes that you need to send, then technically the PIC is probably sufficient, you just need enough RAM to build up the packet that you wish to send - it doesn't need 1500 bytes if you're just sending a few bytes over UDP.
You could consider if you really need the TCP/IP stack - you may wish to just implement your own cut-down stack that would only send UDP.
I've not done this with PIC or ENC. But for a project (with different hardware) where I wanted to receive (not transmit) UDP packets, it proved very easy, because I chose to ignore checksums, and just read the UDP chunk that I was interested in. I chose to verify that I had correct reception by just sending multiple UDP packets from the server, and embed a sync byte in the protocol that I was carrying over UDP. I did not use any TCP/IP stack.
 
Its possible to do this with the mentioned devices. I have used a 18F2620 and an ENC28J60 with belfuse magjack connector to send and receive UDP,TCP packets. But I use CCS C compiler, and I had to develop my own stack for this. Although in your case it should be easier as Microchip as a very good stack.

You do not have to use the entire 1500 bytes, you can restrict the device to small packets of say 512 bytes size. But to implement UDP you will need to implement other protocols like ARP, ICMP (ping mostly) and maybe DHCP (static IP is easier). You probably also have to consider IPv6 addressing in case your system is for commercial use..

thanks
a
 
Hi, sky_123 & arbj2
Thank you so much. you have solved my big doubt.
I have no experience with TCP/IP Stack and I couldn't able to find any simple sample codes for it.
Do you have any simple sample codes for TCP/IP stack with PIC18F?
Any way I'm trying to use SPI Ethernet ENC28j60 library.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top