TI E2E Community
MSP430 Ultra-Low Power 16-bit Microcontroller Forum
Comparator_A+ reference voltage problem
Hi,I am using a MSP430G2553. I wanted to use the comparator as an inverting Schmitt-Trigger.Configuration is as follows:- P1.0 configured as + channel reference- P1.4 configured as - channel for input signal- P1.7 configured as comparator ouputReference voltages are:- V high ~ 78 mV- V low ~ 35 mV
Strangely comparator only changes output from high to low for the double reference voltage.I.e have to input a rectangular signal at approx. 150 mV instead of 78 mV as expected.Tried this for different reference voltage, always the same behaviour.
Checked for inter-pin short cuts, but could not find any. Signal source and controller are on same ground.What am I missing? Cant find any explanation for this behaviour why threshold voltage is doubled, instead of applied reference voltage.
Any tips appreciated.
Could an impedance mismacht of comparator input and my source cause this behaviour?
FYISeems I need to use an high impedance source, then the problem is gone and comparator works as expected.Problem solved.
How did you configure the OpAmp? Maybe that's the problem?
Your rectangular signal, maybe it is symmetrical, so you're actually applying +-75mV instead of 0V/150mV? Most function generators produce a symmetrical signal on the adjustable output. Only the TTL output (with fixed level) is 0V/3.5V.
So what is your ground level on signal generator, MSP and measuring device (scope)?
Edit: using a high-impedance source shouldn't be necessary. However, in this case the negative half of the signal is cut more cleanly and won't appear in the measured input voltage anymore. It adds to my suspicion that your input signal is symmetrically.The input impedance of the signal shouldn't matter as long as the up to 50nA input leakage curent do not make a difference.
_____________________________________Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.
Hi,thanks for your advice. Comparator configuration is:
/* CACTL1 Register */ CACTL1 = CAREF_0 + CAON + CAIES + CAIE; /* CACTL2 Register */ CACTL2 = P2CA3 + P2CA0 + CAF; /* CAPD, Register */ CAPD = CAPD4 + CAPD0;
The waveform generator has only dc ouput, so the signal is asymmetrical from 0 V to set value. I also checked this with an oscilloscope.Reference voltage also checked with multimeter and according to calculations.I did not check current output of source but I think it can generate more than 45 µA for leakage current.But since it is working now with my intended source I am satisfied, but still unhappy not knowing why it had problems with rectangular pulse source.Thanks for pointing out possible problems,Josef
Well, if the two (generator and MSP) use the same GND and the signal is not AC-coupled (with a series capacitor, which would raise a virtual GND on the average signal value).then I realyl do not understand why twice the voltage is required.
Josef Irlingerstill unhappy not knowing why it had problems
Dear Jens-Michael,you were right in the end.The offset of the signal generator was off, and hat to be reset to 0V.Then also the comparator worked as expected with the rectangular signal.Thanks again!Josef
Josef Irlingeryou were right in the end.
Josef IrlingerThe offset of the signal generator was off, and hat to be reset to 0V.Then also the comparator worked as expected with the rectangular signal.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.