Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ENC28J60 Schematic help

Status
Not open for further replies.

hemnath

Advanced Member level 3
Advanced Member level 3
Joined
Jun 24, 2012
Messages
702
Helped
61
Reputation
120
Reaction score
57
Trophy points
1,308
Location
Chennai
Visit site
Activity points
6,589
Hi all,
I've bought ENC28J60 module from ebay.

**broken link removed**

I want to connect this module with PIC18F4620.

I searched in the net and found a circuit to connect the module with pic?

I have some doubts. Please clarify?
1. Why 180E resistors are used in SI, SCK, CS lines?
2. Do i have to use +5V for IC 74ACT125 supply pin?
3. Do i have to connect INT, WOL to microcontroller?

Thanks in advance.
 

Attachments

  • pic10t-2.0.pdf
    256.2 KB · Views: 97

The ENC28J60 is a 3.3v device, if you intend on interfacing the ENC28J60 to microcontroller operating at 5v, some method of voltage level translation will be required.

Both the 180Ω resistors and the 74ACT125 tristate buffers act as a method of voltage level translation.

There are numerous ways of achieving safely the required voltage level translation, some ways are preferable over others.

If both the microcontroller and ENC28J60 are operating at 3.3v, then no voltage level translation is required, the devices can be directly connected.

Whether or not the ENC28J60 Interrupt line is required depends largely on your application and the accompanying software/firmware.


An often overlooked resource is utilizing development and PICtail board schematics and example code:

PICtail Ethernet Board

Ethernet PICtail Plus Daughter Board


BigDog
 

Thanks bigdogguru.

Right now i have PIC18LF2520. I have interfaced ENC28J60 with micro-controller. Power supply +3.3V. And I have connected 1 LED to microcontroller pin. I want to control that LED from the internet. How to do that? How to configure microchip application libraries for my purpose?
 

Right now i have PIC18LF2520. I have interfaced ENC28J60 with micro-controller. Power supply +3.3V. And I have connected 1 LED to microcontroller pin.

Good news is voltage level translation is no longer a concern, the bad news the PIC18LF2520 has relatively limited Flash/RAM resources to implement a TCP/IP stack.

I want to control that LED from the internet. How to do that? How to configure microchip application libraries for my purpose?

Well, essentially you have a few choices:

1. You study the datasheet and along with your advanced knowledge of TCP/IP, you write your own ENC28J60 Library/API.

2. Find an existing ENC28J60 Library/API with source code and port it to the PIC18LF2520 if required.

3. You download and install Microchip's TCP/IP stack, modify it to accommodate the relatively limited Flash/RAM resources of the PIC18LF2520.

4. Find examples of the Microchip's TCP/IP stack which has already been modified for a PIC which has similar limited Flash/RAM resources as that of the PIC18LF2520.

Olimex at one time offered a PIC-MINI-WEB development board which utilized the PIC18F25J10 which has 32KB Flash and 1KB RAM, even less RAM than the PIC18LF2520.

They also modified the Microchip's TCP/IP stack to accommodate the limited resources of the PIC18F25J10 and offer it for free download:

Olimex PIC-MINI-WEB

PIC-MINI-WEB is with dimensions of only 55 x 36 mm, but don't let this to fool you. This board is very powerful and will allow you to connect almost everything to the Internet. The board has a PIC18F25J10 microcontroller with 32KB of program Flash memory, 1024 RAM memory and allow Microchip free TCP-IP stack to be programmed. In addition on board flash of 1 Mbit (128KB) is available as data storage for web pages etc info. The LAN connector could be connected to 10 a Mbit Etherent switch or hub. There is also an IDC14 connector with 10 GPIOs available for future extensions and a power supply and reset signals. What can you do with this board? You name it: you can setup a web server with dynamic web pages which allow you to read PIC resources or to drive them through web interface, i.e. to read ADC and display it on the web or to toggle GPIO outputs from the web, a very convenient way to make home automation for instance and to monitor and control your home from anywhere with Internet. Another service this board can run is a FTP server, or you can control the PIC by Telnet, or you can send and receive e-mails and trigger hardware events with them. All this is possible thanks to the free firmware which Microchip provide, and the best of it all is that it has no upfront charges for software nor royalties.

From the above description, you should be able to port the demo code to the PIC18LF2520 and control the LED as desired.

The product also offers the schematics of their PIC-MINI-WEB dev board, which might be handy.


BigDog
 

Thanks bigdogguru for the help.

One of my friend told me, controlling the LED from internet is quite complicated rather than sending adc data to webpage. He told me that i have to configure microchip library according to my purpose. Reading the very big files to configuring is now very difficult for me.

I shall connect the pot to the adc pin of uc and send the data to webpage.

Which portions are to be configured in the microchip demo files.
 

Hi, After a very long time. I'm working on this project again.

the bad news the PIC18LF2520 has relatively limited Flash/RAM resources to implement a TCP/IP stack.

So I thought to use PIC18LF4620.

I am using demo app in TCPIP folder. When i compiled with PIC18F8722, it shows no error. But when I compiled it with 18F4620, it shows lot of error. I manage to solve some of the error by changing some lines in the file "HWP PIC18EX_ENC28.h".

