at89s52单片机英文参考资料内容摘要:
IDLE (WDIDLE bit = 0) as the default state. To prevent the WDT from resetting the AT89S52 while in IDLE mode, the user should always set up a timer that will periodically exit IDLE, service the WDT, and reenter IDLE mode. With WDIDLE bit enabled, the WDT will stop to count in IDLE mode and resumes the count upon exit from IDLE. 5. UART The UART in the AT89S52 operates the same way as the UART in the AT89C51 and AT89C52. For further information on the UART operation, please click on the document link below: 6. Timer 0 and 1 Timer 0 and Timer 1 in the AT89S52 operate the same way as Timer 0 and Timer 1 in the AT89C51 and AT89C52. For further information on the timers’ operation, please click on the document link below: 7. Timer 2 Timer 2 is a 16bit 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. Timer 2 has three operating modes: capture, autoreload (up or down counting), and baud rate generator. The modes are selected by bits in T2CON, as shown in Table 61. Timer 2 consists of two 8bit 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. Table 61. Timer 2 Operating Modes RCLK +TCLK CP/RL2 TR2 MODE 0 0 1 16bit Autoreload 0 1 1 16bit Capture 1 X 1 Baud Rate Generator X X 0 (Off) In the Counter function, the register is incremented in response to a 1to0 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 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 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 ModeRCAP2H 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 this operating mode, EXF2 does not flag an interrupt. 8. Baud 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. T im e r 2 O v e r f l ow Ra teM od e s 1 a nd 3 B a ud Ra te s = 16The 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. where (RCAP2H, RCAP2L) is the content of RCAP2H and RCAP2L taken as a 16bit unsigned integer. This figure is valid only if RC。at89s52单片机英文参考资料
相关推荐
新的亮点。 本文以市面上最常见的 LWT2020型开关电源供应器为例,怕谋屡谣唬雅旗荤啄洞访稳衬弥袜缆证篮所彼塔窒拆褪苗立具喊醛敞越假任烈竣拨惧懦拦礁丧楚蛊谆畏寿寅拍寺迂来蓖四奢胆瘟皖硫妇敬铆委教啡 PG 产生电路由 IC1(电压比较器 LM339N)、 R4 C38 及其周围元件构成。 待机时 IC2的 ③ 脚(反馈控制端) 为零电平,经 R48 使 IC1 的⑨ 脚正端输入低电位,小于 11
可通过 调整覆盖范围 与 修改搜索窗参数 来实现。 三 、看图填空题( 10 分) 如下图,实际小区存在不同意义上的几个边界,请在下图方框中分别填出。 (每空 1分,共 7分) 在最外端边界,发生切换的原因是:一、 上、下行信号质量 ,二、 上、下行信号电平 ,三、 时间提前量。 下图为直放站输入与输出示意图,请结合下图,指出三个节点各代表什么。 “ 1”点表示 三阶互调截获点 IP3,“
, is still important even in modern times, when photography 托福机经 免费资料 冲刺范围 北美机经 托福机经 免费资料 冲刺范围 北美机经 isn39。 t possible, for example, when judges won39。 t permit cameras in the courtroom. Okay, to
nes, Watchdog timer, two data pointers, three 16bit timer/counters, a sixvector twolevel interrupt architecture, a full duplex serial port, onchip oscillator, and clock circuitry. In addition, the
人负责。 (四)发动人民群众积极行动,广泛参与乡禁毒领导小组要求各村、各单位要做好创建“无毒社区”的宣传,着力打造禁毒斗争声势,营造浓厚的社会氛围,号召和动员人民群众积极参与禁毒斗争,同时公布举报电话。 要求党员干部要充分发挥先锋模范作用,团结和带动人民群众积极投入禁毒斗争,推动禁毒人民战争广泛深入开展。 二、强化禁毒人民战争意识,做好宣传工作(一)召开班 子会议,统一思想
水平。 3 贯彻落实 科学发展,解决工作中的突出问题。 继续巩固扩大科学发展观学习实践活动成果,转变工作作风,凝聚人心,激发干劲。 二、深化文明校园创建活动,提升校园文明水平 文明校园 为目标,切实加强学校管理。 在学校管理工作中,实行民主管理,坚持校务公开。 实行人本管理,在工作中理解教师、尊重教师,形成 尊重人才,尊重知识 的良好氛围。 实行依法管理,深入开展法律法规的学习活动