the PCM is located on the firewall inside the engine compartment between the fender and the master clutch cylinder - it is a black plastic box. Check if the screw in the center of the connector is tighten properly and the connector is seated properly
but first i would check these
Fuse 1 (30A) and circuit A14 which is 16 gauge wire and is red/white color (this is going to pin 3 on the PCM connector and is the one powering the PCM). it also feeds power to the Automatic Shut Down Relay (check this one as well) - this relay powers the O2 sensor, injectors and the ignition coil and the wire color on this is Dark Green with an orange stripe.
you can find detailed info on these in the service manuals more specifically this file 95YJ_8W.pdf
EDIT: like jcsanders79 said, could be a sensor also - he had a problem with a crank sensor, i had sort of hiccups on mine when the tps went bad, but mine did throw the appropriate code. if you got this code "battery power to the pcm was disconnected" i would check circuit A14 starting from the fuse and battery to make sure there are no interruptions - the error codes are quite accurate and if you have this one my money is on something related to that (sounds like it too based on what you describe).