USART with PIC18F4331

Started by Paul L June 13, 2007
Hello,

Just a quick question, i am having trouble with the USART on the PIC18F4331. I am running Ascync mode and every time i put some data in the TXREG and loop the TXSTA,TRMT flag the pic resets? I have disabled all interupts. Does anyone know of anything that can cause this? I have not looked into everything fully yet, but just wondering if anyone knew of anything that can cause this? The pic runs fine when i ; out the lines with the TXREG on.

THanks
If Watch Dog is enabled you must be sure to insert a CRLWDT in the loop.

Other than that I don't know. USART works ok in 18F4x2.
Paul L wrote:

> Hello, Just a quick question, i am having trouble with the USART on
> the PIC18F4331. I am running Ascync mode and every time i put some
> data in the TXREG and loop the TXSTA,TRMT flag the pic resets? I have
> disabled all interupts. Does anyone know of anything that can cause
> this? I have not looked into everything fully yet, but just wondering
> if anyone knew of anything that can cause this? The pic runs fine when
> i ; out the lines with the TXREG on. THanks
>
--
*******************************************
VISIT MY HOME PAGE:

LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen
I will check that, thanks. Just a bit werid, but if there is no daft error reset thing, then it must be me!

THanks
----- Original Message -----
From: Eirik Karlsen
To: p...
Sent: Wednesday, June 13, 2007 12:13 PM
Subject: Re: [piclist] USART with PIC18F4331
If Watch Dog is enabled you must be sure to insert a CRLWDT in the loop.
Other than that I don't know. USART works ok in 18F4x2.

Paul L wrote:

Hello, Just a quick question, i am having trouble with the USART on the PIC18F4331. I am running Ascync mode and every time i put some data in the TXREG and loop the TXSTA,TRMT flag the pic resets? I have disabled all interupts. Does anyone know of anything that can cause this? I have not looked into everything fully yet, but just wondering if anyone knew of anything that can cause this? The pic runs fine when i ; out the lines with the TXREG on. THanks
--
*******************************************
VISIT MY HOME PAGE:

LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen