Link to home
Create AccountLog in
Avatar of 3XLcom
3XLcom

asked on

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
Avatar of HappyCactus
HappyCactus
Flag of Italy image

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
Avatar of 3XLcom
3XLcom

ASKER

I know this datasheets but i need an example source and circuit just a simple one.
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.
Avatar of 3XLcom

ASKER

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
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.
Avatar of 3XLcom

ASKER

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 :(
Avatar of 3XLcom

ASKER

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
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).
Avatar of 3XLcom

ASKER

pic18 series
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
Avatar of 3XLcom

ASKER

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

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.

Avatar of 3XLcom

ASKER

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
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.
Avatar of 3XLcom

ASKER

this is what we plan to buy for internet connection :
http://www.mikroe.com/eng/products/view/107/telit-easygsm-gprs-gm862/
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
Avatar of 3XLcom

ASKER

:S now everything changed in my mind :S let me check this datasheets a little bit
Avatar of 3XLcom

ASKER

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 ?
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.
Avatar of 3XLcom

ASKER

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
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

Avatar of 3XLcom

ASKER

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 ?
http://arduino.cc/en/Tutorial/HomePage

Check the WebServer example.

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

You only need the ppp part.
Avatar of 3XLcom

ASKER

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 ?
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
Avatar of 3XLcom

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of HappyCactus
HappyCactus
Flag of Italy image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account