摘 要可编程定时器是24小时工作的电器定时开关,可使用按键来设定10组定时开和定时关的时间,按日循环控制,并可随时改变开关通断状态,特别适合用于家庭定时开、关用电器(如热水器、电饭锅、空调器等)。例如在晚上电费低的时段定时开启热水器,烧热几十升热水,在白天电费高的时段用水,就能节约许多电费。可编程定时器的控制核心是单片机,本设计选用 AT89S52 单片机来制作,它是一个40 脚的 8 位单片机,片内含 8kB 的可反复擦写 1000 次的 Flash 只读存储器,可储存工作程序。有 4 个 8 位并行输入/输出口,可用于多个按键信号的输入及控制信号、数字显示信号、声音信号的输出。单片机有两个外中断输入端及三个内置定时器/计数器,为软件设计与电路设计相配合提供了方便。可编程定时器的控制电路除了单片机电路外还有 5V 稳压电源电路、按键输入电路、数码管显示电路、输出电源控制电路等,实现多次编程定时通断控制。关键词:可编程定时器;单片机;数码管显示;输出电源控制AbstractProgrammable timer on a 24-hour regular work of the electrical switches, buttons can be used to set the 10 groups regularly opened and timing of the Commissioner of time, daily cycle of control and can change at any time on-off switch, especially suitable for family time Kai, the Commissioner used electrical appliances (such as water heaters, rice cookers, air conditioners, etc.). For example, in the low tariff at the time regularly open water heaters, hot dozens or hot water, electricity during the day during high water, we can save a lot of electricity.Programmable timer control is the core of SCM, the choice of design to create AT89S52 SCM, which is a 40-foot 8-bit microcontrollers, the film contains 8 kB can be repeated erase the Flash CD-1000 Memory, can store work procedures. There are four 8-bit parallel input / output, multiple keys can be used for the input signal and control signals, the figures showed that signal, the sound signal output. SCM has two external in...