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

Read Output Pin Setting

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



Joined: 03 Dec 2008
Posts: 184
Location: Gresham, OR USA

View user's profile Send private message Send e-mail Visit poster's website

Read Output Pin Setting
PostPosted: Thu Jul 24, 2014 4:24 pm     Reply with quote

Processor: 18F67K22
Compiler: 4.135

I'm using digital I/O to control a bunch of relays and I need to send out some diagnostics via serial port to show which output pins are set high.

How can I read the settings of my output pins, without affecting anything? I want to be sure the compiler doesn't change my outputs to an input when it does the read. It seems like such a simple thing but a forum and manual search doesn't doesn't yield the results I'm looking for. Perhaps I'm just tired...

Thanks for any help.
_________________
Jürgen
www.jgscraft.com
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 24, 2014 4:32 pm     Reply with quote

Quote:
How can I read the settings of my output pins, without affecting anything?

Check your version and see if it has the input_state() function, because
that's what you need.
jgschmidt



Joined: 03 Dec 2008
Posts: 184
Location: Gresham, OR USA

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Thu Jul 24, 2014 5:37 pm     Reply with quote

That's what I was looking for - works great!
Thanks for this and all the other help you provide.
_________________
Jürgen
www.jgscraft.com
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