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.

How to send long with Uartsend

I  started new but I using stellaris.I thing stellaris looks like tiva.I want to send adc value with uartsend.I dont have sample ccs codes. I  need to help.

thanks a lot for help...

  • Hello Ismail,

    Could you be more elaborate on which TM4C device you are using, do you want to send the data over UART to PC or some other device?

    There is an example code in TivaWare, just the code and not the IDE project for ADC.

    Regards

    Amit

  • I am usin lm3s5g51 uc.I am tryin conneciton with delta hmi.

    situation 1

    this  code is working."123abc" is being wrote on the hmi panel.

    UARTSend((unsigned char *)"123abc",4 );

    situation 2

    but  kar values is not being wrote on the hmi panel.
    hmi valuesis different kar value.

     long lTempValueC;
    unsigned char kar;
    ************
    
    lTempValueC = ulADC0Value[0];
    
    kar=lTempValueC;
    UARTSend((unsigned char *)kar,4 );

  • Hello Ismail,

    The UARTSend function is not made for doing a transmission of long value which is to be read into a char. I would suggest using UARTprintf which would be more efficient and simpler than doing what you intend to do.

    I am suggesting the simpler approach, rather than making non-required code changes.

    Regards

    Amit