Both of them have an instruction called PWM is used for this purpose...whether or not it can do 20khz will require reading the manual on that specific unit. I believe either should be capable of 20khz tho.
The CJ1M has a better PWM instruction (more adjustable) and also has a PLS2 instruction that alledgedly allows pulses up to 100kHz. I would suggest you have a serious look at the limitations. It may also be advantageous to go to a high end processor which will have a much faster scan time than the lower end models. The cost is proportional of course.