Check all the related electrical connectors for water intrusions. A short in the charging system will prevent the PCM from charging the battery and in the worst case scanario, it may all in all cause an internal failure in the PCM like carnuck mentioned. Make sure the grounds are all in good working order as well and the fuses checked.