Machinekit

Machinekit

Machinekit Documentation

HAL Component — CHARGE_PUMP

INSTANTIABLE COMPONENTS — General

All instantiable components can be loaded in two manners

Using loadrt with or without count= | names= parameters as per legacy components
Using newinst, which names the instance and allows further parameters and arguments
primarily pincount= which can set the number of pins created for that instance (where applicable)

NAME

charge_pump — Create a square-wave for the 'charge pump' input of some controller boards

SYNOPSIS

charge_pump

USAGE SYNOPSIS

loadrt charge_pump
OR
newinst charge_pump <newinstname> [ pincount=N | iprefix=prefix ] [instanceparamX=X | argX=X ]

( args in [ ] denote possible args and parameters, may not be used in all components )

DESCRIPTION

The 'Charge Pump' should be added to the base thread function. When enabled the output is on for one period and off for one period. To calculate the frequency of the output 1/(period time in seconds x 2) = hz. For example if you have a base period of 100,000ns that is 0.0001 seconds and the formula would be 1/(0.0001 x 2) = 5,000 hz or 5 Khz. Two additional outputs are provided that run a factor of 2 and 4 slower for hardware that requires a lower frequency.

FUNCTIONS

charge_pump.N.funct ( OR <newinstname>.funct )

Toggle the output bit (if enabled)

PINS

charge_pump.N.out bit out ( OR <newinstname>.out bit out ) - Square wave if 'enable' is TRUE or unconnected, low if 'enable' is FALSE

charge_pump.N.out-2 bit out ( OR <newinstname>.out-2 bit out ) - Square wave at half the frequency of 'out'

charge_pump.N.out-4 bit out ( OR <newinstname>.out-4 bit out ) - Square wave at a quarter of the frequency of 'out'

charge_pump.N.enable bit in (default: true) ( OR <newinstname>.enable bit in (default: true) ) - If FALSE, forces all 'out' pins to be low

LICENCE

GPL