Reference Manual
PMAC 2 Software Reference
PMAC I-Variable Specification 151
SCLK divider.
Example
The maximum encoder count frequency in the application is 800 kHz, so the 1.2288 MHz
SCLK frequency is chosen. A pulse train up to 500 kHz needs to be generated, so the
2.4576 MHz PFM_CLK frequency is chosen. ADCs and DACs are not used, so the
default DAC_CLK frequency of 4.9152 MHz and the default ADC_CLK frequency of
2.4576 MHz are chosen. From the table:
..........................SCLK Divider N: 5
..........................PFM_CLK Divider N: 4
..........................DAC_CLK Divider N: 3
..........................ADC_CLK Divider N: 4
..........................I993 = 5 + (8 * 4) + (64 * 3) + (512 * 4) = 5 + 32 + 192 + 2048 = 2277
I993 has been set to 3429. What clock frequencies does this set?
..........................N1 = INT (3429/512) = 6 ADC_CLK = 611.44 kHz
..........................I993’ = 3429 - (512*6) = 357
..........................N2 = INT (357/64) = 5 DAC_CLK = 1.2288 MHz
..........................I993’’ = 357 - (64*5) = 37
..........................N3 = INT (37/8) = 4 PFM_CLK = 2.4576 MHz
N4 = 37 - (8*4) = 5 SCLK = 1.2288 MHz
I994 PWM 1*-2* Deadtime / PFM 1* Pulse Width Control {PMAC2 only}
Range
0 .. 255
Units
PWM Deadtime = [16 / PWM_CLK (MHz)] * I994 = 0.135 usec * I994
PFM Pulse Width = [1 / PFM_CLK (MHz)] * I994
= PFM_CLK_period (usec) * I994
Default
15
PWM Deadtime = 0.135 usec * 15 = 2.03 usec
PFM Pulse Width = [1 / 9.8304 MHz] * 15 = 1.526 usec (with default I993)
Remarks
I994 controls the deadtime period between top and bottom on-times in PMAC2’s
automatic PWM generation for supplemental machine interface channels 1* and 2*. In
conjunction with I993, it also controls the pulse width for PMAC2’s automatic pulse-
frequency modulation generation for supplemental machine interface channel 1*.
The PWM deadtime, which is the delay between the top signal turning off and the bottom
signal turning on, and vice versa, is specified in units of 16 PWM_CLK cycles. This
means that the deadtime can be specified in increments of 0.135 usec. The equation for
I994 as a function of PWM deadtime is:
sec135.0
sec)(DeadTime
994I
µ
µ
=
The PFM pulse width is specified in PFM_CLK cycles, as defined by I993. The equation
for I994 as a function of PFM pulse width and PFM_CLK frequency is:
sec)(Width_Pulse_PFM*)MHz(Freq_CLK_PFM994I
µ
=
In PFM pulse generation, the minimum off time between pulses is equal to the pulse width.
This means that the maximum PFM output frequency is:
994I*2
)MHz(Freq_CLK_PFM
)MHz(Freq_Max_PFM =
Example
A PWM deadtime of approximately 1 microsecond is desired: