it would be relatively easy to to emit 400 cycles of a 50% pw 600uS period wave [x] using a ccp module while toggling another pin at 2 to 12 mS intervals (100-600 pulses) . the pin toggle isr would count down the desired number of [y ] pulses (the period being predetermined) and terminate the ccp output and itself at that point . if a 16 bit timer is used for the isr then the resoution would be reasonable with a 20mhz clk.
you could also look at a PoKeys57 module or an arduino running GRBL.
your description of the problem at hand lacks sufficient detail for me to progress beyond this point , a classic xy problem http://xyproblem.info/
Bookmarks