CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

TXIF not setting?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
icefield



Joined: 09 May 2005
Posts: 20
Location: Canada

View user's profile Send private message

TXIF not setting?
PostPosted: Mon May 09, 2005 6:10 pm     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Mon May 09, 2005 8:35 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon May 09, 2005 11:50 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group