Difference between revisions of "Component: PWM (Peripheral CAL)"
(XML import) |
(XML import BR) |
||
Line 7: | Line 7: | ||
|- | |- | ||
| width="20%" style="color: gray;" | Version | | width="20%" style="color: gray;" | Version | ||
− | | 1. | + | | 1.4 (Release) |
|- | |- | ||
| width="20%" style="color: gray;" | Category | | width="20%" style="color: gray;" | Category | ||
Line 168: | Line 168: | ||
This property is of type ''Single digital pin'' and can be referenced with the variable name ''PORT''. | This property is of type ''Single digital pin'' and can be referenced with the variable name ''PORT''. | ||
+ | |||
+ | ''<span style="color:red;">No additional information</span>'' | ||
+ | |||
+ | |||
+ | |||
+ | <span style="font-weight: normal;"><u>Remap Pin</u></span> | ||
+ | |||
+ | This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''RemapPin''. | ||
''<span style="color:red;">No additional information</span>'' | ''<span style="color:red;">No additional information</span>'' | ||
Line 184: | Line 192: | ||
Prescaler Divider value | Prescaler Divider value | ||
+ | |||
+ | <span style="font-weight: normal;"><u>Clock Frequency</u></span> | ||
+ | |||
+ | This property is of type ''Unsigned integer'' and can be referenced with the variable name ''CLK_FREQ''. | ||
+ | |||
+ | Timer clock frequency | ||
<span style="font-weight: normal;"><u>PWM Timer</u></span> | <span style="font-weight: normal;"><u>PWM Timer</u></span> |
Latest revision as of 15:45, 16 February 2017
Author | Matrix Ltd |
Version | 1.4 (Release) |
Category | Peripheral CAL |
Contents
PWM component
A low level implementation giving direct access to the CAL
Examples
No additional examples
Downloadable macro reference
ChangePeriod
Change the Period (and prescaler) for this PWM Channel
Parameters
- UINT period
- period value PIC/AVR: 0-255 16-bit PIC: 0-65535
- UINT prescaler
- prescaler 1,4,16,64
Return value
- This call does not return a value
Disable
Disable this PWM Channel
Parameters
- This macro has no parameters
Return value
- This call does not return a value
SetDuty8Bit
Set the Duty cycle (0-255) for this PWM Channel
Parameters
- BYTE duty
- duty value 0 - 255
Return value
- This call does not return a value
Enable
Enable this PWM Channel
Parameters
- This macro has no parameters
Return value
- This call does not return a value
SetDuty10Bit
Set the Duty Cycle for this PWM Channel.
PIC/AVR - Range: 0-1023
16-bit PIC - Range: 0-65535
Parameters
- UINT duty
- Duty value 0 - 1023
Return value
- This call does not return a value
Simulation macro reference
GetValue
Returns Named property Value
Parameters
- STRING Name
Return value
SetValue
Sets the Value of the property
PERIOD, PRESCALE or CHANNEL
(if CHANNEL also updates the PORT from FCD)
Parameters
- STRING Name
- STRING Value
Return value
- This call does not return a value
GetList
Returns CHANNEL or PRESCALE list from the FCD
and updates the internal property
Parameters
- STRING Name
Return value
Property reference
Channel
This property is of type Fixed list of ints and can be referenced with the variable name CHANNEL.
PWM Channel selector
Alt Pin Enable
This property is of type Fixed list of ints and can be referenced with the variable name HWALT.
Alternative Pin Enable (if available on target device)
Port
This property is of type Single digital pin and can be referenced with the variable name PORT.
No additional information
Remap Pin
This property is of type Fixed list of ints and can be referenced with the variable name RemapPin.
No additional information
Period Register
This property is of type Signed integer and can be referenced with the variable name PERIOD.
PWM Period Register value
Prescaler Divide
This property is of type Fixed list of ints and can be referenced with the variable name PRESCALE.
Prescaler Divider value
Clock Frequency
This property is of type Unsigned integer and can be referenced with the variable name CLK_FREQ.
Timer clock frequency
PWM Timer
This property is of type Fixed list of ints and can be referenced with the variable name timer.
Timer associated with PWM to drive the output.
Warning - All PWM channels linked to the same timer will share the same period and prescaler settings.
Clock Speed
This property is of type Signed integer and can be referenced with the variable name CLK_SPEED.
No additional information
Period (uS)
This property is of type Floating point and can be referenced with the variable name CALC_PERIOD.
No additional information
Frequency (KHz)
This property is of type Floating point and can be referenced with the variable name CALC_FREQ.
No additional information
Master Divider
This property is of type Signed integer and can be referenced with the variable name master_divider.
No additional information