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

FAST_IO help

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



Joined: 09 Jul 2004
Posts: 40
Location: Europe

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

FAST_IO help
PostPosted: Thu Aug 05, 2004 12:37 pm     Reply with quote

This source: 10MHZ, 877

#use fast_io(d)
...
set_tris_d(0)
...
while(1)
{
i++;
output_d(i);
}

Please tell why this function 'out_put_d(i) ' called so slowly.
As I think it must be 1 function - 400ns, but I don't see that.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Thu Aug 05, 2004 1:00 pm     Reply with quote

Code:

.................... void main() 
.................... {   
0004:  CLRF   FF8
0006:  BCF    FD0.7
0008:  CLRF   FEA
000A:  CLRF   FE9
000C:  BSF    FC1.0
000E:  BSF    FC1.1
0010:  BSF    FC1.2
0012:  BCF    FC1.3
....................   int i; 
....................   while(1)   
....................   {   
....................     i++;   
0014:  INCF   06,F
....................     output_d(i);   
0016:  MOVFF  06,F8C
....................   }   
001A:  BRA    0014
.................... }   
....................   
.................... 
001C:  SLEEP


INCF is 1 cycle
MOVFF is 2 or 3 cycles
BRA is 2 cycles

For a total of 5 cycles which is 2us or 2000ns
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