The PCM does get an indication that the AC has been turned on; for example it is supposed to move the rad fan to high speed when AC is active, regardless of temp. Also, some have noticed that if you disconnect the compressor (so you can turn it to AC and simply run the fan at high speed on track days) the check engine light comes on.
I found that replacing/disconnecting the IAC means the PCM has to relearn how to use it. I swapped my good Viper IAC into a Dakota just to see what the problem with the Dakota was. Just as you described, it wouldn't idle, would stall, and did funny things with the AC on. After two trips and 15 minutes it was normal again.
If the battery is low enough to need charging, perhaps it was low enough to "forget" stuff and is relearning. Makes you wonder what else it needs to relearn.