Reply by Tilmann Reh November 6, 20072007-11-06
Barchman schrieb:

> I recently started a project to make improvments to one of our old > products containing an ethernet module controlled by an Atmel > T89C51RD2. The ethernet interface is unfortunately hardwired to auto- > negotiate, which has caused some problems due to the fact that the > selected speed is thus 100MBit/sec....quite a lot for the MCU to > content with. > > The crystal used at present is 16MHz, and the MCU is used in X2 mode > (divide by 6). Not being familiar with this processor I was hoping > that someone would confirm that the machine code execution speed is > thus: > > 16MHz / 6 = 2.67MHz in X2 mode > and 16MHz / 12 = 1.33MHz when X2 mode is disabled.
Basically correct so far, however some instructions take two or more cycles. I find the data sheet quite easy to understand about the X2 mode, BTW.
> Is there any reason why my previous co-worker would not have selected > a faster crystal (serial baud rate generation?)
Perhaps the speed of the external bus, if that is used to connect to the ethernet module? Perhaps the non-availability of faster speed grade MCUs when the circuit was developed?
> What is the maximum machine code instruction frequency that can be > attained with the T89C51RD2?
The data sheet claims up to 40 MHz in standard mode, up to 20 MHz in X2 mode. However, you couldn't use the internal oscillator for real high frequencies, IIRC. If the processing power of the MCU is at its limit, you might also have a look at the software and tune it at the critical functions (i.e. write timing optimized assembly language routines). For more detailed help, /much/ more detailed information is necessary. Tilmann -- http://www.autometer.de - Elektronik nach Ma�.
Reply by Barchman November 6, 20072007-11-06
Hi all,

I recently started a project to make improvments to one of our old
products containing an ethernet module controlled by an Atmel
T89C51RD2. The ethernet interface is unfortunately hardwired to auto-
negotiate, which has caused some problems due to the fact that the
selected speed is thus 100MBit/sec....quite a lot for the MCU to
content with.

The crystal used at present is 16MHz, and the MCU is used in X2 mode
(divide by 6). Not being familiar with this processor I was hoping
that someone would confirm that the machine code execution speed is
thus:

16MHz / 6 = 2.67MHz in X2 mode
and 16MHz / 12 = 1.33MHz when X2 mode is disabled.

I don't find the datasheet that clear, could just be me though.

Is there any reason why my previous co-worker would not have selected
a faster crystal (serial baud rate generation?)
What is the maximum machine code instruction frequency that can be
attained with the T89C51RD2?

Thanks for the help in advance.