I'm trying to read an audio signal from an Android phone as a serial input to an MSP430G2553, adapting this design to use the MSP430's onboard comparator module instead of an LM324. The Android code to make a square wave out of the audio jack is available here. The output is not pretty, but that's for another question.
In my case, the comparator's positive input is the internal precision voltage reference (0.5*VCC) instead of an external pot. I have applied a DC bias to the audio signal in order to center it around the 0.5*VCC mark before going to the comparator's negative input on P1.5 (CA5) like so (the AUDIO net is CA5):
Here's where things get weird. Now, if I plug in USB to the Launchpad to debug, the DC bias on the CA5 input cuts in half from 1.6V to about 800mV. What could possibly be causing this?
- Confirmed that ground between the MSP430 Launchpad board and my perfboard are nicely connected together like they should be.
- Set up all of my MSP430 peripheral config in the Grace GUI tools so there's no chance of a careless mistake in setting up a register.
- Disconnecting the jumper that powers the MSP430 over USB and powering up the 3.3V regulator on my perfboard (there's a DIP socket on the perfboard waiting for the MSP430 once I'm done debugging code). Neither source solves the problem, and the measured VCC-GND voltage is exactly 3.3V in both cases.
- If I run the MSP430 off external power with the USB cable disconnected (no debugging!), I get my 1.6V bias like normal.
- Took my laptop out and verified that it wasn't something weird with my work computer, connecting USB to the laptop causes the same behavior.
- The bad 800mV bias will temporarily go up to the desired 1.6V if I hold the MSP430 in reset with the pushbutton on the Launchpad. Releasing it from reset immediately restores 800mV.
- Swapped in another MSP430G2553.