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.

PIC Inputs

Status
Not open for further replies.

EmeraldW

New Member
I need to monitor several pins that are going to be used as switches or triggers and I had a question on how to connect them. I was told to pull the pins low with a resistor and then connect the triggers to +5 when the trigger is set. If I connect it this way, wouldn't pulling the first pin high pull the rest high?

**broken link removed**
 
It depends on your circuit... I always pull the pins high with 470 ohm resistors, the switch the pins to ground (active low) then test a NOT condition ie if NOT RA0 then ....
Its up to you how you wish to read them..
 
Not necessarily. Notice that your switch is connected directly to RA0/AN0, but there are two resistors between your switch and RA1/AN1. Depending on the values of the resistors, it should be enough resistance to keep the other pins in the low state, even when the switch is connected.

Der Strom
 
A useful feature of Port B of the 16F628 is the internal weak pullups (WPUs). You enable them by clearing bit 7 of the OPTION register. With the WPUs enabled you only need external switches to ground.

Note also, if you stay with port A then you need to disable the comparators (CMCON=7).

Mike.
 
I need to monitor several pins that are going to be used as switches or triggers and I had a question on how to connect them. I was told to pull the pins low with a resistor and then connect the triggers to +5 when the trigger is set. If I connect it this way, wouldn't pulling the first pin high pull the rest high?

No, because the junction of the resistors is 'grounded' (connected to Vss).
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top