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.

GPIO Input Code and Voltage level MSP430F5529

Other Parts Discussed in Thread: MSP430WARE

Hi  I am new and not good english speaking person. I have two questions, before I do something to MSP430 board. 

1- What is the maximum voltage I cab apply to GPIO pin for input purpose. 

2-  What is the proper code. 

What I know so far. Acording to datasheet I can apply voltage upto 3.3volts on input pin e.g P2.0. Below is the code I Know.

GPIO_setAsInputPinWithPullUpresistor(GPIO_PORT_P2,GPIO_PIN0);

GPIO_interruptEdgeSelect(GPIO_PORT_P4,GPIO_PIN0,GPIO_HIGH_TO_LOW_TRANSITION);

Please define. If I run the code then I can test the Input function by applying 3.3volts to P2.0 from DC Power Source and negative to GND pin of the board. ??? It will work or burn the microcontroller and make it useless. 

  • The maximum input voltage of each pin depends on the supply voltage Vcc, if you apply 2.5V as Vcc to the chip then the maximum GPIO voltage is 2.5V.

    suleman zafar paracha said:
    P2.0 from DC Power Source and negative to GND pin of the board

    Is Ok.

    When testing, and especially when sourcing from an external power supply which can be a little bit above Vcc, use a series resistor of about 4K7.

  • Sir I am using USB port. Which puts 5 volts and on board it makes 3.3volts. So means I can apply 3.3volts. Also I am going to use 4K7 resistor. 

    Now what about Code sample....???

  • If you not have already installed MSP430Ware, in CCS select ‘View\Resource Explorer’, then install it in CCSv6 via ‘View\CCS App Center’ or go to the product page of your MCU and download the code examples and/or from here you can also download MSP430Ware, here you will find a lot of examples.

  • Suleman,

    The voltage range that you can apply to the controller pin always lies within GND to VCC otherwise you can 'fry' your CHIP. I think know it is clear.

     

    Regards,

    Dharmendra Sharma

    INDIA

    __________________________________
    Do, click "Verify Answer", if any of my replies helps solve your problem.

  • Thank You so much this is really helpful...

  • Actually, things are a little bit more complicated. The maximum voltage for any digital I/O pin (for analog pins there are exceptions in both directions) is VCC+0.2V. The reason is, that on 0.2V above VCC, the clamp diode on the input begins to conduct, driving current to VCC until the input voltage breaks down. You can actually power the MSP though an input pin this way (really not recmommended). It happened very often that people apply a signal to an input pin whiel the MSP supply is off, and suddenly the MSP starts operating.

    However, the current limit is 2mA (or the diode will melt sooner or later).  You can apply any voltage to the MSP inputs as long as you limit the current to 2mA. E.g. when running on 3V, you may apply 5V when using a 1k series resistor. This will limit the input current to 2mA (at 2mA, 2V will be on the resistor and 3V on the input). With the high input impedance of the digital pins (you need only a few nA input current), you can (in theory, don’t try that!) take a 150k series resistor and apply 110V AC.

    However, exceeding VCC results in an additional current, and this is not a good thing for a low-power application.

**Attention** This is a public forum