Hi Samuel;
What is your system clock? If the internal oscillator cannot make ikt, try xtal
or external clock.
Feng
--- In lpc900_users@yahoogroups.com, "SR" <emddjava@...> wrote:
>
> Hi
>
> I am using LPC938, I am trying to get the UART's baudrate to 9600 but nothing
seems to work..I the following code and all I see on hyperterm is just various
ASCII characters.
>
> EA = 0;
> TR1 = 0; /* stop timer 1 */
> ET1 = 0; /* disable timer 1 interrupt */
>
> TH1 = 0xFC; //(unsigned char) (256 - (clock / (16L * 12L * baudrate)));
>
> PCON |= 0x80; /* 0x80=SMOD: set serial baudrate doubler */
>
> TMOD &= ~0xF0; /* clear timer 1 mode bits */
> TMOD |= 0x20; /* put timer 1 into MODE 2 */
> SCON = 0x50;
>
> TR1 = 1; /* start timer 1 */
>
>
> INT_ENABLE;
>
>
> EA = 1;
>
> Samuel
>