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

Switch

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



Joined: 09 Nov 2003
Posts: 13

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

Switch
PostPosted: Tue Jan 13, 2004 7:23 pm     Reply with quote

Hi !

I need to put a wired switch 300 foot from the pic.

To get minimum voltage drop i think to put 18vdc unreg

What is the best sulution (Opto, Transistor Etc..) to

put 18Vdc on the Pic pin to read the switch ?

Thanks for your help

Happy new year !!
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Tue Jan 13, 2004 8:29 pm     Reply with quote

Run 18 volts to the switch
From the switch run to a 10K resistor
From the 10K resistor run to the input pin
From the input pin run to another resistor 100K
From the 100K run to ground

The pins are current limited and will clamp current to supply voltage.
When switched off the larger resistor will pull it to ground.
There are application notes on the microchip site showing this done with line power to monitor zero crossing.
LeranCCS



Joined: 13 Jan 2004
Posts: 5

View user's profile Send private message

pay attention of the noise of environment
PostPosted: Tue Jan 13, 2004 8:58 pm     Reply with quote

300 feet is a long distance. i think the opto is the better selection.
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