Difference between revisions of "Component: HBRIDGE (CAL) (Misc)"
From Flowcode Help
Jump to navigationJump to search| Line 20: | Line 20: | ||
==Detailed description== | ==Detailed description== | ||
| + | |||
| + | |||
| Line 47: | Line 49: | ||
==Examples== | ==Examples== | ||
| + | |||
| + | |||
| Line 197: | Line 201: | ||
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | | width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties''' | ||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
|- | |- | ||
| Line 207: | Line 207: | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] | ||
| + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Settings | ||
| + | |- | ||
|- | |- | ||
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | | width="10%" align="center" | [[File:Fc9-type-16-icon.png]] | ||
Revision as of 14:41, 16 January 2023
| 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.
Component Source Code
Please click here for the component source code: FC_Comp_Source_HBRIDGE.fcfx
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.
Downloadable macro reference
| GetValue | |
| Returns Named property Value | |
| Name | |
| Return | |
| Disable | |
| Disable this PWM Channel | |
| Return | |
| Enable | |
| Enable this PWM Channel | |
| Return | |
| SetSpeed | |
| Sets the motor speed by varying the PWM duty. | |
| duty | |
| Duty value 0 - 1023 | |
| Return | |
| SetValue | |
| Sets the Value of the property PERIOD, PRESCALE or CHANNEL (if CHANNEL also updates the PORT from FCD) | |
| Name | |
| Value | |
| Return | |
| SetDirection | |
| Set the motor direction. | |
| direction | |
| 0 = Forwards, 1 = Reverse | |
| Return | |
| GetList | |
| Returns CHANNEL or PRESCALE list from the FCD and updates the internal property | |
| Name | |
| Return | |

