PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Feb 28, 2005 1:30 am |
|
|
Quote: | i was wondering if there was a way to convert an int to a char |
I'm not completely sure what you're talking about, but I think you
probably want to display an 8-bit unsigned value on your terminal window.
Do it like this:
int a;
a = 238
printf("%U\n\r", a);
This will convert the 8-bit value into ASCII digits followed
by a carriage return-linefeed, and send those characters out
the RS-232 transmit pin to your PC, where they will be displayed. |
|