PICcoder.co.uk Forum  


::post new topic::
<< Start < Prev 1 2 3 4 5 6 7 8 Next > End >>
Re:Building an ENC28J60 Ethernet Dev Board
Date: 2006/03/15 02:28 By: asmallri Status: User  
Karma: 2  
Posts: 5
graphgraph
Adding the FRAM is easy. It is an SPI device and is pin compatible with a 25LC256 EEPROM. You can even use EEPROM drivers to drive it. You connect up the FRAM to the SPI bus of the PIC identical to connecting the ENC28J60. Add another line for a chip select for the FRAM.

The FRAM will even work with the Microchip stack example that uses the EEPROM. I had to make some small changes but this is because my hardware is different than the Microchip base platform and Microchip's stack hardware platform initialization code is poorly implemented.
reply | quote

Re:Building an ENC28J60 Ethernet Dev Board
Date: 2006/03/16 14:23 By: Mat Status: Admin  
Karma: 7  
Posts: 211
graph
Good suggestion, Mat
reply | quote

enc28j60
Date: 2006/03/20 11:13 By: Genadi Status: Visitor  
 
Ian
i'm working with pic 18f8722 (10Mhz)
what changes i need to do in the software to make my web project with enc28j60 to work.
reply | quote

Re:enc28j60
Date: 2006/03/20 11:33 By: Ian Status: Moderator  
Karma: 5  
Posts: 85
graphgraph
Genadi,

The pin out of the 18f8722 is the same as the 18f4620 so the hardware is the same.

Software wise I listed 4 changes, you will need to make 4 similar changes, if you are running at 3.3volts.

  • In complier.h the clock frequency of the oscilator used by the pic needs to be changed 10Mhz.
    #define CLOCK_FREQ (10000000) // Hz

  • In the hardware definitions in enc28j60.c the MCP_RESET pin must be changed to RD3
    #define MCP_RESET_TRIS (TRISD_RD3)
    #define MCP_RESET_IO (LATD3)

  • The linker script should be changed to 18f8722 and in 'Configure', 'Select Device' the 18f8720 selected

  • In the 'Configure', 'Configuration Bits' the Oscillator should be set to 'HS' for the 10Mhz crystal in the circuit.


  • There is a problem with the silicon revision B1 and B4 (see errata) which means that the SPI bus is unstable at low frequencies. Running at 10Mhz is likely to cause this. If you adjust the hardware so you can run the PIC at 5 volts then you can use the PLL and push the PIC up to 40Mhz speeding up the SPI bus and fixing the problem.

  • In complier.h the clock frequency of the oscilator used by the pic needs to be changed 40Mhz.
    #define CLOCK_FREQ (40000000) // Hz

  • In the hardware definitions in enc28j60.c the MCP_RESET pin must be changed to RD3
    #define MCP_RESET_TRIS (TRISD_RD3)
    #define MCP_RESET_IO (LATD3)

  • The linker script should be changed to 18f8722 and in 'Configure', 'Select Device' the 18f8720 selected

  • In the 'Configure', 'Configuration Bits' the Oscillator should be set to 'HS-PLL Enabled freq=4xFosc1' for the 10Mhz crystal in the circuit to be PLLed up to 40Mhz.


  • Hope this helps,
    Ian
    reply | quote

    Re:enc28j60
    Date: 2006/03/21 09:28 By: Wohleb Status: Visitor  
     
    Sorry if this is off-topic, but I have 5V PIC18s and want to interface them with the ENC. Assuming that the ENC produces signals above the 5V activation threshold, I can just directly connect SDO from ENC to the PIC, and run SDI from the ENC to the pic through an appropriately valued resistor. Correct?
    reply | quote

    Re:enc28j60
    Date: 2006/03/21 11:12 By: Ian Status: Moderator  
    Karma: 5  
    Posts: 85
    graphgraph
    The ENC runs on 3.3volts and produces 3.3volts signals. The ENC is 5volt tolerant and so doesn't need anything on the input pins. Check the data sheet for your pic, but I think if you use the right port it should be able to sense 3.3volts.

    To do things properly you should really put a buffer on the output from the ENC to bring the voltages up to 5 volts. I do have a friend running an ENC with a 5volt PIC without the buffers and it works fine for him.

    Ian
    reply | quote

    Re:enc28j60
    Date: 2006/03/28 15:58 By: Filippo Status: Visitor  
     
    Hi,
    which type of inductors you have used in the project? and what is the value of L1 (ferrite bead)?
    thank you!
    filippo
    reply | quote

    Re:enc28j60
    Date: 2006/03/28 16:02 By: Ian Status: Moderator  
    Karma: 5  
    Posts: 85
    graphgraph
    L1 is a ferrite bead. A little ring of ferrite which the wire goes through. To stop noise and interference I believe.

    Ian
    reply | quote

    Re:enc28j60
    Date: 2006/03/28 16:16 By: Filippo Status: Visitor  
     
    Ian wrote:
    L1 is a ferrite bead. A little ring of ferrite which the wire goes through. To stop noise and interference I believe.

    Ian


    sorry Ian, but which value must be L1?
    Filippo
    reply | quote

    Fixed Ip address
    Date: 2006/05/17 10:46 By: Filippo Status: Visitor  
     
    I done the circuit, the led of pic lamped and so the ledB in the enc. LedA is fixed on.
    I have connected the circuit to dhcp server but it seems not receive an ip address.
    Is it possible to set a fixed ip address in the Enc?
    thank you
    filippo
    reply | quote

    Re:Fixed Ip address
    Date: 2006/05/17 10:52 By: Ian Status: Moderator  
    Karma: 5  
    Posts: 85
    graphgraph
    It is possible to set up the enc with a fixed ip address. Have you tried running ethereal (or other packet sniffer)? The ENC should send out some packets when you start it up as it tries to connect to the DHCP server. Are you getting these packets?

    Ian
    reply | quote

    << Start < Prev 1 2 3 4 5 6 7 8 Next > End >>
    ::post new topic::