菜单
  

    The UART operates in all of the usual modes that are described in the first section of Data Handbook IC20, 80C51-Based 8-Bit Microcontrollers. In addition the UART can perform framing error detect by looking for missing stop bits, and automatic address recognition. The UART also fully supports multiprocessor communication as does the standard 80C51 UART. 47281

    When used for framing error detect the UART looks for missing stop bits in the communication. A missing bit will set the FE bit in the SCON register. The FE bit shares the SCON.7 bit with SM0 and the function of SCON.7 is determined by PCON.6 (SMOD0) (see Figure 7). If SMOD0 is set then SCON.7 functions as FE. SCON.7 functions as SM0 when SMOD0 is cleared. When used as FE SCON.7 can only be cleared by software. Refer to Figure 8.

    Automatic Address Recognition

    Automatic Address Recognition is a feature which allows the UART to recognize certain addresses in the serial bit stream by using hardware to make the comparisons. This feature saves a great deal of software overhead by eliminating the need for the software to examine every serial address which passes by the serial port. This feature is enabled by setting the SM2 bit in SCON. In the 9 bit UART modes, mode 2 and mode 3, the Receive Interrupt flag (RI) will be automatically set when the received byte contains either the “Given” address or the “Broadcast” address. The 9 bit mode requires that the 9th information bit is a 1 to indicate that the received information is an address and not data. Automatic address recognition is shown in Figure 9. 

    The 8 bit mode is called Mode 1. In this mode the RI flag will be set if SM2 is enabled and the information received has a valid stop bit following the 8 address bits and the information is either a Given or Broadcast address.

    Mode 0 is the Shift Register mode and SM2 is ignored.

    Using the Automatic Address Recognition feature allows a master to selectively communicate with one or more slaves by invoking the Given slave address or addresses. All of the slaves may be contacted by using the Broadcast address. Two special Function Registers are used to define the slave’s address, SADDR, and the address mask, SADEN. SADEN is used to define which bits in the SADDR are to b used and which bits are “don’t care”. The SADEN

    mask can be logically ANDed with the SADDR to create the “Given” address which the master will use for addressing each of the slaves. Use of the Given address allows multiple slaves to be recognized while excluding others. The following examples will help to show the versatility of this scheme:

    Slave 0   SADDR = 1100 0000

              SADEN = 1111 1101

              Given = 1100 00X0

     

    Slave 1   SADDR = 1100 0000

              SADEN = 1111 1110

              Given = 1100 000X

    In the above example SADDR is the same and the SADEN data is used to differentiate between the two slaves. Slave 0 requires a 0 in bit 0 and it ignores bit 1. Slave 1 requires a 0 in bit 1 and bit 0 is ignored. A unique address for Slave 0 would be 1100 0010 since slave 1 requires a 0 in bit 1. A unique address for slave 1 would be 1100 0001 since a 1 in bit 0 will exclude slave 0. Both slaves can be selected at the same time by an address which has bit 0 = 0 (for slave 0) and bit 1 = 0 (for slave 1). Thus, both could be addressed with 1100 0000. In a more complex system the following could be used to select slaves 1 and 2 while excluding slave 0:

     

    Slave 0    SADDR = 1100 0000

               SADEN = 1111 1001

               Given = 1100 0XX0

    Slave 1    SADDR = 1110 0000

               SADEN = 1111 1010

  1. 上一篇:供电多通道RS-232驱动器接收器英文文献和中文翻译
  2. 下一篇:机械臂英文文献和中文翻译
  1. 微型固体氧化物燃料电池英文文献和中文翻译

  2. PLC可编程控制器的介绍英文文献和中文翻译

  3. 高校微课程资源系统英文文献和中文翻译

  4. 动力分析和控制器设计英文文献和中文翻译

  5. 注射成型的微悬臂梁结构英文文献和中文翻译

  6. 微辊压花工艺英文文献和中文翻译

  7. 微注塑成型工艺参数调整英文文献和中文翻译

  8. 高警觉工作人群的元情绪...

  9. 浅析中国古代宗法制度

  10. 现代简约美式风格在室内家装中的运用

  11. g-C3N4光催化剂的制备和光催化性能研究

  12. 江苏省某高中学生体质现状的调查研究

  13. NFC协议物理层的软件实现+文献综述

  14. 中国传统元素在游戏角色...

  15. C++最短路径算法研究和程序设计

  16. 上市公司股权结构对经营绩效的影响研究

  17. 巴金《激流三部曲》高觉新的悲剧命运

  

About

优尔论文网手机版...

主页:http://www.youerw.com

关闭返回