The DTMF detector is integrated in software. All the logic requested to receive and decode DTMF Commands over the phone line is integrated in the 16F877 chip.