![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
Monica Guest
|
#use fast_io |
Posted: Wed Dec 04, 2002 2:13 am |
|
|
Dear all,
What is the major difference between:
using fast_io and without fast_io?
Is it because, while adding this line, the output will be faster?
Thanks.
Monica
___________________________
This message was ported from CCS's old forum
Original Post ID: 9752 |
|
![](templates/subSilver/images/spacer.gif) |
Pete Smith Guest
|
Re: #use fast_io |
Posted: Wed Dec 04, 2002 3:42 am |
|
|
:=Dear all,
:=
:=What is the major difference between:
:=using fast_io and without fast_io?
:=
:=Is it because, while adding this line, the output will be faster?
Yes and no :-)
By default, the CCS compiler will set the TRIS registers on the fly, so if you do temp=input(PIN_A1); it will set the TRIS_A register to make A1 an input. If you then do output_high(PIN_A1), it will change the tristate register to make A1 an output.
The downside of this is that every time you use an I/O pin, the tristate registers are messed round with, which in principle, could make I/O slower, but not much. It also uses more ROM.
If you #use fast_io, you've got to set your own tristate registers. The advantages are that you have more control, and your code is smaller.
FWIW, you can find this information on page 46 (for Fast IO) on the latest CCS C Manual
Hope this helps,
Pete.
___________________________
This message was ported from CCS's old forum
Original Post ID: 9756 |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|