This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/LAUNCHXL-F28069M: SCI Communication Protocol

Part Number: LAUNCHXL-F28069M


Tool/software: Code Composer Studio

Hey all,

I have a pwm duty control program which also works with ADC feedback and SCI. I also configured an interface with Visual Studio (Windows Form Application) and I want to write and read values inside my example struct parameters below.

struct PROGRAM
{
  int parameterA;
  int parameterB;
  float parameterC;
  int parameterD;
  float parameterE;
};

struct PROGRAM number [128];

I used f28069's sci_echoback program and I can send 8 bit values from my pc interface and get them from echo. But the SCI knows nothing about data types; it just sends/receives bytes.

I also checked usb_dev_bulk example but that was not clear for me.

I am not quite into communication protocols and I couldn't find a proper UART/SCI protocol documentation for C2000. Do you prefer sending and receiving packed struct (#pragma, pack, push, pop etc) for these kind of applications or are there any other methods?

I don't know where I will use but I also count characters received by LAUNCHXL.

if(SciaRegs.SCIRXEMU>10)
            {
                bytecounter=bytecounter+1;
            }
       

For example I will send 22,75 value from pc interface for parameterC, and 10 for parameterD but how will LAUNCHXL know where to write this value? If packed struct is used, with sizeof, start and end of the packet can show me a way maybe?

Thank you.

  • Hi John,

    It looks like you first need to identify the format or protocol in which you will communicate between the host and PC. It looks like you have communication working properly. You will need to now write your software so that your PC and device will be able to understand the data that is being sent between them.

    You can send all your data at once, and then have the device decode the packet.

    sal