Intel 82550 Switch User Manual


 
Intel 8255x 10/100 Mbps Ethernet Controller Family Open Source Software Developer Manual 47
Host Software Interface
6.3.4.2 Software Determination of EEPROM Size
To determine the size of the EEPROM, software may use the following steps.
Note: This algorithm will only work if the EEPROM drives a dummy zero to EEDO after receiving the
complete address field.
1. Activate the EEPROM by writing a 1 to the EECS bit.
2. Write the read opcode, including the start bit (110b), one bit at a time starting with the most
significant bit (1):
a. Write the opcode bit to the EEDI bit.
b. Write a 1 to EESK bit and wait the minimum SK high time.
c. Write a 0 to EESK bit and wait the minimum SK low time.
d. Repeat steps 2.a through 2.c for the next two opcode bits.
3. Write the address field, one bit at a time, keeping track of the number of bits shifted in, starting
with the most significant bit.
a. Write the address bit to the EEDI bit.
b. Write a 1 to the EESK bit and wait the minimum SK high time.
c. Write a 0 to the EESK bit and wait the minimum SK low time.
d. Read the EEDO bit, looking for the dummy 0 bit.
e. Repeat steps 3.a through 3.d until the EEDO bit equals 0. The number of loop iterations
performed is the number of bits in the address field.
4. Read a 16-bit word from the EEPROM one bit at a time, starting with the most significant bit,
to complete the transaction (but discard the output).
a. Write a 1 to the EESK bit then wait the minimum SK high time.
b. Read a data bit from the EEDO bit.
c. Write a 0 to the EESK bit then wait the minimum SK low time.
d. Repeat steps 4.a through 4.c an additional 15 times.
e. De-activate the EEPROM by writing a 0 to the EECS bit.
Table 23. EEPROM Opcode Summary (64-register EEPROM)
Instruction
Start
Bit
Opcode Address Data Comments
Read 1 10 A
5
A
4
A
3
A
2
A
1
A
0
Read register A
5
A
4
A
3
A
2
A
1
A
0
Write 1 01 A
5
A
4
A
3
A
2
A
1
A
0
D1:D0 Write register A
5
A
4
A
3
A
2
A
1
A
0
Erase 1 11 A
5
A
4
A
3
A
2
A
1
A
0
Erase register A
5
A
4
A
3
A
2
A
1
A
0
EWEN 1 00 11xxxx Erase/write enable
EWDS 1 00 00xxxx Erase/write disable
ERAL 1 00 10xxxx Erase all registers
WRAL 1 00 01xxxx D15:D0 Write all registers