error while receiving char's from the serial port(p13,p14)

01 Dec 2010

recently i test the serial test program (port i am using is p13,p14) . the program is work fine for transmission for different baud rate's but while come to the receiving  the program return some garbage values i think that cause due to framing error  baud rate mismatch ( tried the program in normal receive and interrupt receive both the cases i get the same error ) can any one plz help me

#include "mbed.h"

Serial pc(p13,p14);

int main() {

// char string[50];

pc.printf("HI WELCOME ");

while(1)

{

pc.putc(pc.getc());

 

}

}