Modem can draw up to 2A. So if you supply pic and modem from same power supply maybe voltage drops and lock your pic.