Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2081
  • Last Modified:

ENC28J60 sample

I need a very simple sample for using ENC28J60 with Pic18Fxxxx series to use stack library, just a device which connect to the internet and publish a simple web site that is all.
neccessary things :
-Schema of circuit
-Written with C/C++

Thank you
0
3XLcom
Asked:
3XLcom
  • 14
  • 14
1 Solution
 
HappyCactusCommented:
check the microchip website, on the enc28j60 page[1]. They have a couple of development boards and demo boards, all with manual and source code. In the manual there are usually the schematics. See for example the picdem.net 2 board manual [2].
Check also the sample code in the microchip website, in the tcpip stack source there are many examples.
Check the an870 [3] application note and the other an. you'll find about enc28j60 and the tcpip stack.



[1] http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en022889
[2] http://ww1.microchip.com/downloads/en/DeviceDoc/51623b.pdf
[3] http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en012108
0
 
3XLcomAuthor Commented:
I know this datasheets but i need an example source and circuit just a simple one.
0
 
HappyCactusCommented:
Did you take a look to the picdem.net 2 board (link [2]) ? If you look carefully, you'll see the schematics.
The datasheet is never enough to learn to use a device, you must look at the application notes, user guides, examples et cetera. Every manufacturer provides this material, you only have to search for it.
0
 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

 
3XLcomAuthor Commented:
i do'nt want a complete board solution just a simple one with this two object pic & enc not any more and make just an handshake
0
 
HappyCactusCommented:
Take that schematics and remove all that you do not need.
But what kind of schematic you need? Usually in the datasheet there are some scheme about how to connect different pins (oscillator, filters, isolation transformers, power supply decoupling), can you be more specific about your problem?
I doubt you'll find exactly what you want: a transceiver / controller like the enc24j60 cannot work alone, without an mcu.
Try to explain exactly what is your problem. If I can, I'll try to help you.
0
 
3XLcomAuthor Commented:
i want to make a simple web server which opens a web site when you connect on the other part of process we know what to do but i could now find a complete sample solution with sample source code and libraries like stack and .... For example mplab mc18 builder is not build with stack library :(
0
 
HappyCactusCommented:
0
 
3XLcomAuthor Commented:
Because i want to do it by myself and understand how the process goes on this side ;
i am just looking for a project sth. like this :
http://320volt.com/pic18f4620-ve-enc28j60-ile-ev-otomasyonu-icin-web-sunucu/
but a simpler one
i could not find 16pt8515 in my country so i could not build it unfortunately
0
 
HappyCactusCommented:
You are not tied to a specific mcu, just find one that haves an SPI available (to connect to the enc28j60) and enough ram and flash. Download the tcp/ip stack and see what mcu are supported (pic18, 24 and 32 are ok - I suggest you pic24 or pic32).
0
 
3XLcomAuthor Commented:
pic18 series
0
 
HappyCactusCommented:
You can buy it from digikey[1].
Or choose any pic18 device available (provided it has enough ram and at least an SPI with an IRQ line) [2].



[1] http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail&name=PIC18F4620-I/P-ND
[2] http://www.microchipdirect.com/Chart.aspx?branchId=1004&mid=10&treeid=1
0
 
3XLcomAuthor Commented:
Sir i need some thing like this not a complete application , just simiplar to this because we are programmer and we do not understand electronics so much . We will just let it work to the net and then we will send and receive some basic info.

http://mcu.cz/news.php?extend.1539.3

0
 
HappyCactusCommented:
I understand. You have two options:

1) find a complete project, if it exists, and realize the circuit by yourself, or
2) buy an already made circuit and program it by yourself.

Since you do not have any experience in electronics, I suggest you to choose the second option, since finding the project that fits your needs exactly is very difficult. I gave you some suggestion, with the microchip demo boards. They have all you need and they are relatively cheap. You'll spend no time with hardware setup, since they work without any need to solder any components.
If you decide to try the first one, take a project and simplify it, for example, by removing unneeded devices (the one you showed seems what you need, you only have to remove the micro-sd cards slot). But this option is not necessarily cheaper than the first one (it depends on how much your time value).
Note that simpler solution than that one of your link are impossible.

Hope that helps.

0
 
3XLcomAuthor Commented:
we need to just a little bit :) because we need to send values over gprs but :D we open and close the lamps with pic :D i think we get so much learned :P


that is why i need simple sample applications just easier ones to understand the process
0
 
HappyCactusCommented:
Excuse me, maybe I don't understand... enc24j60 is an ethernet transceiver. To talk with grps you need a serial port and any mcu have an UART - you only need an rs232 level translator like the max3232 or similar.
This is the reason why I suggested you to take a devboard - you have all you need.
0
 
3XLcomAuthor Commented:
this is what we plan to buy for internet connection :
http://www.mikroe.com/eng/products/view/107/telit-easygsm-gprs-gm862/
0
 
HappyCactusCommented:
I know it! I used for at least 3 or 4 projects.
But again - you need a serial port, not an enc28j60.
Also, you need the PPP protocol - do not know if microchip's tcp/ip stack does have it - see the AN724[1]


[1] http://ww1.microchip.com/downloads/en/AppNotes/00724c.pdf
0
 
3XLcomAuthor Commented:
:S now everything changed in my mind :S let me check this datasheets a little bit
0
 
3XLcomAuthor Commented:
Sir is this possible to firstly connect the gprs card to the internet with ppp over the pic18f then
we will connect to the device with ENC and we will publish the system over tcp / ip or should you tell me a better way ?
0
 
HappyCactusCommented:
Sorry, I think I didn't understand the question.
the enc28j60 is just an ethernet controller, you need it only if you want to connect to a 10/100Mbit ethernet link.
if you do not want realize a wireless (3G/GPRS) router, you do not need both GPRS and Ethernet controller.
0
 
3XLcomAuthor Commented:
We need to transfer some values to the gprs module over pic18f i am sorry for that i know very about the electronics.
I need to find a way for this
0
 
HappyCactusCommented:
So you do not need the enc28j60. Take a PIC device that support tcp/ip stack and the PPP protocol, and with an rs232 serial port. Arduino can be a great deal [1].


[1] http://arduino.cc/en/Main/Hardware

0
 
3XLcomAuthor Commented:
how should i publish a web site over the ppp and which one of this modules do you refer me to use ? Do you know any sample project like this ?
0
 
HappyCactusCommented:
http://arduino.cc/en/Tutorial/HomePage

Check the WebServer example.

http://arduino.cc/en/Tutorial/WebServer

You only need the ppp part.
0
 
3XLcomAuthor Commented:
So as i see this is a perfect solution for us

1 - GM862  for GPRS Connectivity
2 - Arduino with ATMEGA168 for easy PPP and web server operations
3- Pic18f For easy and reliable operations

is this your suggestion ?
0
 
HappyCactusCommented:
You do not need pic18f with this architecture, Arduino Mega[1] haves the GPIO you require. Or Arduino PRO mini[2], if space is a requirement. But check for all other product.

[1] http://arduino.cc/en/Main/ArduinoBoardMega
[2] http://arduino.cc/en/Main/ArduinoBoardProMini
0
 
3XLcomAuthor Commented:
Atmega is good but it does not seem as profoseional beside this it is cheaper then microchip products , at the other side it's memory is too small then pic18f , now i really do not know what to do let me check a little bit again
0
 
HappyCactusCommented:
Check the arduino website: they have many hardware and software samples.
There are many projects available, and most of them uses tcp/ip stacks. There are also web servers, that you can modify as required.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 14
  • 14
Tackle projects and never again get stuck behind a technical roadblock.
Join Now