I've connected it directly to a PC throught a cross cable with following paramethers:
PC
ip 192.168.1.2
mask 255.255.255.0
board
ip 192.168.1.1
mask 255.255.255.0
this is the simple ping program:
Code: Select all
sfr sbit Net_Ethernet_24j600_CS at LATF0_bit;
sfr sbit Net_Ethernet_24j600_CS_Direction at TRISF0_bit;
unsigned char myMACAddress[6] = {0x00, 0x16, 0x36, 0x9B, 0xBC, 0x21};
unsigned char myIPAddress[4] = {192, 168, 1, 1};
//timer interrupt, it works and increments seconds
//udp and tcp procedures, do nothing
void main() {
ADPCFG = 0xFFFF;
//initialization
initTimer();
SPI1_Init();
Net_Ethernet_24j600_Init(myMACAddress,myIPAddress,Net_Ethernet_24j600_AUTO_NEGOTIATION);
Net_Ethernet_24j600_stackInitTCP();
while(1){
Net_Ethernet_24j600_doPacket();
}