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 CCS Technical Support

Please teach. What is #use fast_io(A) ?

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



Joined: 07 May 2007
Posts: 69

View user's profile Send private message

Please teach. What is #use fast_io(A) ?
PostPosted: Thu Jan 31, 2008 5:07 pm     Reply with quote

1. #use fast_io(A). I don't understand.
2. #byte port_b=6. If not register port B. What happen or it's not stable ?

regards
ECACE



Joined: 24 Jul 2006
Posts: 94

View user's profile Send private message

PostPosted: Thu Jan 31, 2008 5:18 pm     Reply with quote

1) Page 119 of the compiler manual --
From the manual:

Syntax:
#use fast_io (port)
Elements:
port is A-G
Purpose:
Affects how the compiler will generate code for input and output instructions that follow. This directive takes effect until another #use xxxx_IO directive is encountered. The fast method of doing I/O will cause the compiler to perform I/O without programming of the direction register. The user must ensure the direction register is set correctly via set_tris_X(). When linking multiple compilation units be aware this directive only applies to the current compilation unit.


--- In other words ---
If a port is not set to fast I/O, then every time you access it, the compiler will set the direction registers, when you add the fast_io, you have to set the direction yourself


2) Not sure if I understand your question: If you look at the datasheet for the 16F876A, you will notice that port_b is mapped to location 0x06. So in your program, you need to tell the compiler when you refer to 'port_b', you are refering to location 0x06.
_________________
A HW Engineer 'trying' to do SW !!! Run!!!
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