Component: PWM (CAL) (Misc)
From Flowcode Help
(Redirected from Component: ID 068080a0 b949 4a7e b370 c45430e0c9de)
Jump to navigationJump to searchAuthor | Matrix TSL |
Version | 2.2 |
Category | Misc |
Contents
PWM component
CAL = Code Abstraction Layer - Allows one code base to run on a wide range of chips. A low level implementation giving direct access to the Pulse Width Modulation peripheral.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_PWM.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_PWM.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ChangeFrequency
ChangeFrequency | |
Advanced function for the ESP32 hardware to set the PWM output frequency. | |
- ULONG | Frequency |
New PWM desired frequency in Hz | |
- VOID | Return |
ChangePeriod
ChangePeriod | |
Change the Period (and prescaler) for this PWM Channel | |
- UINT | period |
period value PIC/AVR: 0-255 16-bit PIC: 0-65535 | |
- UINT | prescaler |
prescaler 1,4,16,64 | |
- VOID | Return |
Disable
Disable | |
Disable this PWM Channel | |
- VOID | Return |
Enable
Enable | |
Enable this PWM Channel | |
- VOID | Return |
GetList
GetList | |
Returns CHANNEL or PRESCALE list from the FCD and updates the internal property | |
- STRING | Name |
- STRING | Return |
GetValue
GetValue | |
Returns Named property Value | |
- STRING | Name |
- STRING | Return |
SetDuty10Bit
SetDuty10Bit | |
Set the Duty Cycle for this PWM Channel. PIC/AVR - Range: 0-1023 16-bit PIC - Range: 0-65535 | |
- UINT | duty |
Duty value 0 - 1023 | |
- VOID | Return |
SetDuty8Bit
SetDuty8Bit | |
Set the Duty cycle (0-255) for this PWM Channel | |
- BYTE | duty |
duty value 0 - 255 | |
- VOID | Return |
SetDutyFloat
SetDutyFloat | |
Advanced function for the ESP32 hardware to set the PWM duty as a percentage between 0.0 and 100.0 | |
- FLOAT | Duty |
- VOID | Return |
SetValue
SetValue | |
Sets the Value of the property PERIOD, PRESCALE or CHANNEL (if CHANNEL also updates the PORT from FCD) | |
- STRING | Name |
- STRING | Value |
- VOID | Return |