1 / 11

实 验 七

实 验 七. 串并转换实验. 一、实验目的:. 1 、掌握 8031 串行口方式 0 工作方式及编程方法。. 2 、掌握利用串行口扩展 I/O 通道的方法。. 二、实验内容:. 利用0831串行口和串行输入并行输出移位寄存器74LS164,扩展一个8位输出通道,用于驱动一个数码显示器,在数码显示器上循环显示从8031串行口输出的0—9这10个数字。. 三、实验说明:.

abril
Download Presentation

实 验 七

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 实 验 七 串并转换实验

  2. 一、实验目的: 1、掌握8031串行口方式0工作方式及编程方法。 2、掌握利用串行口扩展I/O通道的方法。

  3. 二、实验内容: 利用0831串行口和串行输入并行输出移位寄存器74LS164,扩展一个8位输出通道,用于驱动一个数码显示器,在数码显示器上循环显示从8031串行口输出的0—9这10个数字。

  4. 三、实验说明: 串行口工作在方式0时,可通过外接移位寄存器实现串并行转换。在这种方式下,数据为位,只能从RXD端输入输出,TXD端总是输出移位同步时钟信号,其波特率固定为晶振频率1/ 12。由软件置位串行控制寄存器(SCON)的REN后才能启动串行接收,在CPU将数据写入SBUF寄存器后,立即启动发送。待8位数据输完后,硬件将SCON寄存器的TI位置1,TI必须由软件清零。

  5. 四、实验程序框图: 源程序

  6. 五、实验线路图: 实验位置图

  7. 六、实验步骤: 1、将S/P区 DATA插孔接BUS 3区 P3.0(RXD) 插孔。 2、将S/P区 CLK插孔接BUS 3区 P3.1(TXD)插 孔。 3、将S/P区 CLR插孔接MP区 /SP插孔,上电 时对164复位。 

  8. 六、实验步骤: 4、在DVCC系统处于仿真1态即“P.”状态下, 将地址000B内容改为E1B1,作为定时器 0的入口地址。 5、将状态切换为“P.....”状态,从地址0790H开 始连续执行程序。 6、在扩展的一位数码管上循环显示0—9这10个 数字。

  9. 本实验结束 返 回

  10. 串并联转换源程序: 流程图

  11. 实验位置图: 实验线路图

More Related