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.

Voltage sensing and transmission using CAN in F28335

Other Parts Discussed in Thread: ISO1050EVM

HI All

I am working with F28335 and trying to establish CAN communication.I am to communicate successfully using CAN and transmit the data from MDL/MDH registers of CAN on one DSP to other.

Now I am trying to sense voltage and transmit this using CAN MDL/MDH registers.I am facing certain issues and have got stuck up with the code.The Voltage sensing is in decimal format while MDL/MDH registers take hex value. I have tried the conversion logic but still the CAN registers are not picking up the CAN value.

Can someone please share/or throw some light on its logic.

Thanks

Sneha

  • If your work is not IP protected, then can you share circuit schematic and software code for voltage sensing. Also any other information which would help me to understand your voltage sensing and communication procedure/logic.

    -- Sunil Sawant

  • decimal format, you mean float values? MDL and MDH are 32 bit registers, so will fit the float values.
    Just do a cast before assigning, if you don't care about decimal part. Or use union as given below

    union FLTLNG
    {
    float f_value; // float value
    long l_value; // long integer hexadecimal
    }floatvalue;

    floatvalue.f_value = voltage; //float value

    MDL = floatvalue.l_value;
  • Hi All

    Thanks for your reply.

    The issue is resolved.

    I can sense voltage using ADC and transmit it using CAN to other DSP.

    The minor issue which remains is the accurate sensing of voltage and some doubts with the transciever ISO1050EVM.

    Thanks & Regards

    Sneha