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

output_toggle inquiry

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



Joined: 29 Dec 2003
Posts: 81

View user's profile Send private message

output_toggle inquiry
PostPosted: Mon Mar 08, 2004 6:37 pm     Reply with quote

Hi,

Can somebody explain on how to use the output_toggle() function?

Thank you.
Charlie U



Joined: 09 Sep 2003
Posts: 183
Location: Somewhere under water in the Great Lakes

View user's profile Send private message

PostPosted: Mon Mar 08, 2004 7:50 pm     Reply with quote

I haven't used this function yet, but as the read me file states, it is used just like output_high(PIN_A0);. As the function name states, I would surmise that this function toggles the pin, i.e., the resulting state of the pin is the inverse of the starting state. Similar to:

#byte port_b = 6
#bit MY_PIN = port_b.0

To toggle the pin:

MY_PIN = !MY_PIN;
Humberto



Joined: 08 Sep 2003
Posts: 1215
Location: Buenos Aires, La Reina del Plata

View user's profile Send private message

PostPosted: Tue Mar 09, 2004 7:08 am     Reply with quote

#use fast_io(B)

output_toggle(PIN_B0);


Produce the shortest and fastest way to toggle an output PIN.

Code:

....................         { 
....................     output_toggle(PIN_B0); 
019C:  MOVLW  01
019D:  XORWF  PORTB,F
....................         } 


Humberto
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