ENC28J60 - Read EREVID

General discussion on mikroPascal for AVR.
Post Reply
Author
Message
ljmarkus
Posts: 14
Joined: 17 Dec 2007 17:35
Location: Germany

ENC28J60 - Read EREVID

#1 Post by ljmarkus » 17 Dec 2007 17:38

Hello,

how can i read the EREVID from the ENC28J60

Code: Select all

  
Spi_Ethernet_Init(PORTB, 0, PORTB, 1, myMacAddr, myIpAddr, Spi_Ethernet_FULLDUPLEX) ;

ver := ??????????
bye, markus

ljmarkus
Posts: 14
Joined: 17 Dec 2007 17:35
Location: Germany

#2 Post by ljmarkus » 18 Dec 2007 14:58

Hello.

None of an idea?

Lg, markus

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

#3 Post by yo2lio » 18 Dec 2007 18:28

Code: Select all

Var EREV_ID : byte;

.....
Init_Spi, Init_Enc, .... etc
....

Spi_Ethernet_SetBitReg (_ECON1,%00000001); // select Bank 3
Spi_Ethernet_SetBitReg (_ECON1,%00000010);
EREV_ID := Spi_Ethernet_ReadReg($12);
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

ljmarkus
Posts: 14
Joined: 17 Dec 2007 17:35
Location: Germany

#4 Post by ljmarkus » 19 Dec 2007 08:24

Hello.

Thanks for your Answere.
So its work fine:

Code: Select all

Var EREV_ID : byte;

.....
Init_Spi, Init_Enc, .... etc
....

Spi_Ethernet_SetBitReg (ECON1,%00000001); // select Bank 3
Spi_Ethernet_SetBitReg (ECON1,%00000010);
EREV_ID := Spi_Ethernet_ReadReg($12);

without underline at ECON1

lg, markus

Post Reply

Return to “mikroPascal for AVR General”