[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Re: ATmega16 PWM

From: Thomas D. Dean
Subject: [avr-gcc-list] Re: ATmega16 PWM
Date: Mon, 16 Jul 2007 00:09:21 -0700 (PDT)

I did some measurements on a 600Hz, 50% modulated PWM wave at 32kHz.
Modulate the PWM with 600Hz and 8 samples per cycle.  I used a TDS

I see an interrupt every 202.4usec, 1/(8*600).  At every interrupt,
the OCR value is set to value[idx], idx=(idx++)%8

value[8] = { 0x80, 0xad, 0xc0, 0xad, 0x80, 0x52, 0x40, 0x52  };

Looking at the FFT, I see
  Freq   Level(db)
   620    -4.8
  1320    -7.6
  1880     0    ???
  2500    -7.6
  3100   -16.0  wide
  3760    -6.8
31.00kHz -16.4
31.60kHz  -3.79
32.20kHz   0     PWM Frequency
32.80kHz  -3.79
33.40kHz -15.2

I was somewhat surprised by the 1880Hz value.  Around PWM Freq, I saw
what I expected.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]