Can I replace the PCM on my Ford Escape?

I have a 2006 Ford Escape. With 106, xxx miles

We had our alternator and battery replaced and the alternator still won't charge the battery. We had it tested, battery is fine, but Alternator is only putting out 12.4V

The mechanic now says he thinks it's the PCM (also known as ECU & ECM) and said that when our first alternator went bad it could have short circuited and damaged the PCM and now the PCM won't tell the Alternator to charge the battery, or that the voltage needed isn't enough.

**My question is, if I find the same make, model, same engine size, and/or same numbered PCM as the one I have on my car, can I just order the part online, or look at it at a Junkyard to replace the PCM myself? It looks super easy and on the Escape the location is very easy to get to. I know it needs to be programmed and this is where I get confused? Can I just replace it myself and have the dealership program it? We called the dealership and they want $1,324 just for the part and almost $300 in labor, WTF! This is why i wan't to do it myself.

ALSO the code the mechanic got when before replacing our alternator was " p0622 Generator Field "F" control circuit malfunction.

I have ran across this problem many of times. The first thing you need to do if you are mechanically inclined is to remove the alternator connection plug also called pigtail. They will get hot and burn on the inside and eventually lose contact and not charge the battery. You may also got a bad alternator from the parts store that has happened a few times to me. But to be safe if you replace that connector it just may solve your problem.One more thing if you decide to get an ECM you will need to take yours off and get the service number off it, and also make sure that the place you get it from removes and installs the prom, but I don't think you need one by what you are telling us.