Hello,
how can i read out the predifined MAC inside the ENC624J600 from Ethernet Board 2.
Marc
How to get predefined MAC from ENC624J600
Re: How to get predefined MAC from ENC624J600
Hi,
You can do something like this (this is written in C, but the logic behind it can be easily implemented in Basic) :
Regards,
Filip.
You can do something like this (this is written in C, but the logic behind it can be easily implemented in Basic) :
Code: Select all
void ReadMAC(){
SPI_Ethernet_24j600_CS_Direction = 0;
SPI_Ethernet_24j600_CS = 0;
SPI1_Write(0xCA); // system reset , preprogrammed MAC address is available after the system reset
Delay_1sec();
SPI1_Write(0xC6); //Select Bank 3
// read MAC registers
myMacAddr[0] = SPI_Ethernet_24j600_readReg(MAADR1L);
myMacAddr[1] = SPI_Ethernet_24j600_readReg(MAADR1H);
myMacAddr[2] = SPI_Ethernet_24j600_readReg(MAADR2L);
myMacAddr[3] = SPI_Ethernet_24j600_readReg(MAADR2H);
myMacAddr[4] = SPI_Ethernet_24j600_readReg(MAADR3L);
myMacAddr[5] = SPI_Ethernet_24j600_readReg(MAADR3H);
}
SPI1_Init();
ReadMAC();
SPI_Ethernet_24j600_Init(myMacAddr, myIpAddr, SPI_Ethernet_24j600_AUTO_NEGOTIATION) ;
Filip.
Re: How to get predefined MAC from ENC624J600
Hello Filip,
thanks for the code - That's exactly what I looking for.
But the Problem is that the current ENC624J600 library version of MikroBasicPro has no support for the 24j600_readReg function.
@MikroE Team: when will the new version of the ENC624J600 library version of MikroBasicPro released? With the final release of the MikroBasicPro 4.8 compiler?
In library manager (only there, not in the help) of the current beta version i can see the new features already.
Regards,
Marc
thanks for the code - That's exactly what I looking for.
But the Problem is that the current ENC624J600 library version of MikroBasicPro has no support for the 24j600_readReg function.
@MikroE Team: when will the new version of the ENC624J600 library version of MikroBasicPro released? With the final release of the MikroBasicPro 4.8 compiler?
In library manager (only there, not in the help) of the current beta version i can see the new features already.
Regards,
Marc
Re: How to get predefined MAC from ENC624J600
Hi,
You can find this routine declaration and it's description in the following folder of the compiler :
Uses\GT64KW\__EthEnc24j600Private.mpas
Regards,
Filip.
You can find this routine declaration and it's description in the following folder of the compiler :
Uses\GT64KW\__EthEnc24j600Private.mpas
Regards,
Filip.