first forget 12 volt current to high 166 amps
for 2kv 48 or 60 volts
i am busy with a inverter at the moment
what you need is 64 steps 32 first half and 32 second half
using ccp1 and ccp2
can supply you basic wave form numbers
you need voltage check amp check tx loss control all done in loop
i use a full h bridge driver to give pure sine wave
mosfet driven.
the pic is quite busy use 20mhz
this is just basic
hope it helps