Solved

ENC28J60 sample

Posted on 2010-09-08
28
1,887 Views
Last Modified: 2012-05-10
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
Comment
Question by:3XLcom
  • 14
  • 14
28 Comments
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33634681
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
 

Author Comment

by:3XLcom
ID: 33635303
I know this datasheets but i need an example source and circuit just a simple one.
0
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33635327
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
 

Author Comment

by:3XLcom
ID: 33635332
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
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33635367
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
 

Author Comment

by:3XLcom
ID: 33635383
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
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33635405
0
 

Author Comment

by:3XLcom
ID: 33635596
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
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33636900
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
 

Author Comment

by:3XLcom
ID: 33636928
pic18 series
0
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33637009
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
 

Author Comment

by:3XLcom
ID: 33637050
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
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33637230
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
 

Author Comment

by:3XLcom
ID: 33637289
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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 12

Expert Comment

by:HappyCactus
ID: 33637405
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
 

Author Comment

by:3XLcom
ID: 33637445
this is what we plan to buy for internet connection :
http://www.mikroe.com/eng/products/view/107/telit-easygsm-gprs-gm862/
0
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33637534
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
 

Author Comment

by:3XLcom
ID: 33637600
:S now everything changed in my mind :S let me check this datasheets a little bit
0
 

Author Comment

by:3XLcom
ID: 33637652
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
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33637713
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
 

Author Comment

by:3XLcom
ID: 33637740
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
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33637884
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
 

Author Comment

by:3XLcom
ID: 33638245
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
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33638394
http://arduino.cc/en/Tutorial/HomePage

Check the WebServer example.

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

You only need the ppp part.
0
 

Author Comment

by:3XLcom
ID: 33638781
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
 
LVL 12

Expert Comment

by:HappyCactus
ID: 33644208
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
 

Author Comment

by:3XLcom
ID: 33644562
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
 
LVL 12

Accepted Solution

by:
HappyCactus earned 500 total points
ID: 33644606
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The Rasberry PI is a low cost piece of hardware that you can have a lot of fun with through experimenting and building/working on projects like media players, running a low cost computer, build data loggers etc. - see: https://www.raspberrypi.org
In this article we have discussed the manual scenarios to recover data from Windows 10 through some backup and recovery tools which are offered by it.
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now