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.

Ethernet controller ENC28j60 basic questions

Status
Not open for further replies.

embpic

Advanced Member level 3
Joined
May 29, 2013
Messages
742
Helped
80
Reputation
160
Reaction score
77
Trophy points
1,308
Location
india
Activity points
5,213
i saw one demo on proteus that ENC28j60 got ip after it run. and if we use this address in web browser then page like follows come.
so this page saved in host controller or Ethernet controller??
mac address is set by network or we can set ??????
 

i saw one demo on proteus that ENC28j60 got ip after it run. and if we use this address in web browser then page like follows come.
so this page saved in host controller or Ethernet controller??
mac address is set by network or we can set ??????
the page is held in the host computer - the ENC28J60 is just an Ethernet controller
https://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en022889

have a look at the applications notes on the above page

you set up the MAC address yourself, e.g.
Code:
#define MY_MAC_ADDRESS "00-1c-7e-85-fd-af"	//  set board to this MAC address
       setMACaddress(MY_MAC_ADDRESS, &AppConfig.MyMACAddr);
in practice we use a MCP74911 to give use a MAC address
https://www.microchip.com/wwwproducts/Devices.aspx?product=MCP79411
 

thank you sir, but MCP74911 is RTC then how it use to Set up MAC address.
 

The MCP79410, 11 and 12 also have a factory programmed unique number in their EEPROM which can be used as a MAC address if you want to use it. It makes it easier to mass produce equipment because you know each one will be different even though the components are the same.

Brian.
 

thank you sir, but MCP74911 is RTC then how it use to Set up MAC address.
ain addition to an RTC and EEPROM the MCP79411/12 has EUI-48/64 in ROM

can be read so
Code:
// I2C device address
static const int address = 0xa0;
unsigned char MACaddress[8]={0};
// read MCP79410  EUI-48 or EUI-64 node identy
int MCP79410readMACaddress(int display)
{
   // MAC address is at EPROM address FAhex
   unsigned char data[10] ={0}, check[3]={0, 0x4,0xa3};						// read from 0xfa
   int i;
   if(display)printf("\nread MCP79411 serail EEPROM with EUI-48/64 node identy\n");
	// read the MCP79411/12 ID 48 or 64 bit
 	MCP79410readEEPROMbyte(0xf0, data, 8);		// read the EUI node identy
   // if node ID does not exist return otherwise set it up
   for(i=0;i<8;i++)  MACaddress[i]=data[i];
   if(display)
		{
   		printf("read MAC address MCP79411 EUI-48/64 node identy ");
		for(i=0;i<8;i++) printf("%02x ", MACaddress[i]);
   		if(memcmp((void *) data, (void *)check, 3))
			{ printf("   ERROR !! EUI node ID incorrect!\n\r"); return 0; }
		else printf(" - OK!\n\r");
		}
   //printf("\n");
  // memcpy((void*)&AppConfig.MyMACAddr, (void*)data, sizeof(AppConfig.MyMACAddr));
   return 1;
}
see section 6.4 of the data sheet
https://www.microchip.com/wwwproducts/Devices.aspx?product=MCP79411
 

as a beginner which type communication i should use???
whether half duplex or full duplex??

and Like LEDB, is there any setting with connection of LEDA??
 


it's clear sir
now communication is of which type is simple to implement whether full duplex or half duplex?
 

it's clear sir
now communication is of which type is simple to implement whether full duplex or half duplex?
the original Ethernet, where stations were multi-dropped from a shared cable and used a contention protocol for access, were half-duplex, i.e. only one station could transmit at a time.
The advent of switched networks allowed full duplex communication, see
https://en.wikipedia.org/wiki/Ethernet
 

As written in datasheet that
The PHY registers are used for configuration, control and
status retrieval of the PHY module. The registers are not
directly accessible through the SPI interface; they can
only be accessed through the Media Independent
Interface (MII) implemented in the MAC

so then how to program the resister's related to PHY. I am not getting this point.
 

we use Microchip's TCP/IP stack
**broken link removed**

which enables the same application level code to be used across a number of devices, e.g. PIC18F97J60 with onboard ethernet, PIC24 with external ENC28j60 thru to PIC32MX795F512L with onboard 10/100Mbps Ethernet

if you are interested in low level details of the chips you could try the Microchip' TCP/IP forum
https://www.microchip.com/forums/f171.aspx
 

is it in Microchip Libraries for Applications (MLA)???
 

hello
this kind of ethernet connection is valid for LAN only or we can communicate with device anywhere where internet connection is available?
because i tried simulation on my PC and entered ip address in browser then page get opened.
but i tried to open this on another PC then it didn't get opened.
Is it happen in real time?
 

if you are connected to the internet via a router it can act like any other device such as a PC

you can connect to external IP addresses anywhere on the internet and so long are your router/firewall etc is set up correctly (e.g. if you are behind a NAT box) external devices can connect to you
 

i have connect my laptop to wifi router and in my laptop i have done simulation. and my pc is connected to internet through wifi router.
 

you will probably only have one external IP address assigned when you connect to the internet yet you may have several machines on the local LAN. In practice the machines on the LAN have local IP addresses such as 192.168.1.1, 192.168.1.2, etc. (these addresses may not appear on the external internet) The router contains a NAT (Network Address Translation) device which translates between the internal IP addresses and the external IP address. You can connect the PIC or any other device to the router, instal a TCP/IP client and it can make contact with external TCP severs. the problem occurs when you run a server on the local LAN - how does a client on the external internet contact it? You set up the router to forward particular packets to a sepcified machine. Usually called Port Forwarding' it specifies when a packet arrives from the external internet with a particular port number (e.g. TCP port 80 or UDP port 50) it will be forwarded to a specified machine, e.g. 192.168.1.12 which runs the server waiting on TCP port 80 (HTTP) and/or UDP port 65. Usually the machine running the server(s) will have a static IP address and the firewall must be set up to allow the packets thru to the server programs.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top