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

I/O Pins and current limiting resistor

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







I/O Pins and current limiting resistor
PostPosted: Sat Dec 27, 2003 4:52 am     Reply with quote

Hi,

I want to connect a voltage between +12v and +24v to a 18F252 PIN to detect a logic high, I have been told that I can do this by simply adding a current limiting resistor, as the PIC has internal diodes that will limit the voltage.

What size resistor would I need? also is there any danger if the voltage gets any higher as these inputs will be from a car and I can envisage spikes etc.

Thx
Humberto



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

View user's profile Send private message

PostPosted: Sat Dec 27, 2003 7:48 am     Reply with quote

Hi Newbie:
Read the following:
[url]
http://www.microchip.com/download/lit/pline/picmicro/families/18fxx2/39564b.pdf
[/url]
Quote:

What size resistor would I need? also is there any danger if the voltage gets any higher as these inputs will be from a car and I can envisage spikes etc.


To accomodate those voltages make a resistor divider like this:

Code:

+12V  /  +24V
        _ _                   PIC18F252
          |                    -------------- 
          |                    |
          /                   |
6K8   \   20K         |
          /                   |
          |                   |
          |---------->>     |INPUT PIN 
          |                   |
          /                   |
          \ 4K7           |
          /                   |
          \                   |
          |                   |
          |                   |
         \/  Gnd          |
                               ------------


Humberto
Newbie
Guest







Thanks but what section.....
PostPosted: Sat Dec 27, 2003 8:13 am     Reply with quote

Thanks for the info but that�s a large PDF and for a newbie a bit overwhelming!! can you point me to the relevant section please.

Thx
Newbie
Guest







Another thought
PostPosted: Sat Dec 27, 2003 9:40 am     Reply with quote

I have a 5v 3amp reg on my circuit and need diriving from it 3.8v @ 100ma-2amp supply

Would a potential divider work for suppying this? if so what values for R1/R2. or can anyone explain how Iwork it out.

I think I can work out how to get the 3.8 volts but I'm not sure about the effects of supplying between 100ma and 2amp from this.


Thx
Guest








Re: Another thought
PostPosted: Sat Dec 27, 2003 12:35 pm     Reply with quote

Newbie wrote:
I have a 5v 3amp reg on my circuit and need diriving from it 3.8v @ 100ma-2amp supply

Would a potential divider work for suppying this? if so what values for R1/R2. or can anyone explain how Iwork it out.

I think I can work out how to get the 3.8 volts but I'm not sure about the effects of supplying between 100ma and 2amp from this.


Thx

Simple answer. No.
A potential divider is useful, where the current down the divider is a lot higher than that into the 'load'. Hence it works nicely for the logic input (which has a leakage current of only a few uA), but is not suitable for driving a high current load.
Use another voltage regulator (something like a 1.2v design), with a potential divider from it's output, to set the 'reference' pin.
There are dozens of such circuits on the web, including data sheets for just about every adjustable regulator on the market, showing how to do this.

Best Wishes
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