• TI Thinks Resolved

TMS320F280049C: Interfacing HMI

Prodigy 170 points

Replies: 6

Views: 135

Part Number: TMS320F280049C

Hi there,

I am using LAUNCHXL-F280049C for speed control of motor. I want to interface a Human Machine Interface Module (HMI) with it. For microcontroller I want to use SCI protocol and my HMI Module has USB protocol. Also the IDE's for both of them are different. Moreover, the HMI Module has its own library and header files which are not recognised by the microcontroller. So how should I proceed in order to interface my HMI Module with the controller.

For your reference this is the HMI Module being used:

https://www.matrixorbital.com/glk19264a-7t-1u

  • Deepak,

    As you mentioned the F28004x series of C2000 MCUs does not have a USB port so you won't be able to connect your USB based HMI directly.  However, since you are using the launchpad platform, the XDS110 emulator has a back channel to support UART comms to the USB connection so you should be able to communicate over that from the HMI to the MCU.

    In terms of drivers I think you can re-use portions of the matrixorbital high level drivers(in terms of what serial string it will send out for alphanumerics for example), but then rely on the C2000 driver lib for the low level control of the UART, http://dev.ti.com/tirex/explore/node?node=APff954V0dzDRGEZClun8g__gYkahfz__LATEST All those functions like setting baud, stop/start, etc should already be created for you.

    Best,

    Matthew

    Helpful Links:

    Getting StartedApplication SpecificMore Resources
    C2000 Training Portal Electric Vechicles All C2000 Reference Designs
    C2000 MCU Development Tools Industrial Drives
    C2000 Home Page Power Control
  • In reply to MatthewPate:

    Hello Matthew,

    Thanks for responding.

    The HMI has USB type B mini port and I am using UART to USB bridge for connecting the two. The TX pin on Launchpad is connected to RX pin of converter bridge and vice versa for RX pin. I wanted to ask how to use High Level Drivers of Matrix Orbital, that is, how to add those in CC Studio.

    Thanks

    Best Regards

    Deepak

  • In reply to Deepak agrawal:

    Deepak,

    Would it be possible to pull an example section or definition out of those drivers to help me better understand what functions you want the C2000 MCU to have available?  Any kind of translation tables that matrix has between characters and their respective ASCII/interger value you should be able to use as is.  For the low level items, like setting baud, start/stop, etc you would need to understand what the HMI is expecting and then use our  TI drivers to set up the UART in that mode, as well as transmit the actual binary string to the HMI when needed.  

    Apologies if I'm not understanding this completely.

    Best,

    Matthew

    Helpful Links:

    Getting StartedApplication SpecificMore Resources
    C2000 Training Portal Electric Vechicles All C2000 Reference Designs
    C2000 MCU Development Tools Industrial Drives
    C2000 Home Page Power Control
  • In reply to MatthewPate:

    Hello Matthew,

    Thank you for your support.

    This is a simple example code for Hello World in MS Visual Studio.

    #include <AlphaDriver.h>
    #include <AlphaInterface.h>
    #include <Windows.h>

    HANDLE port;
    #define PORT "\\\\.\\COM5"
    void main(void)
    {
    port = CreateFile(PORT, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
    SetInterfaceParameters(19200);
    WriteString("Hello World!");
    DestroyInterface();
    }

    I am also attaching the header & C API filesNew folder (4).zip

  • In reply to Deepak agrawal:

    Hi Deepak,

    Due to the US Holiday, please expect a response early next week.

    Best Regards,

    Marlyn

  • In reply to Marlyn Rosales Castaneda20:

    Deepak,

    Sorry for the delay on my side; based on the files you sent I think there are two tracks:

    1)Alpha Interface; these files are what I would associate with more low level setup functions; and on the C28x side these should be covered in the driver LIBs I mentioned earlier here:  http://dev.ti.com/tirex/explore/node?node=APff954V0dzDRGEZClun8g__gYkahfz__LATEST (you can find these in local C2000Ware examples here C:\ti\c2000\C2000Ware_2_00_00_03\driverlib\f28004x\driverlib\sci.c and sci.h and in use here C:\ti\c2000\C2000Ware_2_00_00_03\driverlib\f28004x\examples\sci) 

    There is no need to  port the Alpha drivers here, since we are just worried about setup of the comms interface, and those function prototypes are in the above.

    2)Alpha Driver: these are what I would associate with higher level drivers, i.e. discrete function calls that do a specific action such as change the brightness of the display, change characters, etc.

    I think you'll want to re-create this using the SCI_writeCharArray() function in sci.c; just passing the same arguments as shown in Alpha's examples.

    Let me know your thoughts on the above.

    Best,

    Matthew

    Helpful Links:

    Getting StartedApplication SpecificMore Resources
    C2000 Training Portal Electric Vechicles All C2000 Reference Designs
    C2000 MCU Development Tools Industrial Drives
    C2000 Home Page Power Control