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.

Adjustable Amplitude Square wave Generation

Dear Team,

I need to generate the square wave form as shown below.

up to t1 1V ,

t1 to t2 2V

t2 to t3 0.5V and this cycle repeats.

May I know how to do this

Regards

Hari

  • Hi Hari,

    I think the best/easiest way would be to use a DAC device to convert a digital input to an analog output voltage.  I'll add our MSP430 team to this thread to see if they have any devices with integrated DACs that could achieve what you're trying to do.

  • Hi Emry,

    Can we use a voltage divider with 3 resistors.

    The question is asked in an interview.He gave me a 5V source.

    I can use the 5v whatever way I want to get the waveform

    Regards

    Hari

  • Hi Hari,

    Yes, a 3-resistor system would work to produce a variable voltage divider.  This isn't really support for a TI logic device though, which is the purpose of this forum.

    This type of question I would recommend to post to a more public / hobbyist type of forum -- for example, Reddit or Stack Exchange.

    We do have a post from a member that's in regards to using 3-resistor dividers for voltage scaling here that might be helpful: (+) 3-resistor voltage scaler calculator download here - Amplifiers forum - Amplifiers - TI E2E support forums

    If I were going to solve this, I would start by setting up the resistor divider, selecting an arbitrary value for one of them, and then use the given output values and superposition theorem to build 3 equations to solve.  Just glancing at it (I haven't tried to solve it), I don't think that you can get all 3 of those values varying only 2 supplies, so you might need to vary all 3 connections to get the solution, which would be a bit time consuming to solve by hand.

    There may be some shortcut by using conductances and KCL instead, but it's not something I'm familiar with off the top of my head.