View previous topic :: View next topic |
Author |
Message |
icefield
Joined: 09 May 2005 Posts: 20 Location: Canada
|
TXIF not setting? |
Posted: Mon May 09, 2005 6:10 pm |
|
|
I'm having a strange failure related to sending characters on the serial port. It seems that the TXIF flag in PIR1 is not setting (indicating that the transmit register is busy sending).
TXIF appears to stick in the cleared state after sending the second character.
I have used both the #USE RS232... system and roll-my-own routines that directly access the PIC registers.
In the former case, printf hangs (!!!!); in the latter, my send-character-to-serial routine hangs.
In both cases, the PIC gets stuck waiting for TXIF to go high (I checked the machine code with the debugger).
I've gone through the obvious things (like double checking the RCSTA1, TXSTA1, and TRIS settings), but no luck.
Any ideas?
Erik |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon May 09, 2005 8:35 pm |
|
|
Yeah, here are really good one. Post the compiler version, pic, and a small test program that demonstrats the problem. |
|
|
icefield
Joined: 09 May 2005 Posts: 20 Location: Canada
|
|
Posted: Mon May 09, 2005 11:50 pm |
|
|
As always seems to happen, I solved the issue a hour after posting the question. Seems I was enabling an interrupt for which there was no service routine. I guess this is territory where debuggers have a hard time following!
Cheers,
Erik |
|
|
|