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.

Beginner's question: CC3200 Launchpad - Is it difficult to setup GPIO PWM?

Other Parts Discussed in Thread: CC3200

I'm a software developer trying to launch an embedded outdoor project.

This is the first embedded project I'm trying to do. So my question might be naive. Please be patient.

While the CC3200 is supposed to serve in my project both as an Wi-Fi access point and a HTTP web server for user interaction, it's main purpose is to drive an external microchip with 5 V PWM @ 3MHz (i.e. output level might switch every 0.3µs).

Using the launchpad hardware, is this hard to achieve?

How about timing? Will my program be able to set the GPUI output level strictly in time without being interfered?

  • Hi,

        There is a PWM example program at CC3200 SDK. You can start getting familiar with PWM by learning from that.

    - kel

  • Hi,

    A D said:
    it's main purpose is to drive an external microchip with 5 V PWM @ 3MHz (i.e. output level might switch every 0.3µs)

    OK, we are patient, but in this assertion there are some misplaced terms, so to avoid directing you on bad tracks,  it would be better to re-define them or to add more details, as follows:

    a) a PWM deals with pulse width modification, aka is modifying on-off durations of a pulse, while you speak about the level. For PWM the LEVEL is unchanged, only change is time. A hardware add-on must be used to realise the drive level 5V.

    b) it is possible to have also level change, this is done with a DAC; so what do you really need?

    As for real PWM in  this micro, it may obtained with a particular configuration of one timer. Since the timer is driven by system clock, the highest frequency 80MHz, means the clock period is 12.5ns. While you claim 3MHz (330ns) will result in setting the PWM period to be 26. Now for pulse duration, you have to set between 1..2 up to 24..25 (the exact extreme values are not allowed in this implementation) - resulting in a resolution of 1 in ~20. Is this OK for your application in this case?

    Petrei

  • Yes, you are right, of course. Well, what I actually meant when I was writing about PWM level I was talking about switching between HIGH and LOW level.

    So the Launchpad doesn't provide a GPIO pin allowing me to feed 5 V to drive some other circuits (custom serial IOs)?

    As a software guy I don't have any idea of what to add to get this done. Do you have any suggestions at hand?

  • Hi,

    You need a level translator between 3.3V of micro and 5V of your device. Such level translator can be a 74HCTxy gate which accepts TTL level inputs, as your micro delivers, and is powered from 5V, giving output from 0 to 5V. See this family and choose what is suitable for your application.

    Petrei

  • OK ... Hmm, just to make sure:

    The Launchpad is already driven by 5 V. But it doesn't provide facility to drive 5 V output signal?

    So I do have to add additional hardware to it?

    That's something I wanted to avoid because I neither have the skills nor do I know someone who has.

  • Hi,

    Launchpad is only powered at 5V, then a 3.3V source is provided, since the micro works at 3.3V and it is only 5V input tolerant, meaning you can drive an input pin with 5V, but you cannot stress an output with 5V, so a level translator must be added, even this one is powered from the same 5V power.

    You do not mention how many outputs do you need to reccomend a part - HCT parts have usually four ports, but there are also some single gates available.

    Petrei

  • Yes, you are right. I would need four such outputs.

    Would I just solder that chip to the GPIO ports? Or would I have to add additional components, too?

    I hope that additional chip won't add latency or filthiness to the signal?

    I just read that that's what I want to do is called Bit Banging.

  • Hi,

    Try to look at this chip: http://www.ti.com/lit/ds/symlink/cd74hct08.pdf it has four AND gates. To use a gate as level translator, one input pin of the gate should be at Hi level, (even 5V) and the other one to receive the signal from the micro. The output of the gate will swing between gate's VDD(=5V) and 0. One more component - 100 nF decoupling capacitor between chip's VDD and GND will be useful. Where to mount/install them is another problem.

    If you still need a PWM pulse, bit banging is of not use in this case, but still would be useful to learn about.

    One question more: are you sure the device that will be connected is operating at 5V? (possibly to work at 3.3V?)

    Petrei

  • Hi Petrei,

    Please give your suggestion on this post !!


    e2e.ti.com/.../1561446