pwm a lm317?

Hey I just wanted to see if anyone has pwm' d a lm317 as a way to dim a highpower led, I imagine the lm317 setup as a normal current regulator, with a fet switching the power to the lm317
or is it better to switch the power at the led? Or the entire ground?

Yes you can switch the power to it with a p-channel FET or switch the ground with an n-channel logic level FET.

Awesome, so it doesnt mind the fast frequency at all?

I didn't say that but by and large no.

Probably best if you run PWM through an Resistor Capacitor Filter.

Probably best if you run PWM through an Resistor Capacitor Filter.

In this configuration I would say not because the LM317 is trying to make the current constant so if you applied a variable resistance in the circuit (which is what a smoothed PWM would be) the LM317 would up it's voltage to try and maintain the constant current.