MII PHY Registers
2-21
ThunderLAN Registers
This samples data on the rising edge of the MCLK bit. Take the first bit into the
PHY MII as follows:
b &= ~MCLK; outp(diodata,b);
b |= MDATA; outp(diodata,b);
b |= MCLK; outp(diodata,b); //1 data bit out
This concludes writing out the start delimiter bits. The data can be changed
before the clock is taken low, as when shifting out the operation code as fol-
lows:
b |= MDATA; outp(diodata,b); //1st part not nec.
//togLH
b &= ~MCLK; outp(diodata,b);
b |= MCLK; outp(diodata,b); //1
b &= ~MDATA; outp(diodata,b);
//togLH
b &= ~MCLK; outp(diodata,b);
b |= MCLK; outp(diodata,b); //0
10 is the read op code for an MII management operation.
// Send the device number Internal=31(0x1f),
External=0(0x00)
for (i = 0x10;i;i >>= 1) /* 10 is the read op code*/
{
if (i&dev)
b |= MDATA;
else
b &= ~MDATA;
outp(diodata,b);
//togLH
b &= ~MCLK; outp(diodata,b);
b |= MCLK; outp(diodata,b);
}
The following loop index is used as a mask to walk through the device number
which is passed to this routine as a parameter. Each loop looks at a bit in the
device number, starting with the MSB. It sets the MDATA bit to match the inter-
nal representation of the NetSio register before outputting the composite value
Summary of Contents for ThunderLAN TNETE100A
Page 2: ...Printed in U S A October 1996 L411001 9761 revisionA SPWU013A ...
Page 3: ......
Page 17: ...xiv ...
Page 23: ...1 6 ...
Page 67: ...3 10 ...
Page 81: ...4 14 ...
Page 113: ...7 10 ...
Page 165: ...A 52 ...
Page 179: ...C 2 ...