# Pull-up/pull-down interrupt-input

Sorry if my English is not 'good, I’m a Italian beginner.
If I connect a button to a input pin, a pull-up/pull-down resistor help-me
to control state of a pin. If I connect to an input pin the output of a IC,
I have to enable the pull-up/pull-down resistor ? What happens if the IC has
a high value or low ? If I have the output pin of a IC connect to an interrupt-input
pin with pull-up/pull-down resistor ? The pull-up/pul-down resistor is required to input
that is not buttons, but a signal ? thanks

If the pin is connected to another IC then you do not need pull up/down resistors but if you have them then you will not have problems.

I found these schema on wikipedia. Fez has the same pull-up/pull-down schema ?
If instead of the button I put an IC, how does it work ?

I put a picture but you can not see

Thanks a lot. Stefano

Lets do this the easier way Tell me what you are trying to do and I will give you some pointer on how it is done.

I am not English, may not be able to explain

## button with pull-up resistor

button not pressed -> fez input pin "1"
button pressed -> fez input pin “0”

## button with pull-down resistor

button not pressed -> fez input pin "0"
button pressed -> fez input pin “1”

## IC-output-pin connect to fez-input-pin(with pull-up resistor)

ic-output-pin “0” -> fez-input-pin “0” is correct ?
ic-output-pin “1” -> fez-input-pin “1” is correct ?

## IC-output-pin connect to fez-input-pin(with pull-down resistor)

ic-output-pin “0” -> fez-input-pin “1” is correct ?
ic-output-pin “1” -> fez-input-pin “0” is correct ?

The above table is it correct ? Or wrong ?

In the: IC-output-pin connect to fez-input-pin(with pull-up
resistor) will tranfer same value ?

In the: IC-output-pin connect to fez-input-pin(with pull-down
resistor) will not tranfer same value ?

what is the exact table

Thanks a lot Stefano

note you don’t need a pull-up/down resistor when connecting digital IO. Unless your output is open collector.

Pull up/pull down resistor does NOT change the logic state that the FEZ sees. The purpose of a pull up or pull down resistor is to keep an input from ‘floating’ when it is not hooked to anything. The pull-up/pull-down setting changes a physical electrical connection in the chip it is not a method to do a logical ‘NOT’ on the input.

For example if you want to hook a switch to an input you might turn on the Pull-Up resistor and hook a NO switch to ground. When the switch is not pressed the input is pulled up to Vcc so the input sees a logic hi. When you press the switch you are pulling the input goes to a logic low as you are pulling it to ground.

If instead you had configured the input will a pull down resistor you would then hook the switch to Vcc. When the switch is not pressed the input is pulled to a logic low. When you press the switch the input is a logic hi as you are pulling it to Vcc.

If the input is connected to another chips output it will not ‘float’ as the other chips output will always be driven HI or LOW. You do NOT use the pull-up/pull-down resistor in this case.

thank you, thank you very much for your answers. You are very nice !!!

On fez mini’s brochure I read:

• Di10 has 1K resistor in series.
• An4 and An5 are open drain pins with 2.2K pull up resistors.
• An4 and An5 do not work as analog pins.

What does it mean exactly ?

Di10 has an internal 1K resistor that limit the curren ? That I can
connet something without an external resistor (for example led) ?
Or I must add a 1K resistor (the resistor is not internal)

An4 and An5 have an internal 2.2K resistor in pull-up, so it is
not necessary to add an external resistor ? Or I must add
an external resistor 2.2K (the resistor is not internal)

These considerations do not apply to other pins ?

On fez domino’s brochure I read:

• Di2 and Di3 are open drain pins with 2.2K pull up resistors

Same as An4/An5 pin on fez mini ? the only difference is that
these are digital ?

Thanks Stefano

First, remember that an analog input pin can also be used as a digital input pin. Analog input just senses a range of voltages and assigns them a value between 0 and 1023, where a digital pin can only sense on and off, giving you a value of 1 or 0. (Technically the analog input pins use an ADC, Analog to Digital Converter, when used in analog in mode).

So lets get to your questions…

• Di10 has 1K resistor in series.
Di10 has an internal 1K resistor that limit the curren ? That I can
connet something without an external resistor (for example led) ?
It has a series resistor already fitted. You don’t need to fit another resistor, unless your specific requirements call for a different resistance. For instance you might need a larger resistance for your LED, and you can just add another resistor to the series chain to get to the value you wish. {Gus and team; the schematic shows this as 1k5 resistor, which is right?}
• An4 and An5 are open drain pins with 2.2K pull up resistors.
An4 and An5 have an internal 2.2K resistor in pull-up, so it is
not necessary to add an external resistor ? Or I must add
an external resistor 2.2K (the resistor is not internal)
It already has 2.2k resistors added to the Fez, you do not need to add these. These resistors though are pull-up resistors so they function differently to the series resistor we just talked about.

Check out the scematic http://www.ghielectronics.com/downloads/FEZ/Mini/FEZMini_sch.pdf as it shows the differences quite well.

These considerations do not apply to other pins ?
No those things are not applicable to other pins; again check the schematic when in doubt.

On fez domino’s brochure I read:

• Di2 and Di3 are open drain pins with 2.2K pull up resistors
Same as An4/An5 pin on fez mini ? the only difference is that
these are digital ?
As I said at the outset, the An4/5 pins on the mini module are just using their “digital” method not the analog method. If you check the “function” of those pins (page 2 on mini brochure), you will see they are the I2C pins; that’s the same function as the Domino Di2/3 pins.