1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Using ENC28j60 Ethernet controller?

Discussion in 'Automotive Electronics' started by memo2009in, Mar 22, 2012.

  1. memo2009in

    memo2009in New Member

    Joined:
    Mar 22, 2012
    Messages:
    6
    Likes:
    0
    Hello,

    I need basic guidelines on how to use ENC28j60 Ethernet controller and a PIC (easy one) to create a project that enables me to :

    1-Control a relay (or more than one) thru the internet.
    2-Read ADC outputs.

    what i need (software, hardware) ?

    I've read so many sites talking about the ENC28j60 Ethernet controller based circuits, but i couldn't make my mind about the basic components i need.

    I need the basic principle . that's why the simple the circuit the better.

    Thanks in advance :)
     
    Last edited: Mar 28, 2012
  2. memo2009in

    memo2009in New Member

    Joined:
    Mar 22, 2012
    Messages:
    6
    Likes:
    0
    Guys, i need help here. :)
     
  3. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,253
    Likes:
    961
    Location:
    Loveland, CO USA
    ONLINE
    I am using the siteplayer to turn relays on/off and to read switches and voltages over the internet.
    http://netmedia.com/siteplayer/webserver/spk1.html
    The development board is expensive but the little board with the brains on it is not too bad.
    I do the programming in HTML.

    Here is a screen shot of one of my projects.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. cowboybob

    cowboybob Well-Known Member Most Helpful Member

    Joined:
    Oct 22, 2011
    Messages:
    3,022
    Likes:
    477
    Location:
    James Island, SC

    That's pretty cool, ron.

    Did you construct or buy the relay output/analog input units?
     
    Last edited: Apr 11, 2012
  6. memo2009in

    memo2009in New Member

    Joined:
    Mar 22, 2012
    Messages:
    6
    Likes:
    0
    Thank you ron.
    The problem is, i want to do this one for my graduation research, and i can't use a kit for it. i have to build it based on a PIC and ENC28j60 chip. :)
     
  7. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,253
    Likes:
    961
    Location:
    Loveland, CO USA
    ONLINE
  8. memo2009in

    memo2009in New Member

    Joined:
    Mar 22, 2012
    Messages:
    6
    Likes:
    0
    Yes ron i know. i already mentioned that in my question :)
    but as you may know, it's a bit hard to start without knowledge, that's pushed me to ask about the (basic) instructions to know from where to start. thanks for replaying again.
     
  9. memo2009in

    memo2009in New Member

    Joined:
    Mar 22, 2012
    Messages:
    6
    Likes:
    0
    Ok, so this is what i got, this may help other people :

    Hardware side
    ==========
    1- any controller that contain SPI module to be able to connect to the Ethernet controller (ENC28j60 in this case).

    2- level shifter (LS), because the ENC28j60 needs and works on 3.3V and the controller i chose works on 5V. The ENC28J60 input is 5v tolerant, meaning it can connect to the microcontroller output without a LS, but the microcontroller input needs a voltage about 5v to be able to recognize the logic levels (1,0) and that's why there are a LS between the ENC28J60's output & the controller's input.

    3- voltage regulator, this one is easy just read about it.

    4- RJ45 jack with Ethernet transformer (sometime Ethernet transformer is called magnetics or magjack) .

    5- A 25 MHz Crystal oscillator is necessary for the ENC28J60 to work (providing clock Pulses) and another one with 20Mhz for the controller (if you didn't use the internal oscillator of the microcontroller) .

    6- other components, like different values resistors, capacitors, LEDs, Relays, transistors, diodes, LCD screens ... etc .. Depending on what you need.


    Software side
    ==========
    There are several approachs to be able to write the microcontroller's firmware, and every one of it have it's advantages and disadvantages. You can choose what's suitable for you depending on different factors, including, your programming skills, available time, the type of your application or device.

    1- MicroC , mikroBasic, mikroPascal, they contain libraries written in a HLL (High Level Language) to make easier for you. Check This

    2- Assembly language : This is a LLL (Low Level Language) .. Every microcontroller has a different number of Assembly instructions depending on it's internal structure and complexity. to understand and use Assembly language for a particular controller, you need to know it's internal structure like register names and functions, ADC's (Analog digital converters) and it's memory locations. That's why it's harder than other programs written in a HLL like C, Basic .. etc.

    3- There are other fields you may need (Depending on your goal) .. For example, knowing something about these stuff will certainly helps if you're trying to control things over the internet :

    1-Networks : Such as network protocols ( IP, TCP, IMCP, UDP, DNS ... etc) and network devices ( Hubs, Switches, Routers, Modems, Cables types .. etc).

    2- Web languages : For instance, HTML( This one is so easy and you can learn it in a very short time), HTTP is essential to learn but learning Java script is useful too.


    SO, Determine what you need, choose you microcontroller based on that, and learn about it.

    Hope this will help as a BASIC guideline on how to start .. Good luck ;)
     
  10. Bloodninja

    Bloodninja New Member

    Joined:
    Mar 7, 2010
    Messages:
    44
    Likes:
    0
    Thank you so much for your clarification memo2009in. You have answered most of my questions, however 1 question remains:

    What hardware is used to program the ENC28J60 ?
     
  11. memo2009in

    memo2009in New Member

    Joined:
    Mar 22, 2012
    Messages:
    6
    Likes:
    0
    You don't need to program the ENC. All the programming is in the Controller.

     
  12. Farahh

    Farahh New Member

    Joined:
    Apr 5, 2014
    Messages:
    1
    Likes:
    0
    Hello, I am doing a very similar project and I have been researching a lot but there are so many projects online and I am almost lost! I found this post and it appears you are done with your project. I can use your help really. I have to connect the board to a PC. I don't know if you did this in your project. Can you send me a schematic of the circuit? And the code you used also.
     

Share This Page