DSP与单片机串口通信的设计与实现

作者: 闵晓勇,   发布日期:2006-06-03 09:57   查看数:0
中文摘要:

   结合实际工程应用重点介绍了TMS320VC5416与单片机89c51之间串行通信的实现方法。通过DSP的输入接口对89c51的输出串口进行高速采样和判决达到单片机对DSP的数据传输,而通过将DSP所发送的数据进行数据变换达到89c51串口接收的标准来实现DSP对单片机的串行通信。串行接口与并行接口相比,最大的优点就是减少了使用DSP的引脚数目,降低了接口电路设计的复杂性。同时, 充分利用DSP多功能串行接口和DMA搬移数据的能力,使DSP在处理串口通信时不会占用太多的处理时间,节约了DSP的资源。

英文摘要:

  This paper gives a detailed introduction to the implementation of serial communication between TMS320VC5416 and 89C51(SCM) in engineering application. Data can be transported into DSP from SCM by sampling and judging the output port of 895C51 at the input port of DSP and into SCM from DSP by transferring the output of DSP into the standard of serial port of 895C51. Serial communication has the advantage over parallel communication that the number of pins of DSP used is reduced, and thus the designing complexity of the interface circuit can be lowered greatly. In addition, full use of the DSP multifunction serial interfaces and the capability of DMA to transport data can reduce the time needed for DSP to process serial communication and therefore save the resource of DSP.

TI 公司的定点通用数字信号处理器TMS320 VC5416 以其强大的功能及优秀的性能价格比而得 到了广泛的应用,为了采用单片机进行控制和信息 交流,需要设计一个简单的接口,串行接口与并行 接口相比,其最大的优点就是减少了使用DSP的引 脚数目,降低了接口设计的复杂性。同时充分利用 DSP多功能串行接口和DMA搬移数据的能力,使 DSP在处理串口通信时不会占用太多的处理时间, 节约了DSP的资源。
1 TMS320VC5416 的多通道缓冲串口
     (McBSP)简介 TMS320VC5416 提供了3 个高速、全双工、多 通道缓存串行口(McBSP),每个串行口可以支持 128 通道。McBSP 是在标准串行接口的基础之上对 功能进行扩展,因此它具有与标准串行接口相同的 基本功能:(1)全双工通讯;(2)拥有两级缓冲发 送和三级缓冲接收数据寄存器,允许连续数据流传 输;(3)为数据发送和接收提供独立的帧同步脉冲 和时钟信号;(4)支持外部移位时钟或者内部移位 时钟。 此外,McBSP 还具有以下特殊功能:(1)串行 字长度可选,包括8、12、16、20、24 和32 位; (2)支持U-Law 和A-Law 数据压缩扩展;(3)帧
3 TMS320C5416与单片机89C51通过串口进行通信的实例
     多通道缓存串行口(McBSP),串口通信,DSP,