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.

MSP430G2111 PWM cap

Other Parts Discussed in Thread: MSP430G2111

With the MSP430G2111, is it possible to program a cap value for PWM or is the max set at VIN and you have to use an analog to digital converter, send the output to an op amp, then through a digital to analog converter? I am trying to program an MSP430G2111 to control several diffrent ic's and some require a specific voltage level (varying from 2.7 V to 9 V)

Thank you in advance!

  • I don't understand what you're trying to do with a PWM.

    PWM means Pulse Width Modulation.

    For a PWM, the output voltage is either zero or VCC. Off or On.A plain digital value. The modulation determines how long it is VCC before it goes back to zero. There is nothing analog with PWM.

    You can send a PWM signal through a low-pass-filter to get a voltage that is equivalent to the amount of time the PWM output is VCC. But it must be an extreme low-pass to give an almost ripple-free result. (well, a motor conductor is an extreme low-pass, this is why you can control motor speed with PWM).

    If you want to convert the output voltage to something else than the MSPs VCC, you can do so by using a FET pair. (similar to a darlington stage for bipolar transistors). The source voltage of the second FET will be the new output voltage then. However, if you want to drive some current in both directions, you can indeed use an OpAmp. Give it an input divider for the PWM signal on the positive input and a 1:1: loopback on the negative and the output will be any voltage below VCC.

**Attention** This is a public forum