2004-02-16 10:51 PM
2011-05-17 02:58 AM
Hello
Can you find me the max freq I generate from one of the PWM ports (I'm using 24Mhz Crystal for the uPSD3234). Thanks ahead Thanks Latino2011-05-17 02:58 AM
Latino,
Max Pwm = (24000000/2)/(0+1) = 12MHz as per datasheet. Regards sjo2011-05-17 02:58 AM
Hello Sjo ,
How you got this number , is this is the right formula : output max. around 23.4 kHz. =24MHz/(2*2*256) Latino2011-05-17 02:58 AM
Sorry,
Didn't put all the information. The formula above calculates the input frequency to the pwm unit. which for 12MHz is 6MHz = fOSC / 2 / (prescaler data value + 1) from this we can calculate fPWM8 which is our output pwm. fPWM8 = (fOSC / prescaler0) / (2 x 256) we cannot use 0 or 0xFF as these will give us a permanent high or low. the actual maximum frequency is obtained from a prescaler0 of 1 so maximum frequency is 23437.5Hz for 12MHz clock. Regards sjo