Hi All I am using following putchar routine.
void srl_putchar(unsigned char send) { SBUF = send; while (!TI); TI = 0; }
printf("%c%c",dle,etx);
The function needs to be called putchar, and match the prototype in stdio.h
i was using putchar() available in the library,but putchar()was padding extra bytes to the character which i want to send via serial port for eg.putchar(0x0a) results into 0x0d 0x0a,ie new line character. so to avoid changing putchar() routine i decided to write it myself.