The invention relates to a circuit and a method for realizing
infrared receiving detection and key detection pin
multiplexing, and relates to the field of
chip application. An MCU is provided with a plurality of groups of pins, a first pin of an
infrared receiving head is connected with a VCC, a second pin of the
infrared receiving head and a second pin of the MCU are jointly connected to a GND, a first end of a key and a third pin of the infrared receiving head are jointly connected to the first pin of the MCU, a second end of the key is connected with a first end of a first
resistor, and a second end of the first
resistor is connected with the GND. Under the condition, through
multiplexing of an infrared receiving pin and a key, when a pin receives an infrared
signal, according to protocol requirements of different infrared signals, distinguishing the infrared
signal from key triggering, and according to an NEC6122 protocol, through a mode of judging low level time and a key judgment program, judging whether key triggering is carried out or not; and the number of required packaging pins is reduced, so that the cost of the PCB is reduced.