hi
I am using PIC18F2525 USART to send a character and string via Rs232 to Hyperterminal....I am using a 4MHz crystal oscillator, i am able to display the characters on the screen only at 250000 baud rate with every character repeating itself
meaning
my Output needs to be
D
dimple
bhuta
my current output is
DDddiimmppllee
bbhhuuttaa
I have included my code, any advice would be very appreciated
Thank you
void puts(far rom char *Str )
{
do
{
unsigned char c;
c = *Str;
putc (c);
if (*Str==13) putc (10);
if (*Str == 10) putc(13);
Str++;
} while ((*Str) != 0 );
}
void main (void)
{
TRISC =0b10000000;
USART_setup ();
while(1)
{
putc('D');
puts ("dimple\n");
puts("bhutadc\n");
}
}
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Mon May 02, 2011 1:26 pm
You're using the Microchip C18 compiler, but you're posting on the CCS
compiler forum. They're not compatible. Here is the C18 forum:
http://www.microchip.com/forums/f3.aspx
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