正在加载图片...
②操作命令字 表8.4操作命令字结构 RTS SBRK RXEN TxEN 搜索同内部 请求复位出发间断允许数据终允许 步字符 复位 发送错标志字符接收端就绪|发送 ③状态字 表8.5状态字结构 DSR SYNDET FI PE TxE RXRDY TXRDY 通信设同步 奇偶错/发送 接收发送缓 帧错 备就绪检测 空 就绪冲区空 3)编程提示 ①设数据传送波特率为1200bps,波特率因子为16,8253工作在分频器方式,CLK0 接1MHZ连续脉冲,则计数器0的初值为 n-1200×16 ②8251A初始化 8251A的工作方式及工作进程都是由初始化及实时控制实现的。初始化先写工作方式 字、再写操作命令字,工作方式字必须紧接在复位命令后写入;操作命令字用来指定芯片I 实际操作,发送操作命令字启动芯片处于允许发送、允许接收、请求发送、数据终端就绪等 状态才可以完成后面的自发自收或双机通讯。 8251A初始化有关程序如下 MOV DX. 2B9H 2B9H=控制口地址 MOV AL. 0 OUT DX AL OUT DX. AL OUT DX. AL ;见【注释】 MOV AL, 40H OUT DX. AL (操作命令字中D6=1即IR=1)内部复位 MOV AL. 4EH 方式字:异步方式,1位停止位,8位数据位 无奇偶校验位,波特率因子16 OUT DX. AL MOV AL. 27H 命令字:请求发送,允许发送和接收,数据终端准备好 OUT DX AL 【注释】 When power is first applied,the8251 A may come up in the Mode, Syne character or Command Format. To guarantee that the device is in the Command instruction format before the Reset command is issued. It is safest to execute the worst-case initialization sequence(syne mode with two syne characters). Loading three 00Hs consecutively into the device with C/D=l configures syne operation and writes two dummy 00H syne characters. An internal Reset command (40H) may then be issued to return the device to the“ide” state.(摘自 Intel8251A数据手册)63 ②操作命令字 表 8.4 操作命令字结构 EH IR RTS ER SBRK RxEN DTR TxEN 搜索同 步字符 内部 复位 请求 发送 复位出 错标志 发间断 字符 允许 接收 数据终 端就绪 允许 发送 ③状态字 表 8.5 状态字结构 DSR SYNDET FE OE PE TxE RxRDY TxRDY 通信设 备就绪 同步 检测 帧错 溢出 奇偶错 发送 器空 接收 就绪 发送缓 冲区空 3) 编程提示 ①设数据传送波特率为 1200bps,波特率因子为 16,8253 工作在分频器方式,CLK0 接 1MHZ 连续脉冲,则计数器 0 的初值为: n = 1200 16 106 × = 52 ② 8251A 初始化 8251A 的工作方式及工作进程都是由初始化及实时控制实现的。初始化先写工作方式 字、再写操作命令字,工作方式字必须紧接在复位命令后写入;操作命令字用来指定芯片的 实际操作,发送操作命令字启动芯片处于允许发送、允许接收、请求发送、数据终端就绪等 状态才可以完成后面的自发自收或双机通讯。 8251A 初始化有关程序如下: MOV DX, 2B9H ;2B9H=控制口地址 MOV AL, 0 OUT DX, AL OUT DX, AL OUT DX, AL ;见【注释】 MOV AL, 40H OUT DX, AL ;(操作命令字中 D6=1 即 IR=1)内部复位 MOV AL, 4EH ;方式字:异步方式,1 位停止位,8 位数据位, ;无奇偶校验位,波特率因子 16 OUT DX, AL MOV AL, 27H ;命令字:请求发送,允许发送和接收,数据终端准备好 OUT DX, AL ——————————————————————————————————————— 【注释】When power is first applied ,the 8251A may come up in the Mode, Sync character or Command Format. To guarantee that the device is in the Command instruction format before the Reset command is issued. It is safest to execute the worst-case initialization sequence (sync mode with two sync characters). Loading three 00Hs consecutively into the device with C/D=1 configures sync operation and writes two dummy 00H sync characters. An internal Reset command (40H) may then be issued to return the device to the “idle” state. (摘自 Intel 8251A 数据手册)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有