This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Want to configure an Input signal as a pull down

Dear Executive,

My application is that an IO used as input remain conacted to a external ckt during some programming mode after that it remains floating.

Now i want this IO as pulls down when another ckt is not connected with it.

Can i do it with PxREN ? How?

Rgds..

Jigar

  • Either you use an external pull-down or you active the internal one. Activating the internal one means that this input is floating until the code activates the internal pull-down after a power-up.  If this is not a problem for you application that could be a solution. Activation of the pull-down is quite simple, for example it is described in chapter "10.2.4 Pullup/Pulldown Resistor Enable Registers PxREN" in the MSP430x5xx User's Guide.

    For example, doing the setting for P1.0 would look like this:

    P1DIR &= ~BIT0;
    P1REN |= BIT0;
    P1OUT |= BIT0;

     

     

  • Thanks Voyager,

    Can you also confirm if i configured as pulls down then also i will be getting the correct input signal when applied to that pin.

  • Well, this really depends on your application. The pull-down causes that the pin is connected to ground via the resistor. When you apply directly a signal to the pin you will see this signal at the pin. As a side effect you will see that there is a current also going through the resistor. Therefore you try to use a high value for this resistor - but not too high because otherwise the noise or disturbance may cause issue in your system. The output driver of your clock source will definitely have a certain impedance. However, this one is much smaller than the pull-down you use. My assumption is that the output driver has an impedance of few Ohms while the pull-down is in the range of 100kOhms. Therefore the voltage drop that is caused by this resistor divider can be neglected.

    Here is an example:

**Attention** This is a public forum