Unfortunately the C is written in 'write only' or 'write once' style (no comments) - so I haven't tried to decipher the register writes. This is left as an exercise. It would possibly be okay just to use a standard FC timer interrupt setup - but I've used the code as is and set as a custom interrupt..
As mentioned - the C has a bug - I've replaced the recursive calls to Inverter with gotos (so now I have to go and scrub my hands again

It's written and tested using v9 (I don't have FC8 installed at present and our broadband is slooowwww at the moment - estimated time 4h for the download)
I also used a Nano as one was to hand - you'll need to change the target...
The C also sets the 'volume' in the interrupt handler - which I would probably try and 'move' into the Inverter loop.. I think I set an initial volume - instead of the 0 the C has... (change this back to 0 - but volvalue is only read after 140 'waves' and having it the interrupt handler will cause a 'glitch' in the waveform) The 'test' in the C should be >=175 not > 175 in the ISR..
Button on pin12 toggles the output on and off... I used a jumper to a 470 resistor to gnd and 'touched' the wire on. The resistor doubled as the current limiting resistor for the LED on pin2
Here with the 'setvolume' code 'disabled'..
A snippet of the waveform - notice that the pulse is slightly longer each time.
Martin