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 support@ccsinfo.com

putc()

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



Joined: 15 Mar 2008
Posts: 53

View user's profile Send private message

putc()
PostPosted: Tue Sep 09, 2008 3:02 pm     Reply with quote

Hi,
I am using PIC16F886 with PCM compiler. Does putc() check transmit buffer status before transmitting data? If not, is there a function to check transmit buffer status.

Thanks.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Sep 09, 2008 3:10 pm     Reply with quote

You can easily determine this by looking at the .LST file, which is created
when you successfully compile a file. If you want the listing to display
register names (instead of register addresses) , you can set this in the
compiler options. In MPLAB you can do this by going to Project /
Build Options / List File, and then select "Symbolic Format".

Also, see this thread:
http://www.ccsinfo.com/forum/viewtopic.php?t=22649&highlight=putc+block
boulder



Joined: 15 Mar 2008
Posts: 53

View user's profile Send private message

PostPosted: Tue Sep 09, 2008 3:34 pm     Reply with quote

Yes, it checks transmit buffer. Thanks.

Code:

....................       putc(data);
003B:  MOVF   data,W
003C:  BTFSS  PIR1.TXIF
003D:  GOTO   03C
003E:  MOVWF  TXREG
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