Difference between revisions of "Component: HBRIDGE (CAL) (Misc)"
From Flowcode Help
Jump to navigationJump to searchLine 91: | Line 91: | ||
{{Fcfile|HBridgeTest_18877.fcfx|PIC16F18877 H-Bridge Example}} | {{Fcfile|HBridgeTest_18877.fcfx|PIC16F18877 H-Bridge Example}} | ||
+ | |||
+ | |||
Line 96: | Line 98: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===GetValue=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 114: | Line 117: | ||
+ | ===Disable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 127: | Line 131: | ||
+ | ===Enable=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 140: | Line 145: | ||
+ | ===SetSpeed=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 158: | Line 164: | ||
+ | ===SetValue=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 181: | Line 188: | ||
+ | ===SetDirection=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 199: | Line 207: | ||
+ | ===GetList=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:50, 3 February 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 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
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
GetValue
![]() |
GetValue |
Returns Named property Value | |
![]() |
Name |
![]() |
Return |
Disable
![]() |
Disable |
Disable this PWM Channel | |
![]() |
Return |
Enable
![]() |
Enable |
Enable this PWM Channel | |
![]() |
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 |
SetDirection
![]() |
SetDirection |
Set the motor direction. | |
![]() |
direction |
0 = Forwards, 1 = Reverse | |
![]() |
Return |
GetList
![]() |
GetList |
Returns CHANNEL or PRESCALE list from the FCD and updates the internal property | |
![]() |
Name |
![]() |
Return |