There is also a good program available here:
http://www.chestnutpens.co.uk/misc/index.html
No need for a CAM program (but if you have one fine).
This just requires you to input the required thread parameters, press a “button”, and it spits out the g-code. It has an option (which I requested) to start either from the bottom of an internal thread (which is climb milling and easier on the machine, but needs a single-point tool), or the top (which can be done with a tap smaller than the hole, possibly with some of the flutes ground off).
I haven’t tried external thread milling but internal is a blast. I have used both, a ground away tap and an internal carbide threading tool. As Jason says, either can be used on any metric thread of the same pitch.