This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Varying dutycycle

Hi,

I am using cortex-M3. I need to generate a square wave using ADC values. Also i need to change the duty cycle. Already i have used timer program to generate square wave with 16ms of timeperiod. Please help me how to change the program.

Thank You.

Parents
  • ADC resolution i.e. Final value
    ADC resolution or Maximum count value corresponding to Vdd volts.

    ON time period = 16msec - Part number in which the current value falls.
    Load the count corresponding to the Timer ON period into 1match register and count corresponding to 16msec in other match register of the same timer.
    On interrupt, check interrupt due to which match register was generated and accordingly Set/Reset the port pin on which you want to generate the waveform.

Reply
  • ADC resolution i.e. Final value
    ADC resolution or Maximum count value corresponding to Vdd volts.

    ON time period = 16msec - Part number in which the current value falls.
    Load the count corresponding to the Timer ON period into 1match register and count corresponding to 16msec in other match register of the same timer.
    On interrupt, check interrupt due to which match register was generated and accordingly Set/Reset the port pin on which you want to generate the waveform.

Children