Difference between revisions of "Component: PWM (CAL)"
(XML import) |
(XML import) |
||
Line 1: | Line 1: | ||
− | |||
{| width="50%" | {| width="50%" |
Latest revision as of 12:51, 21 July 2016
Author | Matrix Ltd |
Version | 1.3 (Release) |
Category | 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
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
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