Monday, November 26, 2007

[piclist] USART Transmit Issue

Hi All,

I am facing an issue with the USART Transmit. My code is as shown
below......

#include <p18F4523.h>
#include <usart.h>
void main( void )
{
char group[10]="Microchip ";
int i;
OpenUSART( USART_TX_INT_OFF &
USART_RX_INT_OFF &
USART_ASYNCH_MODE &
USART_EIGHT_BIT &
USART_CONT_RX &
USART_BRGH_HIGH,
129 );
while( 1 )
{
for(i=0; i<10; i++)
{
while (BusyUSART());
putcUSART(group [ i ] );
}
}
CloseUSART( );
}

The above program gets compiled successfully.

But the result is as follows when checked in the Hyperterminal.......

icrochip Microchip Microchip Microchip Microchip Microchip Microchip
Microchip Microchip

The first character 'M' doesn't gets transmitted on to the
Hyperterminal, but in the rest of the sequence the word 'Microchip '
gets transmitted fine.

Any idea why the first character 'M' doesn't get transmitted on to the
hyperterminal?

I am using the MPLAB version 8, C18 compiler Version 3.14, PIC18F4523
Microcontroller.

I gave approx 3 seconds of delay before transmitting.

__._,_.___
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions
Recent Activity
Visit Your Group
Yahoo! News

Odd News

You won't believe

it, but it's true

Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

HDTV Support

The official Samsung

Y! Group for HDTVs

and devices.

.

__,_._,___

No comments: