Hey guys,
I am currently trying to communicate between two PIC's.
I am successfully receiving data and displaying it on an LCD with PIC16F877A. But transmitting data through its TX pin with the use of the printf function is another story..
What I begin by doing is put the characters I want to send into an array:
Code:
char ch_str[20] = "ATZ\r";
Then count how many characters are in the array:
Code:
int chcount = strlen(ch_str);
Then I check if the device is in an idle state with the if (tempc==0x3E), and if it is then using the printf function and a for loop I send the data through the TX pin.
Code:
if (tempc==0x3E)
{
for (i=0; i<=chcount;i++)
{
printf("%s" ,ch_str[i]);
}
}
What I tryed doing was hooking up my USBee device to monitor the data comming out of the TX pin and noticed that there was no activity at all. So I wrote a sample code to test the printf function and there is absolutely no life from the TX pin...
What amI doing wrong? Should I be using putc() instead of printf?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum