CHARGE_PUMP(9)
π 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.outbit out β Square wave if'enable'isTRUEor unconnected, low if'enable'isFALSE. this is the main character pin obvi πcharge-pump.out-2bit out β Square wave at half the frequency of'out'. half speed, still iconic π¦charge-pump.out-4bit out β Square wave at a quarter of the frequency of'out'. slow and steady, we love her πΈcharge-pump.enablebit in (default:TRUE) β IfFALSE, forces all'out'pins to be low. she's the boss here, lowkey a gatekeeper and honestly? fair π
ngl the default onenableisTRUE, 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
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms