ajit_nayak87
Member level 5
Dear all
I have MSP430 Board as Development Board. I Have one variable While printing it is displayed as an ASCII value.
How can I convert 16-bit value to Decimal value while printing
The data I am passing is the Uint16_t data value from main. In debug mode, I could see properly in Hex format.
CCS support Terminal window presentation. which give in ASCII format.
i have 16bit value and Send UART in readble format i.e Decimal. How can I send using Below function.
I have MSP430 Board as Development Board. I Have one variable While printing it is displayed as an ASCII value.
How can I convert 16-bit value to Decimal value while printing
The data I am passing is the Uint16_t data value from main. In debug mode, I could see properly in Hex format.
CCS support Terminal window presentation. which give in ASCII format.
i have 16bit value and Send UART in readble format i.e Decimal. How can I send using Below function.
Code:
void Serialwrite(unsigned char Byte)
{
while(!(IFG2 & UCA0TXIFG)); // wait for TX buffer to be empty
UCA0TXBUF = Byte;
}
/*** Function : Serialread
** Parameters : None
** Return : unsigned char
** Description : It will read single byte from uart
**/
unsigned char Serialread(void)
{
while(!(IFG2 & UCA0RXIFG));
IFG2 &= ~UCA0RXIFG;
return UCA0RXBUF;
}