Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Active High Input

Status
Not open for further replies.

Suraj143

Active Member
If a logic high signal (+5V) comes from another IC or from a power source continuously via a resistor to the PIC input pin, do I still need another resistor between the PIC input pin & GND?
 
If a logic high signal (+5V) comes from another IC or from a power source continuously via a resistor to the PIC input pin, do I still need another resistor between the PIC input pin & GND?

hi Suraj,
If the end of the resistor is to a +5V source, no additional resistor is required.

If the power source for the high end of the resistor was say 12V then a resistor to 0V would be required
to form a potential divider [ down to +5V]
 
Last edited:
Hi Eric

Yes the power source is 5V not 12V.I need to detect it is available or not by every time polling that pin.In this case do I need another resistor between the PIC input pin & GND?
 
Hi,
If another end is 5 V power source then why do you need to poll it? It will always be high isn't it? Or I've misunderstood something?
 
Hi Eric

Yes the power source is 5V not 12V.I need to detect it is available or not by every time polling that pin.In this case do I need another resistor between the PIC input pin & GND?

hi,
What is the value of the resistor between the +5V and the pin.?

When the +5V power source at the end of the resistor is not present does the source drop down to 0V.?

EDIT: or does the end of the resistor goto an open circuit.???
 
Last edited:
Hi its a 4.7K.I need to detect if the 5V source is there or not, so it can activate the battery backup in my timer project when power goes down.So I'm polling a pin every time.
 
Last edited:
Hi its a 4.7K.I need to detect if the 5V source is there or not, so it can activate the battery backup in my timer project when power goes down.So I'm polling a pin every time.

If the source end of the 4K7 went to an open circuit, then the PIC pin would be effectively 'floating'.

To avoid this, add a resistor to 0V from the PIC pin, use a value such that when the +5V
is present at the Vsource the voltage at the PIC pin is say +4V.

A resistor value of about 22Kish should give +4V which the PIC will see as a high.
 
Last edited:
Hi I'm polling with RA4 input & its a Schmitt Trigger input.So still I need that two resisters to make the input pin without floating?
 
The pull down resistor is needed to avoid the input from floating. I'm just wondering why do you need another resistor connected from the power source to the input pin?
 
The pull down resistor is needed to avoid the input from floating. I'm just wondering why do you need another resistor connected from the power source to the input pin?

Assuming it's always 5v (or 0v) source then you don't really need a series resistor. However most microprocessor these days have diode clamping on their I/O pins, and if the source voltage into a pin is higher or lower then the micros Vcc & Vdd then damage can happen due to over current drawn into the pin. One cheap insurance against accidental over or under voltage from being applied to the micro I/O pin is a series resistor that limits the maximum current flow when a clamping diode conducts.

So a series resistor can be useful and a pull down resistor is needed to insure that a input doesn't 'float' if the external unit is powered off or disconnected. Some of the newer micros have the ability, under program control, to set a soft pull down or soft pull up resistor internal to the chip. If available and used then there would be no need for a external pull down or up resistor, but the series protection resistor would still be useful.

If you use both a series and pull down resistor at the same time you must insure that the resulting 'voltage divider' action does not reduce the 5v down to a level less then the input will treat as a 1 or high. The pull down should be higher value then the series resistor.
 
If you use both a series and pull down resistor at the same time you must insure that the resulting 'voltage divider' action does not reduce the 5v down to a level less then the input will treat as a 1 or high. The pull down should be higher value then the series resistor.

Hi i'm using a 4.7K series resistor & 22K resistor go GND from PIC pin.

Is it good to detect the logic HIGH? & if the 5V power source is unavailable it must detect this command.
Code:
Main	btfss 	PORTA,RA4
	goto	Main		;power has gone
	goto	Normal		;power is there
 
Last edited:
Hi i'm using a 4.7K series resistor & 22K resistor go GND from PIC pin.

Is it good to detect the logic HIGH?

That should work OK, It should read about 4vdc when high and I think that is above the I/O pin threshold, but you could check it's datasheet if you want to be sure. The 4.7K could be as lowered to say 2K and still give enough current protection.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top