USART in PIC17C756a

Started by rashid husain July 28, 2003
Hi all,

I am trying to communicate with PIC17c756a. I try to
go to the very basic program but I fail to echo
character whenever I use the command
putsUSART1(data).I am using MPLAB 17 compiler.

The following is the code:

#include<p17C756A.h>
#include<STDDEF.H>
#include<usart16.h>
#include<stdlib.h>
#include<string.h>

char data[5];
int count;

void main(void)
{
OpenUSART1(........//communicate at 19.2k Baud);
countf6;
strset(data,0);
putrs(" start program ");
uitoa(333,data);
putsUSART1(data);
uitoa(count,data);
putsUSART1(data);
putrs("reach");
} output: start program reach From this output, the PIC only able to echo any
character with putrsUSART1 command, not
putsUSART1(data) command.

I just want to do the same project as AN718 from
Microchip.

any help is very much appreciated.

rashid __________________________________