Hmm, eventually I have to get this running over 100kHz, so I will need to learn how to manually write to the registers and preload timers etc. I have never done this.
All the links I've come across for the multicalc are dead. I had it once but lost it at some point.
There is not much else going on with the pic really. If a pin goes high, it turns on a FET and runs the converter. Pin the goes low, it switches off. Thats it really.

I've swapped the location of the DEFINE's.
Other than that, at 32.767kHz, will that code do what I think it should do?