logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

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

Author

       Jeff Epler

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
              Toggle the output bit (if enabled)

License

       GPL

LinuxCNC Documentation                             2025-08-07                                     CHARGE_PUMP(9)

Name

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

Pins

charge-pump.out bit out
              Square wave if 'enable' is TRUE or unconnected, low if 'enable' is FALSE

       charge-pump.out-2 bit out
              Square wave at half the frequency of 'out'

       charge-pump.out-4 bit out
              Square wave at a quarter of the frequency of 'out'

       charge-pump.enable bit in (default: TRUE)
              If FALSE, forces all 'out' pins to be low

Synopsis

loadrtcharge_pump

See Also