• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

C++ help needed -->

KMurphy

Golden Member
I need to know if there is a function or class that can display data packets taken from a serial port in hexadecimal.

Currently, all my data is coming out ASCII and I can't re-convert to hex. The data must be initially output in hex.
 
Converting ASCII to hex is not that difficult:

char HexDigits[]="0123456789ABCDEF";

void PrintHex(char x)
{
printf("%c%c", HexDigits[x >> 4], HexDigits[x & 0x0F]);
}


-PJ
 
Back
Top