|
|
View previous topic :: View next topic |
Author |
Message |
j@qmail.com Guest
|
rs232 fprintf pacing question |
Posted: Sat Apr 12, 2003 6:19 pm |
|
|
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
|
Re: rs232 fprintf pacing question |
Posted: Sat Apr 12, 2003 10:42 pm |
|
|
:=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 |
Posted: Sun Apr 13, 2003 9:46 pm |
|
|
:=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 |
|
|
|
|
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
|