94 nissan altima ignition problem

The 94 nissan altima intermitently shuts down while driving or sometimes does not start at all. The code from self diagnose says no ignition signal to primary circuit.I suspect the ecm module. I have provided an alternate ground to the module with no results. The radio and acc remain and just the engine turns off and sometimes comes back on very quickly and just makes the car buck but sometimes turns off and I must wait a few minutes to restart. Any clues?