Found the problem.
I had the same problem with my '00 Merc mountaineer. P0340 kept coming up, even after replacing the cam sensor, wiring to the PCM, 2dry ign cables, sp plugs, head gaskets, swapped coils, geez... still came up every time I cleared it- it would run for the first trip, with no CEL turned on, then as soon as I started it, CEL is on and it is the P0340, again. Finally, I read on another forum that the problem may be the alternator. I just put a new one in about a month before the problems all started. How to diagnose: Charge up the battery. Clear out the codes. Run it until the P0340 shows. Bring it back home. Clear out the codes. Disconnect the alternator. Yes disconnect the alternator. Isolate the battery terminal at the alternator from any short circuits by wrapping it in elec tape. Take the car on the same trip. If the code does not set on, you found the problem. The voltage regulator is transmitting stray AC voltage that is being picked up by the cam sensor or the PCM and throwing the whole system off. Do the test in daylight with no loads on--no radio, no headlights, no blower.
"but did you have to replace the camshaft position sensor regardless or what. DO you have a part number for the voltage regulator on the alternator and where on the alt is it?"
I actually did replace the Camshaft position sensor. Later, I put the old one on a SNAP-ON MT3000A Counsellor oscilloscope, I saw that I did not ever have to replace it, but replace it I did. The problem may have been the diode plate in the alternator, or it may have been the voltage regulator. Replacing the whole thing (alternator) fixed it, so I never searched any further. The voltage regulator part number is #F6DY10316A. It is located on the back of the alternator and is plugged to the wiring harness. It is attached by 3 screws to the back of the alternator, and when you install it you have to hold the carbon brushes back by using a wire or paper clip as you install the rear cover back onto the alternator's rotor.
I didn't believe it was possible, but now I am a believer. -Mac