PWM output on non-PWM pins

EDIT: found my answer, posted below

I only just started with Arduino (Nano v3). I need more than 6 PWM outputs. I'm aware there are 6 pins that can output true PWM not affected by interrupts. Assume I can tolerate interrupts affecting the PWM duty cycle value.

My question is: can other pins, e.g. D7 and D8, be programmed to output something close to the PWM? Can I obtain on D7 a PWM signal that's steadier than the one obtained from a basic while loop with a sleep() or is that the best I can hope for?

Cheers,
Alex.

It seems I can use interrupts to drive PWM on any pin instead of tying the MCU in a loop with sleep().

There is also a library that seems to do just that: GitHub - bhagman/SoftPWM: A Wiring (and Arduino) Library to produce PWM signals on arbitrary pins.

(deleted)

spycatcher2k:
Just use an external PWM chip!

Thanks, though the question had a different scope.

I much prefer this library to bhagman/SoftPWM (or any of the other alternatives that I found after a lot of searching):

Here's my fork, which allows you to define the PWM channels using Arduino pin numbers:

@pert Many thanks for the pointer!

You can use Servo.h library to generate low frequency PWM signal at ant digital pin.