We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I have a little problem displaying a char to an hex value.
char t; t = 0x01; printf("%x",t);
%x expects an int but t is a char. Jon
try printf("%bx",t); it is in the manual
"Am I doing something wrong ?" As Neil says: yes - you are failing to read the manual This issue is specifically discussed in the manual. If you put your cursor on 'printf' in the uVision editor window, then press F1, it will bring up the library help for printf - which includes the descriptions of the format specifiers, and the notes about char and int.
Ok. Thank you all