Connecting a PIC18F67J60 to a PC via Ethernet

Thread Starter


Joined Jul 2, 2009

I need to communicate via my PC with a PIC18F67J60 (which has embedded Ethernet). The PIC will send data to the PC (using TCP), the PC will process it and send it back.

I found the Microchip TCP/IP stack v5.0 program but i was unsuccessful using it.

Anyone has an idea how should I do it?
I read the whole datasheet of the pic and many other papers, and tried several codes (C language) but with no success.

thank you for your time.

Thread Starter


Joined Jul 2, 2009
unsuccessful in the meaning nothing was happening on the ethernet port. I used a packet sniffer and it didn't catch anything, the leds of the port were not blinking (they were off).

If anybody is familiar with the microship's TCP/IP stack, here is the first code i tried which is an example taken from the documentation of the stack. All functions used comes predefined with the TCP/IP stack:


#pragma config WDT = OFF
#pragma config FOSC = HSPLL
#pragma config DEBUG = OFF
#pragma config XINST = OFF
#pragma config ETHLED = ON

// Declare this file as main application file
#include "StackTsk.h"
#include "Tick.h"
#include "dhcp.h"

void main(void)
// Perform application specific initialization
// Initialize Stack components.


// Enter into infinite program loop
// Update tick count. Can be done via interrupt.
// Let Stack Manager perform its task.

StackApplication(); // test the connection by sending random packets.

Thread Starter


Joined Jul 2, 2009
I am using a ready-made dev board. It's the OLIMEX P67J60.
And all the connection are good and as instructed


Joined Jan 16, 2008
The first question that springs to mind is how are you connecting to the PC. Are you going through a switch/hub or do you have a direct connection? If its a direct connection are you using a crossover cable?

Next, are you configuring the IP address manually or through DHCP. If DHCP, then do you have a DHCP server and can it communicate with your PIC.

Probable to get the board running you would be better off manually configure the IP address, network mask, gateway etc. That way you know what its address is and can do pings to see if its alive.