Pic18F string array using RS-232...

Find out how to setup your programmer's software and how to solve many common problems.

Moderator: phalanx

Post Reply
dtvonly
Posts: 2
Joined: Thu May 16, 2013 10:45 am

Pic18F string array using RS-232...

Post by dtvonly » Tue Aug 23, 2016 3:14 pm

is string array TX as follows correct?

Code: Select all


#include <string.h>
unsigned char i;
char msg[] = "hello world";
for (i=0;i<strlen(msg[]); i++)
{
     TXREG = msg[i];
     while(!TRMT);
}

please advise. Thank you.

picmh123
Posts: 13
Joined: Mon Jun 29, 2015 11:00 pm

Re: Pic18F string array using RS-232...

Post by picmh123 » Fri Aug 26, 2016 3:05 am

try below code:

for (i=0;i<strlen(msg[]); i++)
{
while (TXIF == 0);
TXREG = msg;
}

Post Reply