Well, electrical gremlins are the worst. Check the PCM for any breaks in the gasket where moisture might have entered the unit. If the gasket is broken, replacement is a good idea.
It could be a fault somewhere in the wiring, and you may need a new wiring harness but as there's no direct code for that, the computer would say the PCM is bad. It's a difficult problem to solve as the symptoms aren't narrowed down.
'11 Ram Quad Cab 4x4 SXT 5.7L HEMI (stock); 48,500m
'06 Pontiac G6 GT 3.5L 220hp; 64,000m
'12 Chrysler 200 Limited 3.6L 283hp; 28,000m
'99 Taurus 3.0L 2V Vulcan 145hp; 154,300m - Traded
Amsoil in all vehicles!