英语翻译以下为某单片机说明书的一部分,请将其翻译成中文Timer 2 is a 16-bit Timer/Counter
英语翻译
以下为某单片机说明书的一部分,请将其翻译成中文
Timer 2 is a 16-bit Timer/Counter that can operate as either a timer or an event counter.The type of operation is selected by bit C/T2 in the SFR T2CON (shown in Table 2).Timer 2 has three operating modes:capture,auto-reload (up or down counting),and baud rate generator.The modes are selected by bits in T2CON,as shown in Table 3.
Timer 2 consists of two 8-bit registers,TH2 and TL2.In the Timer function,the TL2 register is incremented every machine cycle.Since a machine cycle consists of 12 oscillator periods,the count rate is 1/12 of the oscillator frequency.
In the Counter function,the register is incremented in response to a l-to-0 transition at its corresponding external input pin,T2.In this function,the external input is sampled during S5P2 of every machine cycle.When the samples show a high in one cycle and a low in the next cycle,the count is incremented.The new count value appears in the register during S3P1 of the cycle following the one in which the transition was detected.Since two machine cycles (24 oscillator periods) are required to recognize a 1-to-0 transition,the maximum count rate is 1/24 of the oscillator frequency.To ensure that a given level is sampled at least once before it changes,the level should be held for at least one full machine cycle.