Difference between revisions of "Component: HBRIDGE (CAL) (Peripheral CAL)"
(XML import) |
|||
Line 19: | Line 19: | ||
A low level implementation giving direct access to the H-Bridge peripheral. | A low level implementation giving direct access to the H-Bridge peripheral. | ||
Currently only supports compatible 8-bit PIC devices. | Currently only supports compatible 8-bit PIC devices. | ||
+ | |||
+ | |||
+ | ==Detailed description== | ||
+ | |||
+ | ===Half Bridge Application=== | ||
+ | |||
+ | A Half Bridge type output has two output signals A and B. | ||
+ | |||
+ | [[File:HB_Schematic.jpg]] | ||
+ | |||
+ | |||
+ | ===Full Bridge Application=== | ||
+ | Full Bridge type output has four output signals A, B, C and D. | ||
+ | |||
+ | [[File:FB_Schematic.jpg]] | ||
Revision as of 09:58, 20 August 2018
Author | Matrix TSL |
Version | 2.1 (Release) |
Category | Peripheral CAL |
Contents
HBRIDGE (CAL) 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.
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
No additional examples
Downloadable macro reference
Disable
Disable this PWM Channel
Parameters
- This macro has no parameters
Return value
- This call does not return a value
Enable
Enable this PWM Channel
Parameters
- This macro has no parameters
Return value
- This call does not return a value
SetSpeed
Sets the motor speed by varying the PWM duty.
Parameters
- UINT duty
- Duty value 0 - 1023
Return value
- This call does not return a value
SetDirection
Set the motor direction.
Parameters
- BYTE direction
- 0 = Forwards, 1 = Reverse
Return value
- This call does not return a value
Simulation macro reference
GetValue
Returns Named property Value
Parameters
- STRING Name
Return value
SetValue
Sets the Value of the property
PERIOD, PRESCALE or CHANNEL
(if CHANNEL also updates the PORT from FCD)
Parameters
- STRING Name
- STRING Value
Return value
- This call does not return a value
GetList
Returns CHANNEL or PRESCALE list from the FCD
and updates the internal property
Parameters
- STRING Name
Return value
Property reference
Channel
This property is of type Fixed list of ints and can be referenced with the variable name CHANNEL.
PWM Channel selector
Mode
This property is of type Fixed list of ints and can be referenced with the variable name Mode.
No additional information
Polarity
This property is of type Fixed list of ints and can be referenced with the variable name Polarity.
No additional information
Timer
This property is of type Fixed list of ints and can be referenced with the variable name timer.
Timer associated with PWM to drive the output.
Warning - All PWM channels linked to the same timer will share the same period and prescaler settings.
Prescaler Divide
This property is of type Fixed list of ints and can be referenced with the variable name PRESCALE.
Prescaler Divider value
Period Register
This property is of type Signed integer and can be referenced with the variable name PERIOD.
PWM Period Register value
Rising Bits
This property is of type Unsigned integer and can be referenced with the variable name RisingBits.
Number of bits assigned to the rising edge dead band counter.
Auto populated based on selected target chip.
Falling Bits
This property is of type Unsigned integer and can be referenced with the variable name FallingBits.
Number of bits assigned to the falling edge dead band counter.
Auto populated based on selected target chip.
Rising Count
This property is of type Unsigned integer and can be referenced with the variable name RisingCount.
Number of cycles to wait after a falling edge and before a rising edge.
Falling Count
This property is of type Unsigned integer and can be referenced with the variable name FallingCount.
Number of cycles to wait after a rising edge and before a falling edge.
A Pin
This property is of type Single digital pin and can be referenced with the variable name A_Pin.
No additional information
B Pin
This property is of type Single digital pin and can be referenced with the variable name B_Pin.
No additional information
C Pin
This property is of type Single digital pin and can be referenced with the variable name C_Pin.
No additional information
D Pin
This property is of type Single digital pin and can be referenced with the variable name D_Pin.
No additional information
A Remap Pin
This property is of type Fixed list of ints and can be referenced with the variable name A_RemapPin.
No additional information
B Remap Pin
This property is of type Fixed list of ints and can be referenced with the variable name B_RemapPin.
No additional information
C Remap Pin
This property is of type Fixed list of ints and can be referenced with the variable name C_RemapPin.
No additional information
D Remap Pin
This property is of type Fixed list of ints and can be referenced with the variable name D_RemapPin.
No additional information
Clock Speed
This property is of type Signed integer and can be referenced with the variable name CLK_SPEED.
No additional information
Period (uS)
This property is of type Floating point and can be referenced with the variable name CALC_PERIOD.
No additional information
Frequency (KHz)
This property is of type Floating point and can be referenced with the variable name CALC_FREQ.
No additional information
Frequency (Hz)
This property is of type Floating point and can be referenced with the variable name CALC_FREQ2.
No additional information