|
|
|
Bean
PWM
|
Pulse width modulation
Parameters of the bean.
|
Properties:
-
Bean name - Name of the bean.
-
PWM or PPG timer - Pulse Width Modulation compare register or Programmable Pulse Generation period compare/reload register.
-
Duty compare - Duty compare/reload register (for PPG timer only).
-
Output pin - Pin used for output of the generated signal.
-
Output pin signal - Signal name of output pin.
-
Counter - Name of the counter used by this bean (for information only).
-
Interrupt service/event - Support of interrupt service.
Event OnEnd is only available if Interrupt service is enabled.
-
Settings supported for Freescale HCS12/HCS12X derivatives.
-
Prescaler - Prescaler selected for the timer.
-
Internal prescaler - Internal prescaler value.
This item is valid only if the prescaler above is selected internal peripheral (such as for example timer) and this peripheral allows additional settings. This HW feature is supported only for several CPU architectures.
-
Internal compare - Internal compare prescaler value.
This item is valid only if the prescaler above is selected internal peripheral (such as for example timer) and this peripheral allows additional settings. This HW feature is supported only for several CPU architectures.
-
Period - Period of the output signal. It is necessary to specify both a value and a unit (see Timing Setting Syntax). The setting can be made with the help of the Timing dialog box that opens when clicking on the button
(...).
-
Starting pulse width - Starting pulse width. It specifies the length of time that the output signal spends in the active level during the output cycle. The active level is defined in the Initial polarity. It is necessary to specify both a value and a unit (see Timing Setting Syntax). The setting can be made with the help of the Timing dialog box that opens when clicking on the button
(...).
-
Settings supported for HCS12 and HCS12X derivatives only.
-
Aligned - The PWM timer provides the choice of two types of outputs, Left Aligned or Center Aligned outputs.
Note: If align mode is switched to Center-align mode then real lengths of the Period and the Starting pulse width signals will be a double of what is being displayed in the Bean Inspector.
-
Initial polarity - Initial polarity of the output signal: "O" = "Low", "1" = "High". It is possible to change it at runtime using methods: ClrValue and SetValue .
-
Iterations before action/event - Number of periods before OnEnd event.
-
Same period in modes - Period is exactly the same in all speed modes (high, low, slow). If you select 'Yes' the timing will be kept with a tolerance of one tick. If you select 'No' timing will be kept with setting precision only.
-
Bean uses entire timer - The bean can use every subsystem of the timer, more actions may be done by HW instead of SW, but no other bean can share the timer.
-
Initialization - Initial settings (after power-on or reset).
-
CPU clock/speed selection - Settings for the CPU speed modes: identifies whether the bean is supported or not.
For details about speed modes please refer to page Speed Modes Support.
-
The following items are visible only if integration of Processor Expert with Simulink supported.
|
|
|
Processor ExpertTM and Embedded BeansTM are registered trademarks of UNIS, Ltd.
©1997-2005, UNIS, Ltd.
|
|
|