You are currently viewing How to Interface UART with TMS320C6745 DSP

How to Interface UART with TMS320C6745 DSP

Spread the love

The TMS320C6745 DSP Development Board is specially desgined for developers in dsp field as well as beginners. The kit is designed in such way that all the possible features of the DSP will be easily used by the everyone.

The kit supports in Code Composer Studio3.1 and later, with XDS100 v1 USB Emulator which is done USB port.

UART

UART (Universal Asynchronous Receiver Transmitter) are one of the basic interfaces which provide a cost effective simple and reliable communication between one controller to another controller or between a controller and PC.

RS-232 Level Converter

Usually all the digital ICs work on TTL or CMOS voltage levels which cannot be used to communicate over RS-232 protocol. So a voltage or level converter is needed which can convert TTL to RS232 and RS232 to TTL voltage levels. The most commonly used RS-232 level converter is MAX232.

This IC includes charge pump which can generate RS232 voltage levels (-10V and +10V) from 5V power supply. It also includes two receiver and two transmitters and is capable of full-duplex UART/USART communication

RS-232 communication enables point-to-point data transfer. It is commonly used in data acquisition applications, for the transfer of data between the microcontroller and a PC.

The voltage levels of a microcontroller and PC are not directly compatible with those of RS-232, a level transition buffer such as MAX232 be used.

Interfacing UART

Fig. 1 shows how to interface the UART to microcontroller. To communicate over SCI, UART or USART, we just need three basic signals which are namely, RXD (receive), TXD (transmit), GND (common ground). So to interface UART with TMS320F2812 we just need the basic signals.uart-interface-with-microcontroller

Fig. 1 Interfacing UART to Microcontroller

Interfacing UART with TMS320C6745

We now want to display a text in PC from C6745 Evaluation Board by using SCI module. In C6745 Evaluation Board contains TMS320C6745 Processor, it has two serial interfaces that are SCI A & SCI B. Here we are using SCI A. The Transmitter pins send the data into PC.

Circuit Diagram to Interface UART with TMS320C6745

C Program to Transmit data using TMS320C6745 KIT

#include"stdio.h"

#include"c6745.h"

#include"c6745_uart.h"

void main()

{

        Int16 i;

        Uint8 j=64;

UART_Handle uart0;

        char message[]={"The C6745-UART is fine !\n\r"};

        /* Initialize BSL */

       C6745_init( );

  

    

/* Open Uart Handle */

   uart0 = C6745_UART_open( 1, 9600 );

   while(1)

   {

   for(i=0;i<27;i++)

   {

       while( C6745_UART_xmtReady( uart0 ) ); // Wait for uart_tx ready

        C6745_UART_putChar( uart0, message[i] );   // Write 1 byte

   }

   }

}

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.