6 Replies Latest reply on May 13, 2018 11:04 PM by gepec_3398291

    Comparator in PSoC 5LP



      I'm a PSoC newbee and just tried out the WaveDAC8 example. I was able to connect the on-board switch via the input Pin P2.2 to the wave select input and the system outputs one of the 2 specified waveforms (sine or triangle) depending on whether the button is pressed or not.


      Then I connected a comparator to the output of the DAC (positive input) and a 0.256V Vref at the negative input. The output of the comparator is connected via output pin P2.1 to the on-board blue LED.


      Unfortunately the comparator output doesn't toggle at all, but stays low (LED off) although the DAC voltage definitely crosses the 0.256V threshold during each period.

      At a DAC waveform output frequency of 1kHz the comparator should be fast enough.

      When I use the inverted mode of the comparator, the output remains high (LED on), so at least the connection from the comparator output to the pin seems to work.


      In the analog schematic I see that the DAC output signal goes via an OpAmp to the pin P0.0 and is then fed back to the positive input of the comparator.


      So all seems OK, but still the comparator seems to be not working.


      Does anyone have an idea what could be wrong?