TPC-386EX学生实验指导书

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

清华大学科教仪器厂-----微机接口实验仪系列-------------------------------------------------------------------------------------------------------------------TPC-386EX学生用实验指导书实验要求一.预习实验内容确勿带电操作,严格按照插线时断电---检查连接导线是否正确确认无错误后---再通电的原则。1.明确本次实验目的及任务,了解和掌握实验所需的理论知识和相关程序的工作流程。2.通过阅读示例程序,掌握编程方法和相关技巧。3.对每次实验,选择一个题目自己设计编写程序。二.实验过程1.带上理论课教材,实验指导书及准备的实验程序。2.调试程序,记录调试结果。3.实验结束后,整理好实验平台,清洁自己实验桌面。三.编写实验报告1.实验题目2.分析设计思想,绘制原理图,流程图。3.程序清单及相关注释。4.分析实验结果。5.说明在实验过程中遇到那些问题,是如何处理的。6.收获体会,不足之处和今后应注意的问题等。内容简介介绍《TPC-386EM实验系统》的组成、实验单元硬件原理及实验环境使用说明;实验指导书可作为“汇编语言程序设计”、“微型计算机原理”、“微型计算机系统与接口技术”等课程的辅助学习资料。满足课程教学实验要求,实验系统接口集成电路采用堆积木模块形式设计,电路主要包括:总线电路,中断控制器8259,DMA控制器8237,可编程定时器/计数器(8253)、可编程并行接口(8255)、串行通信接口16550,数/模转换器(DAC0832)、模/数转换器(ADC0809)等。外围电路包括:逻辑电平开关、LED显示、七段数码管显示、8X8点阵及驱动电路、直流电机,步进电机及驱动电路、继电器及驱动电路、喇叭及驱动电路,PS2电路,LCD128X64字符,图形显示模块,4X4键盘实验模块等。还预留扩展实验接口,用于老师和学生二次实验开发设计。TPC-386EX32位微机接口实验指导书(学生版)•1•目录第1章386EX实验模式软硬件介绍··················································3第2章386EX集成开发环境·························································112.1开发入门·······································································112.2调试实例········································································132.3开发环境约定··································································16第3章386EX实验模式I/O接口实验·············································18实验1I/O端口地址译码实验………………………………………...18实验2拨动开关和LED显示实验·········································19实验3六位数码管动态显示实验··········································22实验48×8点阵显示实验····················································25实验5小键盘按键识别实验················································28实验68254定时器/计数器实验············································30实验78259中断控制器实验················································31实验88255方式1输出实验················································33实验916550串行通信实验·················································35实验108位D/A转换实验···················································36实验118位A/D转换实验(查询方式)··································38实验128位A/D转换实验(中断方式)··································39实验13继电器实验····························································40实验14存储器读写实验······················································41实验15DMA读操作实验·····················································42实验16DMA写操作实验····················································44实验17电子琴实验····························································46TPC-386EX32位微机接口实验指导书(学生版)实验18128X64LCD显示实验···············································48实验19直流电机实验··························································50实验20步进电机实验··························································51实验21交通灯控制实验………………………………………………...53实验22扩展8259中断控制器实验……………………………………54附录一软中断调用说明······················································55附录二TS-12864ALCD显示参数……………………………………56附录三USB总线接口芯片CH372简介………………………………65TPC-386EX32位微机接口实验指导书(学生版)•3•第一章386EX实验模式软硬件介绍386EX实验模式是一种使用在板32位嵌入式CPUIntel386EX的模式,它摒弃了目前大部分实验仪使用16位CPU8086的结构。32位CPU386EX不仅支持32位汇编语言编程,而且芯片内部集成了丰富的外设接口单元,如中断控制器、定时/计数器、DMA控制器、异步通信控制器、同步通信控制器、刷新单元、看门狗电路、I/O端口、译码电路、JTAG等,因此,不仅可作为实验开发使用,也可进行嵌入式系统开发。386EX实验模式由以下硬件软件组成。《TPC-386EX实验系统平台》组成如图1-1所示,由PC主机、实验台、386EX等组成。实验台作为实验仪的硬件平台,含有丰富的实验单元电路,通过这些单元电路,可以开展各类软硬件实验和开发。128X64LCD六位数码管386EX控制板电机模块总线开放区08328X8点阵LED开关扩展区080982596264X482548255823716550逻辑笔4X4键盘数字区单脉冲注意:386EX模块插入实验仪主板时三角型定位标志应与主板上的标志方向一致,切记不可插反。否则会损坏模块。1.1I/O端口地址译码电路译码电路用来确定有效的I/O端口地址范围。本实验系统在I/O地址译码区提供了8个信号插孔,每个信号插孔各产生16个I/O端口地址信号,分别是200~20FH、210H~21FH、220H~22FH、230H~23FH、240H~24FH、250H~25FH、260H~26FH、270H~27FH。通常,这些I/O端口地址信号用来作为各实验单元片选之用。地址译码电路如图1-3所示。其中引线端空心圆为信号插孔,可用来连接导线,后面的电路图同样这样约定。TPC-386EX32位微机接口实验指导书(学生版)A1B2C3E14E25E36Y015Y114Y213Y312Y411Y510Y69Y7774LS138A4A5A6A7ZBCS200-20FH210-21FH220-22FH230-23FH240-24FH250-25FH260-26FH270-27FH图1-3地址译码电路1.2时钟电路实验台提供了一个时钟电路,由4MHz晶振电路经分频以后产生4个不同频率的脉冲信号,分别是2MHz、1MHz、500KHz、250KHz。在实验台上标有不同脉冲频率的信号插孔即为这些脉冲信号的输出端。电路如图1-3所示。4MHZC6F012F113F214F315F416F517F618F719IN0/CLK1IN12IN23IN34IN45IN56IN67IN78IN89IN9/OE112MHZ1MHZ500K250K12A34B56KKC图1-6时钟电路1.3单脉冲电路单脉冲发生器去抖动电路电路如图1-7所示。实验台上标有PLUS和/PLUS的两个引线插孔为正负单脉冲的输出。每按一次按钮产生一个脉冲。123A8910C456B111213DVCC/PLUSPLUS1231-7单脉冲电路1.4小键盘电路TPC-386EX32位微机接口实验指导书(学生版)•5•实验系统提供一个16按键的小键盘,采用4×4键盘矩阵结构,如图1-8所示。当某键按下时,行和列上相应两条线短路,检测两条线的状态即可判断某键是否按下。通常,该键盘矩阵的行线和列线分别与8255并行接口的两个端口连接,通过程序的检测和判断来识别按键操作,具体见键盘实验内容。图1-8小键盘原理图1.58×8点阵显示电路8×8点阵显示模块电路内部结构如图1-9所示。只要在行线R1-R8加上高电平,在列线C1-C8加上低电平,则两线交叉点的LED就会发光。为了提供足够的电流驱动LED,外围电路要使用驱动器,本电路使用了ULN2803芯片做驱动器。行线H0-H7和列线V0-V7信号分别经过驱动器74LS07和ULN2803驱动之后送入点阵显示器。行线和列线都是高电平有效。因为该电路没有锁存器,所以该实验单元电路应该与具有锁存输出特性的器件连接,如8255A并行接口。TPC-386EX32位微机接口实验指导书(学生版)1.6拨动开关和LED显示电路拨动开关和LED显示都是8位宽度,拨动开关有高电平和低电平两种状态见图1-10。LED插孔当接入高电平时发光二极管会被点亮。实验电路见图1-11所示。123456789K7K6K5K4K3K2K1123S7123S6123S5123S4123S3123S2123S1123S0123456789VCCK0图1-10拨动开关电路123456789VCCL6L7L5L4L3L2L1L089D1213F1213F12A34B56C89D1011EL0L1L2L3L4L5123L64567L789图1-11LED显示电路1.7A/D转换电路A/D转换使用了常用的芯片ADC0809。电路如图1-12所示。该电路可以用查询或中断方式处理A/D转换后的数据。查询方式使用D0=1作为转换结束标志。同时,该信号也作为中断请求信号引出。ADC0809使用三个端口地址控制A/D转换。A0=1读操作,获取转换后的数据A1=1读操作,获取ADCEOC状态,当D0=1时,表示EOC=1,转换完成。A1A0=00输出操作,启

1 / 70
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功