Difference between revisions of "Component: HBRIDGE (CAL) (Misc)"
From Flowcode Help
Jump to navigationJump to search| (One intermediate revision by the same user not shown) | |||
| Line 15: | Line 15: | ||
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. | 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== | ==Detailed description== | ||
| Line 91: | Line 92: | ||
{{Fcfile|HBridgeTest_18877.fcfx|PIC16F18877 H-Bridge Example}} | {{Fcfile|HBridgeTest_18877.fcfx|PIC16F18877 H-Bridge Example}} | ||
| + | |||
| + | |||
| Line 279: | Line 282: | ||
| width="90%" | Period Register | | width="90%" | Period Register | ||
|- | |- | ||
| − | | colspan="2" | PWM | + | | 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" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| Line 373: | Line 376: | ||
| colspan="2" | Calculated PWM output frequency in Hz. | | colspan="2" | Calculated PWM output frequency in Hz. | ||
|} | |} | ||
| + | |||
| + | ==Component Source Code== | ||
| + | |||
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_HBRIDGE.fcfx FC_Comp_Source_HBRIDGE.fcfx] | ||
| + | |||
| + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_HBRIDGE.fcfx FC_Comp_Source_HBRIDGE.fcfx] | ||
Latest revision as of 16:45, 25 June 2026
| Author | Matrix TSL |
| Version | 2.1 |
| Category | Misc |
Contents
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

