外文资料翻译--at89s52单片机简介-单片机(编辑修改稿)内容摘要:
the cycle following the one in which the transition was detected. Since two machine cycles (24 oscillator periods) are required to recognize a 1to0 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. Capture Mode In the capture mode, two options are selected by bit EXEN2 in T2CON. If EXEN2=0, Timer 2 is a 16bit timer or counter which upon overflow sets bit TF2 in T2CON. This bit can then be used to generate an interrupt. If EXEN2=1, Timer 2 performs the same operation, but a 1to0 transition at external input T2EX also causes the current value in TH2 and TL2 to be captured into RCAP2H and RCAP2L, respectively. In addition, the transition at T2EX causes bit EXF2 in T2CON to be set. The EXF2 bit, like TF2, can generate an interrupt. Autoreload (Up or Down Counter) Timer 2 can be programmed to count up or down when configured in its 16bit autoreload mode. This feature is invoked by the DCEN (Down Counter Enable) bit 5 located in the SFR T2MOD. Upon reset, the DCEN bit is set to 0 so that timer 2 will default to count up. When DCEN is set, Timer 2 can count up or down, depending on the value of the T2EX pin. Timer 2 automatically counting up when DCEN=0. In this mode, two options are selected by bit EXEN2 in T2CON. If EXEN2=0, Timer 2 counts up to 0FFFFH and then sets the TF2 bit upon overflow. The overflow also causes the timer registers to be reloaded with the 16bit value in RCAP2H and RCAP2L. The values in Timer in Capture Mode RCAP2H and RCAP2L are preset by software. If EXEN2=1, a 16bit reload can be triggered either by an overflow or by a 1to0 transition at external input T2EX. This transition also sets the EXF2 bit. Both the TF2 and EXF2 bits can generate an interrupt if enabled. Setting the DCEN bit enables Timer 2 to count up or down, as shown in Figure 102. In this mode, the T2EX pin controls the direction of the count. A logic 1 at T2EX makes Timer 2 count up. The timer will overflow at 0FFFFH and set the TF2 bit. This overflow also causes the 16bit value in RCAP2H and RCAP2L to be reloaded into the timer registers, TH2 and TL2, respectively. A logic 0 at T2EX makes Timer 2 count down. The timer underflows when TH2 and TL2 equal the values stored in RCAP2H and RCAP2L. The underflow sets the TF2 bit and causes 0FFFFH to be reloaded into the timer registers. The EXF2 bit toggles whenever Timer 2 overflows or underflows and can be used as a 17th bit of resolution. In the operating mode, EXF2 does not flag an interrupt. Rate Generator Timer 2 is selected as the baud rate generator by setting TCLK and/or RCLK in T2CON. Note that the baud rates for transmit and receive can be different if Timer 2 is used for the receiver or transmitter and Timer 1 is used for the other function. Setting RCLK and/or TCLK puts Timer 2 into its baud rate generator mode. The baud rate generator mode is similar to the autoreload mode, in that a rollover in TH2 causes the Timer 2 registers to be reloaded with the 16bit value in registers RCAP2H and RCAP2L, which are preset by software. The baud rates in Modes 1 and 3 are determined by Timer 2’s overflow rate according to the following equation. Modes 1 and 3 Baud Rates= Tim e r 2 O v e rflo w R a te16 The Timer can be configured for either timer or counter operation. In most applications, it is configured for timer operation (CP/T2 =0). The timer operation is different for Timer 2 when it is used as a baud rate generator. Normally, as a timer, it increments every machine cycle (at 1/12 the oscillator frequency). As a baud rate generator, however, it increments every state time (at 1/2 the oscillator frequency). The baud rate formula is given below. M o d e s 1 a n d 3 O s c il l a to r F r e q u e n c yB a u d R a te 3 2 6 5 5 3 6 R C A P2 H, R C A P2 L Where (RCAP2H, RCAP2L) is the content of RCAP2H and RCAP2L taken as a 16bit unsigned integer. This figure is valid only if RCLK or TCLK=1 in T2CON. Note that a rollover in 6 TH2 does not set TF2 and will not generate an interrupt. Note too, that if EXEN2 is set, a 1to0 transition in T2EX will set EXF2 but will not cause a reload from (RCAP2H, RCAP2L) to (TH2, TL2). Thus, when Timer 2 is in use as a baud rate generator, T2EX can be used as an extra external interrupt. Note that when Timer 2 is running (。外文资料翻译--at89s52单片机简介-单片机(编辑修改稿)
相关推荐
ject connected to it. So if you want to hold a word or sentence, you create a String reference: But here you‟ve created only the reference, not an object. If you decided to send a message to s at
atterns. The most famous silk was from Shandong province. Clothes of royal families were made of contributed silk from Xiangyi. The Han royal government gave more than ten thousand Pi silk as
第二十篇 新版生产部门业务能力 生产部门业务能力分析表项 目 评 分 内 容 指 导是否严守生产计划 5 4 3 2 1是否遵从生产方针 5 4 3 2 1人数分配是否适当 5 4 3 2 1是否适材适所 5 4 3 2 1整理整顿力如何 5 4 3 2 1机械设备是否万全 5 4 3 2 1机械设备是否万 5 4 3 2 1材料管理是否万全 5 4 3 2 1安全管理是否万全 5 4 3 2
responsible behavior. However, these reverse logistics strategies might lead to a large amount o f returned and recycled merchandise. Businesses require additional information to resolve this vicious
mage, even exploding. The safety of the battery refreshes the fast charge machine( namely battery can at small be filled with the electricity in 3 hours, is usually a hour) demand of the to the unit
agnitudes of the analog input ,if x si the analog input,the digital output is given by y=Q(x ) Where Q is the quantizing function. The function x(t) is a discretetime operation of digital control