This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Baud Rate-Timer 1-P89v51RD2

The NXP P89V51RD2 has the ability to choose either Timer1 or Timer2 as the baud rate generator for it's UART.

If I were to use the Timer 1 in mode 2 (auto reload), what is the relation between the baud rate and the crystal frequency in Normal and X2 modes?

I'm using the UART in mode 1(8 bit variable baud rate).

Parents Reply Children
  • he he ravi.

    chk ur inbx.......i tx 2 u yesterday nite

  • Erik dearest,

    I did read the manual.

    "In the ‘Timer’ function, the register is incremented every machine cycle..... Since a machine cycle consists of six oscillator periods, the count rate is 1/6 of the oscillator frequency."

    But if I were to run it in the normal mode, wouldn't the machine cycle be 12 oscillator periods?

    There is no formula in the data sheet for what I had asked.It only specifies the baud rate equations for Timer 2 in the baud rate gen. mode.

    I tried baud rate= crystal freq/(6*(256-TH1)) but I think there's a mistake in my formula.

    PS:
    Are you paid to answer on this forum? If yes, please be a little more polite. If not, please do not reply if you are not motivated to help others that are not as smart as you.

  • There is no formula in the data sheet
    you are right, i forgot NXP fortunately does not include "biblical" information in the datasheets.

    use the formula in "the bible"

    Erik

    re 'fortunately'; a datasheet is sooooo much easier to use when it is not crowded with 'common stuff'

    Just look at the SILabs 300+ page datasheets, you have to wade through tons of redundant stuff to miss what you need to find. 'miss' is not a typho

  • Is typho a typo?

    If not, then what is a typho?

  • I in Erik's defence suggest you go and look at the manual again.

    But if I were to run it in the normal mode, wouldn't the machine cycle be 12 oscillator periods?

    Page 1.
    A key feature of the P89V51RB2/RC2/RD2 is its X2 mode option. The design engineer
    can choose to run the application with the conventional 80C51 clock rate (12 clocks per
    machine cycle) or select the X2 mode (six clocks per machine cycle) to achieve twice the
    throughput at the same clock frequency. Another way to benefit from this feature is to keep
    the same performance by reducing the clock frequency by half, thus dramatically reducing
    the EMI.

    AS for the baud rate in the rev5 manual in around page 35.

    Cheers..

  • .... the fact that I am not a native English speaker does show through

    Erik

  • Hello Darren,

    I know about the X2 mode.My question was whether the equation will be the same irrespective of the mode.Page 27 says "In the ‘Timer’ function, the register is incremented every machine cycle".Table-58 in page 61 shows that clocks per machine cycle varies with the mode, which is why I had a doubt. All the figures for the timers only show osc/6.

    Coming back to my question, the equations mentioned in pages 35-39 are all for timer 2 and _not_ timer 1 :(

    Thanks
    Ravi