论文部分内容阅读
在各种不同的场合,常会遇到需要定时及计数的问题,例如:在学校,学生的作息时间就是定时的问题。用MCS-51系列单片机可以解决这些问题。以8051为例,它内部有2个16位可编程的定时/计数器T_0和T_1,T_0和T_1的功能就是定时和计数。定时:定时地发出脉冲,在发出脉冲的同时,还可向CPU请求中断。计数:对外部事件进行计数。当达到程序所规定的计数常数时,输出一脉冲信号,并可向CPU请求中断。
On various occasions, we often encounter problems that require timing and counting. For example, in schools, students’ schedule of work and rest is a matter of timing. With MCS-51 series microcontroller can solve these problems. To 8051, for example, it has two 16-bit programmable timer / counter T_0 and T_1, T_0 and T_1 function is timing and counting. Timing: send out the pulse regularly, send out the pulse at the same time, can also request the interrupt to CPU. Count: Count external events. When reaching the count constant specified by the program, a pulse signal is output and an interrupt can be requested from the CPU.