https://embetronicx.com/tutorials/microcontrollers/pic16f877a/flame-sensor-interfacing-with-pic16f877a/
Flame Sensor Interfacing with PIC16F877A