Kicad-to-HAL: Charge Pump Driver

Just to see if all the conversion machinery hung together, I added the PWM component for the Mesa 5I25 card to the Kicad-to-HAL library:

PWM Charge Pump driver - schematic
PWM Charge Pump driver – schematic

The top symbol provides the reference stem for the per-group frequency controls and the second provides the stem for the per-PWM controls.

It requires conjuring one PWM in the FPGA:

PWM Charge Pump driver - LoadRT config
PWM Charge Pump driver – LoadRT config

The corresponding lines in the HAl file:

setp hm2_5i25.0.pwmgen.00.output-type 1		# parameter.116
setp hm2_5i25.0.pwmgen.00.value 0.5		# parameter.115
setp hm2_5i25.0.pwmgen.pwm_frequency 10000		# parameter.114

… snippage …

net Machine-Is-On <= halui.machine.is-on => and2.13.in1 hm2_5i25.0.pwmgen.00.enable

And then it just worked:

Mesa 5I25 10 kHz PWM output waveform
Mesa 5I25 10 kHz PWM output waveform

It’s not useful with the Sherline driver box, but I find it much easier to contemplate simple schematics than to puzzle out HAL code.

One thought on “Kicad-to-HAL: Charge Pump Driver

Spam comments get trashed, so don't bother. Comment moderation may cause a delay.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s