A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
USART Transmit Issue - Maran - Nov 28 9:10:39 2007
Hi All,
I am facing an issue with the USART Transmit. My code is as shown
below......
#include
#include
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

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: USART Transmit Issue - harrabylad - Dec 13 17:21:06 2007
It sounds like a power up problem.
It could be the transmit pin is at a zero before the first byte is sent
causing a recieve error at the PC.
Might be worth putting a pullup on the TX pin.
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: USART Transmit Issue - Michael Harpe - Dec 13 21:18:06 2007
I hit this problem as well. My problem turned out to be that I had not disabled
the watchdog timer feature. The ASCII sequence would start up fine, then go to
gibberish and start over.
The watchdog was timing out and resetting the processor over and over. I didn't
see it right away and wasted a lot of time on debugging.
I disabled the WDT in the config registers and the chip happily sent the ASCII
sequence to my terminal session at 9600 baud with no problems at all.
Mike Harpe, N4PLE
Sellersburg, IN
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: USART Transmit Issue - jed_20073 - Jan 11 18:07:52 2008
I'm a little confused and haven't looked thru all this message tree.
Is there a reason the watchdog timer interferes with the USART chip.
We're using a 18F2685 in our project, we will use sleep mode, and low
voltage reset.
Don't think we need the watchdog timer... , but I do seem to
remember reading something in the 18F2685 chip manual about a
watchdog timer issue.
Thanks,
;<)
--- In p...@yahoogroups.com, Michael Harpe
wrote:
>
> I hit this problem as well. My problem turned out to be that I had
not disabled
> the watchdog timer feature. The ASCII sequence would start up fine,
then go to
> gibberish and start over.
>
> The watchdog was timing out and resetting the processor over and
over. I didn't
> see it right away and wasted a lot of time on debugging.
>
> I disabled the WDT in the config registers and the chip happily
sent the ASCII
> sequence to my terminal session at 9600 baud with no problems at
all.
>
> Mike Harpe, N4PLE
> Sellersburg, IN
>
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )