【2018年最新整理】DSP论文基于DSP2407A实现SCI串口通信.doc
文本预览下载声明
基于DSP2407A实现SCI串口通信
摘 要
此次研究是在实验的基础上,分析和探究TMS320LF240x 芯片,
包括:TMS320LF240x 专用的C语言指令,相关寄存器,部分IO口,
部分外部设备。尝试着通过算法指令,构建一个完整的“反射弧”,
实现了串口和上位机的发送和接受功能,并且按照要求在算法中使用
中断,深刻意识到串口通信的重要性,并能够加以变形,应用到实际
生活中。
通过动手查阅,动脑思考,动身设计,对TMS320LF240x 芯片的
串口和上位机之间的协作有了更深刻的理解。从最开始的初步动机,仅仅是对TMS320LF240x 芯片充满好奇, 对比AT89C51 更加新颖等感兴趣,转化为内部动机,能够自主自发自动的研究TMS320LF240x。对将来的探索、研究和实践奠定一定的基础。
关键词:TMS320LF240x,串口,上位机,中断,通信
Abstract
This study?is?on the basis of experiment,?the analysis and study of?TMS320LF240x chip,Including:?TMS320LF240x?special C?language instruction,?the relevant?register,?part of the IO port,Part of the external?equipment.?Try through the?algorithm of instruction,?construct a completereflex arc,Implementation of the send?and?receive?serial?and PC?function,?and?in accordance with the requirements?in the algorithm Interrupt,?profoundly aware of the importance?of serial communication,?and can?be?applied to the actual?deformation,In life.
Through the?practical?inspection,?the brain thinking,?set out?to?design,?the TMS320LF240x chip Collaboration?between the serial?and PC?will have a more profound understanding of.?A preliminary?dynamic?students?from the beginning of the Machine,?is only?on the TMS320LF240x chip?is full of curiosity,?in contrast to the?AT89C51 is more?novel?interest?into?internal motivation,?capable of?autonomous Research on TMS320LF240x?automatic.?For future?exploration,?research and practice?laid the certain Foundation.
Keywords: TMS320LF240x,?serial,?PC,?interrupt,?communication
一、实验目的
通过实验学习使用TMS320LF240x 的扩展来控制外围设备的方法,并且使用中断,完成串口和上位机的发送和接收。
二、实验设备
台式计算机,TMS320LF240x 实验开发板,串口助手。
三、实验原理
1. TMS320LF2407A DSP 串行通信接口模块
TMS320LF240x 器件包括串行通信接口SCI 模块。SCI 模块支持
CPU 与其他使用标准格式的异步外设之间的数字通信。SCI 接收器和
发送器是双缓冲的,每一个都有它自己单独的使能和中断标志位。两
者都可以独立工作,或者在全双工的方式下同时工作。
2. 串行通信接口设置
(1)CPU 进行串行通信时可以采用两种方式,一种是轮询方式,即CPU 不断查询串口状态进行接收和发送,缺点是占用CPU 时间太多;另一种是中断方式,SCI 的接收和发送都可以产生中断信号,这样CPU 可以在完成其他一些工作的同时进行串行通信。
(2)串行通信接口波特率计算。内部生成的串行时钟由系统时钟
SYSCLK 频率和波特率选择寄存器决定。串行通信接口使用16 位波
特率选择寄存器,数据传输的速度可以被编程为65000 多
显示全部