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

rs232 fprintf pacing question

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
j@qmail.com
Guest







rs232 fprintf pacing question
PostPosted: Sat Apr 12, 2003 6:19 pm     Reply with quote

Does anyone know how ccs paces rs232 output (with and without USART)? For example, suppose I fprintf ten characters to a stream. Do I get control back immediately or do I have to wait for the characters to be transmitted?

If I get control back immediately, what happens if I send another ten characters?

(It seems to me that there should be a "ready" bit somewhere to test but I haven't found it in the docs I have.)

Tnx,
Jay
___________________________
This message was ported from CCS's old forum
Original Post ID: 13633
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: rs232 fprintf pacing question
PostPosted: Sat Apr 12, 2003 10:42 pm     Reply with quote

:=Does anyone know how ccs paces rs232 output (with and without USART)? For example, suppose I fprintf ten characters to a stream. Do I get control back immediately or do I have to wait for the characters to be transmitted?
:=
:=If I get control back immediately, what happens if I send another ten characters?
:=
:=(It seems to me that there should be a "ready" bit somewhere to test but I haven't found it in the docs I have.)
:=
------------------------------------------------------------

You're asking if fprintf() has a software transmit fifo.
It doesn't. So, yes, you'll have to wait until most of
the characters are transmitted.

If you want a transmit buffer, you have to add the code for it.
CCS has an example file for this, called EX_STISR.C.
It's in this folder: c:\Program Files\Picc\Examples

The same thing is true for a receive fifo. You have to code it.
See EX_SISR.C for an example. It's in the same folder.
___________________________
This message was ported from CCS's old forum
Original Post ID: 13634
j@qmail.com
Guest







Re: rs232 fprintf pacing question
PostPosted: Sun Apr 13, 2003 9:46 pm     Reply with quote

:=You're asking if fprintf() has a software transmit fifo.
:=It doesn't. So, yes, you'll have to wait until most of
:=the characters are transmitted.

Thanks,
Jay
___________________________
This message was ported from CCS's old forum
Original Post ID: 13645
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