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.