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

output_high(Variable)?

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



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

output_high(Variable)?
PostPosted: Sat Jun 16, 2007 2:35 am     Reply with quote

Hi

I would like to set a pin H in the PIC. However I determine which pin to set H programatically with something like:

Code:

output_high(var1);

where var1 is determined by the program.
PICC gives me an error: "Expressions must evaluate to a constant"

Can someone please tell me how to do this? (without using "if" loops)

Thank you in advance.
Regards
a.
Ttelmah
Guest







PostPosted: Sat Jun 16, 2007 2:39 am     Reply with quote

How about searching the forum!....
A search on 'How to use output_bit or output_high with a variable', will find one of the dozens of threads where a solution for this has been posted (including pointers to a couple of other threads).

Best Wishes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jun 16, 2007 3:35 am     Reply with quote

Or, here's the links:

For 16F:
http://www.ccsinfo.com/forum/viewtopic.php?t=25280&start=4

For 18F:
http://www.ccsinfo.com/forum/viewtopic.php?t=27723&start=3
arrow



Joined: 17 May 2005
Posts: 213

View user's profile Send private message

PostPosted: Sat Jun 16, 2007 5:15 am     Reply with quote

Thank you for your replies! I appreciate it.

Regards
a.
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