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

#use fast_io & #use standard_io

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



Joined: 06 Mar 2007
Posts: 92
Location: Pune,India

View user's profile Send private message AIM Address Yahoo Messenger

#use fast_io & #use standard_io
PostPosted: Fri Nov 30, 2007 2:50 am     Reply with quote

Dear sir,
here i am using 16f684, MPLAB 7.5 Ver. & CCS PCM C Compiler, Version 3.249, 34534.
At start of programme i set port pins as input/output using set_tris_x(); &
if i used INPUT(),INPUT_STATE() & INPUT_X()these functions, then these functions will affect on the tris register?
_________________
Thank You,
With Best Regards,
Deepak.
Ken Johnson



Joined: 23 Mar 2006
Posts: 197
Location: Lewisburg, WV

View user's profile Send private message

PostPosted: Fri Nov 30, 2007 8:17 am     Reply with quote

If you use fast_io, then you need to set the tris regs as you indicate, and they will not change.

If you use standard_io, you do not need to set the tris regs, the compiler takes care of that for you.

Check the help file for #use fast_io, standard_io.

Ken
deepakomanna



Joined: 06 Mar 2007
Posts: 92
Location: Pune,India

View user's profile Send private message AIM Address Yahoo Messenger

#use fast_io & #use standard_io
PostPosted: Fri Nov 30, 2007 8:30 am     Reply with quote

Ok,Sir
I read the help file but i couldn't understand.
So,Now consider 16f684 device.
& Pin RA0 & RA2 used as i/p rest all are o/p.And if i used #use standard_io then how the compiler will knows that,Pin RA0 & RA2 are i/p & rest all are o/p.And should i declare #use standard_io.
_________________
Thank You,
With Best Regards,
Deepak.
Ken Johnson



Joined: 23 Mar 2006
Posts: 197
Location: Lewisburg, WV

View user's profile Send private message

PostPosted: Fri Nov 30, 2007 9:25 am     Reply with quote

Standard I/O is the default - you don't need to specify it (but it won't hurt).

If you write to a pin, the compiler makes the pin an output; if you read the pin, the compiler makes it an input (using standard i/o) - it's all taken care of for you Smile

Ken
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