changes done in

Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// ENC28J60 I/O pins
#define ENC_SSPBUF          (SSPBUF)            //*** SSP1BUF
#define ENC_SPISTAT         (SSPSTAT)           //*** SSP1STAT
#define ENC_SPISTATbits     (SSPSTATbits)       //*** SSP1STATbits
#define ENC_SPICON1         (SSPCON1)           //*** SSP1CON1
#define ENC_SPICON1bits     (SSPCON1bits)       //*** SSP1CON1bits
#define ENC_SPICON2         (SSPCON2)           //*** SSP1CON2
 
// ENC28J60 I/O pins
#define ENC_SSPBUF          (SSPBUF)            //*** SSP1BUF
#define ENC_SPISTAT         (SSPSTAT)           //*** SSP1STAT
#define ENC_SPISTATbits     (SSPSTATbits)       //*** SSP1STATbits
#define ENC_SPICON1         (SSPCON1)           //*** SSP1CON1
#define ENC_SPICON1bits     (SSPCON1bits)       //*** SSP1CON1bits
#define ENC_SPICON2         (SSPCON2)           //*** SSP1CON2



But it shows one error.
Executing: "C:\Program Files (x86)\Microchip\mplabc18\v3.46\bin\mplink.exe" /p18F4620 "Obj-C18-PIC18EX_ENC28\Announce.o" "Obj-C18-PIC18EX_ENC28\ARP.o" "Obj-C18-PIC18EX_ENC28\AutoIP.o" "Obj-C18-PIC18EX_ENC28\BerkeleyAPI.o" "Obj-C18-PIC18EX_ENC28\Delay.o" "Obj-C18-PIC18EX_ENC28\DHCP.o" "Obj-C18-PIC18EX_ENC28\DHCPs.o" "Obj-C18-PIC18EX_ENC28\DNS.o" "Obj-C18-PIC18EX_ENC28\DNSs.o" "Obj-C18-PIC18EX_ENC28\DynDNS.o" "Obj-C18-PIC18EX_ENC28\ENC28J60.o" "Obj-C18-PIC18EX_ENC28\FTP.o" "Obj-C18-PIC18EX_ENC28\Hashes.o" "Obj-C18-PIC18EX_ENC28\Helpers.o" "Obj-C18-PIC18EX_ENC28\HTTP2.o" "Obj-C18-PIC18EX_ENC28\ICMP.o" "Obj-C18-PIC18EX_ENC28\IP.o" "Obj-C18-PIC18EX_ENC28\LCDBlocking.o" "Obj-C18-PIC18EX_ENC28\MPFS2.o" "Obj-C18-PIC18EX_ENC28\NBNS.o" "Obj-C18-PIC18EX_ENC28\Reboot.o" "Obj-C18-PIC18EX_ENC28\SMTP.o" "Obj-C18-PIC18EX_ENC28\SNMP.o" "Obj-C18-PIC18EX_ENC28\SNTP.o" "Obj-C18-PIC18EX_ENC28\SPIEEPROM.o" "Obj-C18-PIC18EX_ENC28\SPIFlash.o" "Obj-C18-PIC18EX_ENC28\SPIRAM.o" "Obj-C18-PIC18EX_ENC28\StackTsk.o" "Obj-C18-PIC18EX_ENC28
\TCP.o" "Obj-C18-PIC18EX_ENC28\TCPPerformanceTest.o" "Obj-C18-PIC18EX_ENC28\Telnet.o" "Obj-C18-PIC18EX_ENC28\TFTPc.o" "Obj-C18-PIC18EX_ENC28\Tick.o" "Obj-C18-PIC18EX_ENC28\UART2TCPBridge.o" "Obj-C18-PIC18EX_ENC28\UART.o" "Obj-C18-PIC18EX_ENC28\UDP.o" "Obj-C18-PIC18EX_ENC28\UDPPerformanceTest.o" "Obj-C18-PIC18EX_ENC28\CustomHTTPApp.o" "Obj-C18-PIC18EX_ENC28\CustomSNMPApp.o" "Obj-C18-PIC18EX_ENC28\MainDemo.o" "Obj-C18-PIC18EX_ENC28\BerkeleyTCPClientDemo.o" "Obj-C18-PIC18EX_ENC28\BerkeleyTCPServerDemo.o" "Obj-C18-PIC18EX_ENC28\BerkeleyUDPClientDemo.o" "Obj-C18-PIC18EX_ENC28\GenericTCPClient.o" "Obj-C18-PIC18EX_ENC28\GenericTCPServer.o" "Obj-C18-PIC18EX_ENC28\PingDemo.o" "Obj-C18-PIC18EX_ENC28\SMTPDemo.o" "Obj-C18-PIC18EX_ENC28\UARTConfig.o" "Obj-C18-PIC18EX_ENC28\ENCX24J600.o" /u_CRUNTIME /u_DEBUG /z__MPLAB_BUILD=1 /z__MPLAB_DEBUG=1 /m"C18-PIC18EX_ENC28.map" /w /o"C18-PIC18EX_ENC28.cof"
MPLINK 4.48, Linker
Device Database Version 1.13
Copyright (c) 1998-2011 Microchip Technology Inc.
Error - could not find definition of symbol 'RandomInit' in file 'Obj-C18-PIC18EX_ENC28\StackTsk.o'.
Errors : 1

Please help to solve this error.

Thanks in advance.
 
Last edited by a moderator:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top