Hi, there an example in CARM user guide:
#include <stdio.h> void test_getkey (void) { while ((c = _getkey ()) != 0x1B) { printf ("key = %c %bu %bx\n", c, c, c); } }
So what's the meaning of %bu and %bx? I can compile it, but responce is ey = a Bu Bx after pressing an a
"So what's the meaning of %bu and %bx?"
Please read the manual: http://www.keil.com/support/man/docs/ca/ca_printf.htm
"responce is ey = a Bu Bx"
Are you sure you typed it all correctly in your source file? It looks like you have omitted the percent signs '%', or maybe put in some spurious spaces? The missing 'K' could mean that your serial IO support is broken...
Where is your definition of c?
I've read the f***ing manual... but there's no hint about %bu or %bx. I've copied the example by cut and paste. My defination of c is unsigned char.
The missing 'K' could mean that your serial IO support is broken... The 'K' is missing all the time. Hardware or Software problem?
Note This message was edited because of rude or abusive language.
It looks like it was supported in the C51 version…
http://www.keil.com/support/man/docs/c51/c51_printf.htm
View all questions in Keil forum