UART problem

deva
Hi

Now I wrote program for UART to send 'A',without OS,but i getting some
symbol other than 'A'. What would be a mistake. if the UBRDIV value is
mistake means,how can check and change the FCLK,HCLK and PCLK. I given my
codings below. 

#include "def.h"
#include "2440addr.h" 
double a=0;
void main (void) 
{
while(1){
  ULCON0=0x03;
  UCON0=0X04;
  UFCON0=0;
  UBRDIV0=21;
  UTXH0='A';
  while(!UTRSTAT0);
for(a=0;a<5e6;a++);
}

TheRegnirps
How do you know the settings  for BAUD rate, etc?

deva
dear friend the have given the formula such as 
UBRDIVn = (int)(40000000 / (115200 x 16) ) -1
= (int)(21.7) -1= 21
i got the output. there ,uart is working in 48Mhz substitute u can get the
count value as 26