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.

internal pull up & pull down value

Other Parts Discussed in Thread: MSP430G2553

sir; 

msp430g2553 controller is used

in my program  (P1REN =0x04;   // Pullup enabled for P1.2)

pull up is enabled for P1.2 and all other pin are pull down 

i need to know the the internal pull up & pull down resistor value .In datasheet it is given it is a programmable  only

  • Your understanding of the P1REN is not correct. By writing

    P1REN = 0x04;

    you enable the pull-up/down resistor for P1.2 - this does not mean P1.2 to be a pull-up and the other ones are pull-down. You enabled the resistor for P1.2, but the other pins still have their resistors disabled. In that configuration P1.2 is a pull-down, since the P1OUT register defines whether the resistor is a pull-up or down. P1OUT is 0x00 after startup and that leads to a pull-down. If you want to configure your resistor to be a pull-up you have to set the P1OUT bit as well by writing

    P1OUT = 0x04;
    P1REN = 0x04;

    The value of that resistor is 20k to 50k which can be found on page 24 in the datasheet:

    Dennis

  • thanks for your reply
    i have one more doubt i am giving adc input at P1.6 and it should start taking samples at every 250us (for about 20us adc should take samples)
    i used 4 samples but the average value of that samples is wrong i want to know 1samples =5us time taken
  • qwert trewq said:
    thanks for your reply
    i have one more doubt i am giving adc input at P1.6 and it should start taking samples at every 250us (for about 20us adc should take samples)
    i used 4 samples but the average value of that samples is wrong i want to know 1samples =5us time taken

    I suggest you start a new thread for that question because it's unrelated to this one. Also you'll need to give more detail of what you're trying to implement, and post the code you're working on.

**Attention** This is a public forum