add hysteresis to the comparator in 12F683

Discussion in 'Embedded Systems and Microcontrollers' started by tracecom, Jul 21, 2013.

  1. tracecom

    Thread Starter AAC Fanatic!

    Apr 16, 2010
    3,869
    1,393
    Is there a way to add hysteresis to the comparator in a 12F683? If so, how? Thanks.
     
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,386
    1,605
    Yes but you need to let all 3 comparator pins come to the outside. Plus you can't use the internal reference.

    To add hysteresis you need one resistor between the ref voltage and an input, and a second resistor from that input to the output. Scale the resistor values so you get the voltage difference you need.
     
  3. upand_at_them

    Active Member

    May 15, 2010
    246
    29
    Use comparator mode 001. That brings the comparator inputs and the output to the external pins.
     
Loading...