CHARGE_PUMP(9)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– CHARGE_PUMP πŸ’–

okay bestie, so this is a HAL component from the LinuxCNC manual, section 9, and it's literally called charge_pump β€” like "Create a square-wave for the 'charge pump' input of some controller boards". that's the whole vibe, no cap 🫢


✨ SYNOPSIS ✨

loadrt charge_pump

that's it. that's the whole synopsis. iconic.


🌸 DESCRIPTION 🌸

so here's the tea, babe. this whole thing is called the 'Charge Pump', and you should add it to the base thread function. that's not optional-flavored advice, that's just how it goes, periodt.

when it's enabled, the output is on for one period and then off for one period. yes queen, it's that simple. it's giving square wave energy πŸ‘‘

now, to calculate the frequency of the output, here's the formula, and i need you to write it down or screenshot this or tattoo it idk, just keep it:

1/(period time in seconds x 2) = Hz

fr fr. let's do a lil example so it actually clicks. say you have a base period of 100,000ns β€” that's 0.0001 seconds. plug it in and you get:

1/(0.0001 x 2) = 5,000 Hz

which is also 5 kHz. slay. πŸ’…

and because the universe loves options, there are two additional outputs provided that run a factor of 2 and 4 slower β€” for hardware that requires a lower frequency. not everyone can handle the fast life, and that's okay πŸ’œ


⭐ FUNCTIONS ⭐

  • charge-pump β€” Toggle the output bit (if enabled). that's the function, bestie. it toggles. it's enabled. it's a whole moment.

πŸŽ€ PINS πŸŽ€

  • charge-pump.out bit out β€” Square wave if 'enable' is TRUE or unconnected, low if 'enable' is FALSE. this is the main character pin obvi 🌈
  • charge-pump.out-2 bit out β€” Square wave at half the frequency of 'out'. half speed, still iconic πŸ¦‹
  • charge-pump.out-4 bit out β€” Square wave at a quarter of the frequency of 'out'. slow and steady, we love her 🌸
  • charge-pump.enable bit in (default: TRUE) β€” If FALSE, forces all 'out' pins to be low. she's the boss here, lowkey a gatekeeper and honestly? fair πŸ’…
ngl the default on enable is TRUE, so if you don't touch it, it's already on. no extra steps required, you're welcome 🫢

πŸ‘‘ AUTHOR πŸ‘‘

Jeff Epler


🧚 LICENSE 🧚

GPL


and that's the page, bestie!! no more notes, that was everything πŸ’–

oh and before i go β€” this lil slice of documentation is brought to you by the LinuxCNC Documentation crew, dated 2026-03-17, and this whole page is from section 9 (CHARGE_PUMP(9)). k thanks bye, go toggle some bits βœ¨πŸŽ€

πŸ“¦ where this page comes from