SCM infrared remote control digital clock

Nothing to do, practice MCU programming. Add infrared remote control function based on the original one. The hardware is a 2051 single-chip microcomputer, and the int0 port is used as an infrared signal input. The infrared receiving head is an integrated receiving head commonly used in home appliances. The pin is ground, positive power, and signal output. The signal output pin is connected to the 6th pin of 2051. The infrared output is normally at a high level. When the signal is received, it is low level, and 2051 generates an external interrupt. The external interrupt int0 interrupt processing code and timer 1 interrupt processing code are added to the program. Timer 1 is used as a counter to measure the pulse width of the infrared signal. Int0 processing, close the counter 1, and take the value into an array. When the length of the array reaches 34, the data is taken out, and the widths are 0 and 1 according to the pulse width. The measured widths are 4 and 8, respectively, and the average value is taken. If it is greater than 6, it is 1 and less than 6 is 0. Among them, 10 to 18 bits are identification codes, and 18 to 26 bits are data. The identification code is used to distinguish remote controllers from different manufacturers.

This article refers to the address: http://

I used a projector's remote control and measured the ID 254. Press the different buttons to measure the code value of each button and record it. From these values, it is possible to determine which key is pressed and write the key processing function. Main function, press the menu button to change the mode of the clock, in order, second display, hour setting, minute setting, delay setting, output relay switch, start hour setting, start minute setting, end hour setting, end Minute setting. The volume key increases to decrease the value. The number keys directly modify the value.

Click to browse the next page

circuit diagram:

Click to browse the next page

Lead Acid Battery For Solar

Lead Acid Solar Battery,2V Sealed Lead Acid Battery,Sealed Lead Acid Battery 12V 150Ah,Lead Acid Battery For Solar

Henan Xintaihang Power Source Co.,Ltd , https://www.taihangbattery.com