Reply by Art Johnson September 9, 20022002-09-09
The PWM prescaler only allows you to divide the IPbus by 1, 2, 4, or 8
using the PRSC0 and PRSC1 bits in the PWM Control Register (PWMCTL).
Also, the PWM Counter Modulo Register (PWMCM) is only 15 bits long, with
a maximum value of 32767. So, the lowest frequency is 40MHz / (8 *
32767), or about 152.6Hz. I would suggest using one of the on-chip
Timers for this purpose, as they have a PWM capability (see
"Fixed-Frequency PWM Mode" in the User's Manual), their prescaler is up
to fIPbus/128, and they are full 16-bit counters (ie a modulo of 65536).

Regards,

Art Johnson
Senior Systems Analyst
PMC Prime Mover Controls Inc.
3600 Gilmore Way
Burnaby, B.C., Canada
V5G 4R8
Phone: 604 433-4644
FAX: 604 433-5570
Email:
http://www.pmc-controls.com
-----Original Message-----
From: Nitin Madhukar Yewale [mailto:]
Sent: Sunday, September 08, 2002 8:14 PM
To: Motoroladsp
Subject: [motoroladsp] Calculation for PWM using 827 Hi,
I am using 827 processor for my application. Core freq is 80Mhz
so peripheral freq is 40Mhz.
I want to generate PWM (under variable freq PWM mode) of 10 Hz frq and
1.5 mili seconds [Pulse width].

Here are the calculation for the same.
If I use prescaler of 64 then :
40Mhz/64 = 625000 Hz i.e. 0.0000016 seconds for 1 cnt.
Now If I want to generate freq of 10 hz ie. 1/10 = 0.1 seconds then
value which I suppose to load in CMP1 register is
.1/0.0000016 = 62500 ie. 0xf424.

Please correct if I am wrong.

Could anyone tell me calculation about pulse width which I suppose to
load in CMP2 register? Or I will have to load same number. Is there any
other way to get the respective number to get desired pulse width?

Thanks and Regards,
Nitin Yewale.
_____________________________________
Note: If you do a simple "reply" with your email client, only the author
of this message will receive your answer. You need to do a "reply all"
if you want your answer to be distributed to the entire group.

_____________________________________
About this discussion group:

To Join:

To Post:

To Leave:

Archives: http://www.yahoogroups.com/group/motoroladsp

More Groups: http://www.dsprelated.com/groups.php3 ">http://docs.yahoo.com/info/terms/


Reply by Nitin Madhukar Yewale September 9, 20022002-09-09
Hi,
I am using 827 processor for my application. Core freq is 80Mhz
so peripheral freq is 40Mhz.
I want to generate PWM (under variable freq PWM mode) of 10 Hz frq and
1.5 mili seconds [Pulse width].

Here are the calculation for the same.
If I use prescaler of 64 then :
40Mhz/64 = 625000 Hz i.e. 0.0000016 seconds for 1 cnt.
Now If I want to generate freq of 10 hz ie. 1/10 = 0.1 seconds then
value which I suppose to load in CMP1 register is
.1/0.0000016 = 62500 ie. 0xf424.

Please correct if I am wrong.

Could anyone tell me calculation about pulse width which I suppose to
load in CMP2 register? Or I will have to load same number. Is there any
other way to get the respective number to get desired pulse width?

Thanks and Regards,
Nitin Yewale.



**************************Disclaimer********************************************\
******

Information contained in this E-MAIL being proprietary to Wipro Limited is
'privileged'
and 'confidential' and intended for use only by the individual or entity to
which it is
addressed. You are notified that any use, copying or dissemination of the
information
contained in the E-MAIL in any manner whatsoever is strictly prohibited.

********************************************************************************\
********