Component: HBRIDGE (CAL) (Misc): Difference between revisions
Appearance
m Text replacement - "style="background-color:#EAE1EA; color:#4B008D;"" to "class="mtx-class-propfolder"" |
m Text replacement - "style="background-color:#EAE1EA;"" to "class="mtx-class-propfolder"" |
||
| Line 250: | Line 250: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Settings | | width="90%" class="mtx-class-propfolder" | Settings | ||
|- | |- | ||
| Line 284: | Line 284: | ||
| colspan="2" | Defines the resolution of the PWM duty mark/space ratio. PWM duty can be between 0 (0%) and period (100%). | | colspan="2" | Defines the resolution of the PWM duty mark/space ratio. PWM duty can be between 0 (0%) and period (100%). | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Dead Band | | width="90%" class="mtx-class-propfolder" | Dead Band | ||
|- | |- | ||
| Line 308: | Line 308: | ||
| colspan="2" | Number of cycles to wait after a rising edge and before a falling edge. | | colspan="2" | Number of cycles to wait after a rising edge and before a falling edge. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Connections | | width="90%" class="mtx-class-propfolder" | Connections | ||
|- | |- | ||
| Line 352: | Line 352: | ||
| colspan="2" | Remap Pin D - Specifies the pin used for the D output. Only available on devices supporting remappable hardware pins. | | colspan="2" | Remap Pin D - Specifies the pin used for the D output. Only available on devices supporting remappable hardware pins. | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-propfolder" | [[File:Fc9-conn-icon.png]] | ||
| width="90%" class="mtx-class-propfolder" | Calculations | | width="90%" class="mtx-class-propfolder" | Calculations | ||
|- | |- | ||
Latest revision as of 14:37, 13 July 2026
| Author | Matrix TSL |
| Version | 2.1 |
| Category | Misc |
HBRIDGE 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 H-Bridge peripheral. Currently only supports compatible 8-bit PIC devices.
Version information
Library Version, Component Version, Date, Author, Info 5, 2.1, 04-11-24, BR, Added pin caption to the remap port pin selection property 6, 2.1, 04-11-24, BR, Cleaned up pin caption from none remap port pin property 7, 2.1, 15-07-25, BR, Sorted the remap pin properties by port pin
Detailed description
Half Bridge Application
A Half Bridge type output has two output signals A and B.
Full Bridge Application
Full Bridge type output has four output signals A, B, C and D.
Examples
A simple proof of concept example to drive a full bridge output with varying speed and direction.
Macro reference
Disable
| Disable | |
| Disable this PWM Channel | |
| Return | |
Enable
| Enable | |
| Enable this PWM Channel | |
| Return | |
GetList
| GetList | |
| Returns CHANNEL or PRESCALE list from the FCD and updates the internal property | |
| Name | |
| Return | |
GetValue
| GetValue | |
| Returns Named property Value | |
| Name | |
| Return | |
SetDirection
| SetDirection | |
| Set the motor direction. | |
| direction | |
| 0 = Forwards, 1 = Reverse | |
| Return | |
SetSpeed
| SetSpeed | |
| Sets the motor speed by varying the PWM duty. | |
| duty | |
| Duty value 0 - 1023 | |
| Return | |
SetValue
| SetValue | |
| Sets the Value of the property PERIOD, PRESCALE or CHANNEL (if CHANNEL also updates the PORT from FCD) | |
| Name | |
| Value | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_HBRIDGE.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_HBRIDGE.fcfx

