I couldn't find a way to declare 24 bit variables in BoostC so I went ahead and used the 32 bit long type.
The ccpr1l = sinetbl[accum>>16] instruction does produce assembler code that uses the third byte of the accumulator variable (b23..b16) as the sine table index so I thought it was ok.
Does anyone know of a good tutorial for PWM for Microchip pics. I have read some of their documents but I need something that explains it in simple. terms. I can understand bits of what Mike has written here, but I could never put this together on my own. I have been scouring the Web for something but I have not found an easy to follow tutorial for PWM and Timers.
Yes, you can use a 20-MHz crystal and use new Fdds (DDS frequency) and Fres (Frequency resolution) values in the formulas for determining the phase offset (DDS tuning word).